
18 Feb
2018
18 Feb
'18
1:09 p.m.
-- Not valid Haskell!! Can't pattern match on constructor only... magic = \case Var -> id Not -> not And -> (&&) Or -> (||) If -> (==>) Iff -> (==)
This has often seemed to me to be a natural extension of case syntax. There is a short analysis in the following Reddit post: https://www.reddit.com/r/haskell/comments/7s0ski/lambdacase_in_the_wild/dt1z... I would be strongly in favour of adding an extension to do this (unless someone can find a reason that it couldn't work). Tom