3 ms·
Yes, LambdaCase only supports one argument. That covers the most common cases, such as foo >>= \case ... See the discussions at http://hackage.haskell.org/tra
by JoshTriplett 14y ago
Yes, LambdaCase only supports one argument. That covers the most common cases, such as foo >>= \case ...
See the discussions at http://hackage.haskell.org/trac/ghc/ticket/4359 http://hackage.haskell.org/trac/ghc/ticket/4359 and https://unknownparallel.wordpress.com/2012/07/09/the-long-and-epic-journey-of-lambdacase-2/ https://unknownparallel.wordpress.com/2012/07/09/the-long-an... for the history of this.
Multi-argument lambda case proves quite difficult to handle sanely, because normal non-lambda case doesn't do multiple arguments, just tuples. Having multiple arguments requires separating the pattern for each argument somehow, a problem that doesn't come up for non-lambda cases.