Duncan Coutts wrote:
On Wed, 2007-08-15 at 11:06 -0700, Stefan O'Rear wrote:
foo = getSomethingCPS $ \ arg -
moreStuff
is now a syntax error (\ { varid - } matches no productions).
I'm not sure I follow.
The patterns would have to match up in a column, so
foo =
On 16 aug 2007, at 13.46, Bertram Felgenhauer wrote:
Duncan Coutts wrote:
On Wed, 2007-08-15 at 11:06 -0700, Stefan O'Rear wrote:
foo = getSomethingCPS $ \ arg -
moreStuff
is now a syntax error (\ { varid - } matches no productions).
I'm not sure I follow.
The patterns would have
Hi,
On http://hackage.haskell.org/trac/haskell-prime/wiki/LambdaCase the
proposed syntax for lambda case is:
case of
alts
but this has a really bad downside for interactive editors: it doesn't
allow one to distinguish between an incomplete construct and a completed
construct thus
On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote:
On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote:
OTOH, your proposal provides (IMO) much more natural syntax for
multi-pattern anonymous functions, especially if we stipulate that
unlike a case (but like a lambda) you
On Wed, 2007-08-15 at 11:06 -0700, Stefan O'Rear wrote:
Why not just:
sumTo0 = foldr (\0 k - 0
n k - n + k) 0
Because it would break a very large amount of old code, and I think H'
was supposed to be upward compatible:
Aye, that'd be bad.
foo = getSomethingCPS $ \
Stefan O'Rear wrote:
On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote:
On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote:
OTOH, your proposal provides (IMO) much more natural syntax for
multi-pattern anonymous functions, especially if we stipulate that
unlike a case
On Wed, Aug 15, 2007 at 11:06:36AM -0700, Stefan O'Rear wrote:
On Wed, Aug 15, 2007 at 06:58:40PM +0100, Duncan Coutts wrote:
On Wed, 2007-08-15 at 10:50 -0700, Stefan O'Rear wrote:
OTOH, your proposal provides (IMO) much more natural syntax for
multi-pattern anonymous functions,
Duncan Coutts wrote:
On Wed, 2007-08-15 at 18:23 +0100, Brian Hulley wrote:
Therefore I propose:
\of
alts
which doesn't suffer this problem since the keyword of can never
follow a '\' in the existing grammar.
Or how about:
\case of
alts
which seems clearer to me.
I came really late to this discussion, so I assume someone has already
proposed using (Control.Applicative.|) to select the first matching
pattern of an unnamed cased object.
Can someone point me to where that was proposed and why it was rejected?
Dan Weston
Isaac Dupree wrote:
Duncan