
Today I ran across exactly your case. In non-pure languages you would just write 'case foo of'. I would be happy with just 'function':
get >>= function ... -> ... ... -> ...
Well, simply extending the Haskell syntax to allow \ p11 .. p1n -> e1 .. pm1 .. pmn -> em (with appropriate layout) should be ok, but I haven't tried it. Guarded right-hand-sides could be allowed too. Cheers, Simon

Simon Marlow wrote:
Well, simply extending the Haskell syntax to allow
\ p11 .. p1n -> e1 .. pm1 .. pmn -> em
(with appropriate layout) should be ok, but I haven't tried it. Guarded right-hand-sides could be allowed too.
Introducing layout after \ will break a lot of programs. For example, consider the way >>= is often formatted: f >>= \x -> g >>= \y -> ... I guess that's why Marcin suggested using a new keyword. - Andreas -- Andreas Rossberg, rossberg@ps.uni-sb.de "Computer games don't affect kids. If Pac Man affected us as kids, we would all be running around in darkened rooms, munching pills, and listening to repetitive music."
participants (2)
-
Andreas Rossberg
-
Simon Marlow