<div dir="auto">Just to cheerlead Tom, as I have nothing to add but wouldn't want it to seem like no one agreed, I also think this is a great idea. The objection on the Reddit thread about dependent functions isn't prohibitive: both of these features will be GHC extensions anyway. They can be exclusive.</div><div class="gmail_extra"><br><div class="gmail_quote">On Feb 18, 2018 05:11, "Tom Ellis" <<a href="mailto:tom-lists-haskell-cafe-2013@jaguarpaw.co.uk">tom-lists-haskell-cafe-2013@jaguarpaw.co.uk</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
> -- Not valid Haskell!! Can't pattern match on constructor only...<br>
> magic = \case<br>
>     Var -> id<br>
>     Not -> not<br>
>     And -> (&&)<br>
>     Or -> (||)<br>
>     If -> (==>)<br>
>     Iff -> (==)<br>
<br>
This has often seemed to me to be a natural extension of case syntax.  There<br>
is a short analysis in the following Reddit post:<br>
<br>
    <a href="https://www.reddit.com/r/haskell/comments/7s0ski/lambdacase_in_the_wild/dt1zzyy/" rel="noreferrer" target="_blank">https://www.reddit.com/r/<wbr>haskell/comments/7s0ski/<wbr>lambdacase_in_the_wild/<wbr>dt1zzyy/</a><br>
<br>
I would be strongly in favour of adding an extension to do this (unless<br>
someone can find a reason that it couldn't work).<br>
<br>
Tom<br>
______________________________<wbr>_________________<br>
Haskell-Cafe mailing list<br>
To (un)subscribe, modify options or view archives go to:<br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-<wbr>bin/mailman/listinfo/haskell-<wbr>cafe</a><br>
Only members subscribed via the mailman list are allowed to post.</blockquote></div></div>