
On 07/06/2012 05:47 AM, Donn Cave wrote:
The `multi-clause lambda' seems more elegant, if the syntactical problems could be worked out. I mean, unnamed functions are thus just like named functions, something that you'd probably think to try just as soon as you needed the feature.
I don't understand the issues well enough with the layout rules to comment on Tyson Whitehead's ideas about that, and for the same reason this may be a useless idea, but what if each clause were introduced by \, would that clarify the column structure, or does indented block structure require a less-indented `layout herald'?
f = \ (Just a) (Just b) | a < 0 || b < 0 -> Nothing \ (Just a) (Just b) -> Just (a * b) \ _ _ -> Nothing
Donn This was suggested in the ticket comments, see http://hackage.haskell.org/trac/ghc/ticket/4359#comment:29 I'll add it to the list.