Call to arms: lambda-case is stuck and needs your help

Mikhail Vorozhtsov mikhail.vorozhtsov at gmail.com
Fri Jul 6 08:46:22 CEST 2012


On 07/05/2012 10:22 PM, wagnerdm at seas.upenn.edu wrote:
> Quoting Mikhail Vorozhtsov <mikhail.vorozhtsov at gmail.com>:
>
>> After 21 months of occasional arguing the lambda-case proposal(s) is
>> in danger of being buried under its own trac ticket comments. We need
>> fresh blood to finally reach an agreement on the syntax. Read the wiki
>> page[1], take a look at the ticket[2], vote and comment on the proposals!
>>
>> P.S. I'm CC-ing Cafe to attract more people, but please keep the
>> discussion to the GHC Users list.
>>
>> [1] http://hackage.haskell.org/trac/ghc/wiki/LambdasVsPatternMatching
>> [2] http://hackage.haskell.org/trac/ghc/ticket/4359
>
> Well, for what it's worth, my vote goes for a multi-argument \case. I
> find the comment on the wiki page about mistyping "\case Just x" instead
> of "\case (Just x)" a lot a bit disingenuous, since you already need
> these parens with today's lambda. The complaint that multi-argument
> cases are unorthodox doesn't really hold a lot of weight with me -- much
> more serious things than syntax have changed in GHC compared to the Report!
\case does /not/ require parentheses. I wrote about forgetting them when 
using MultiClauseLambdas, e.g.

\(A b) -> ... -- \ here reminds me to use ()
  (C d) -> ...
  ...
  Y z -> ... -- After a while I forget about them because all I see is
             -- Pat -> Expr, and that's instantly a case-expression
             -- alternative clause for me.

This might as well be just my personal thing.

> Is there a more formal way to cast votes...?
People are still coming up with new tweaks. I'll write a summary email 
with the voted (so far) proposals list, maybe it will be easier to go on 
from there.



More information about the Glasgow-haskell-users mailing list