I like it!<br><br>Are the other sections available as well, e.g.,<br><br> (if False then else "Cafe") "Haskell" --> "Cafe"<br><br>- Conal<br><br><div class="gmail_quote">On Sat, Oct 2, 2010 at 11:23 AM, Max Bolingbroke <span dir="ltr"><<a href="mailto:batterseapower@hotmail.com">batterseapower@hotmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">Hi Cafe,<br>
<br>
I implemented the proposed Haskell' feature lambda-case/lambda-if [1]<br>
during the Haskell Implementors Workshop yesterday for a bit of fun.<br>
The patches are online [2, 3].<br>
<br>
The feature is demonstrated in this GHCi session:<br>
<br>
$ inplace/bin/ghc-stage2 --interactive -XLambdaCase<br>
GHCi, version 7.1.20101002: <a href="http://www.haskell.org/ghc/" target="_blank">http://www.haskell.org/ghc/</a> :? for help<br>
Loading package ghc-prim ... linking ... done.<br>
Loading package integer-gmp ... linking ... done.<br>
Loading package base ... linking ... done.<br>
Loading package ffi-1.0 ... linking ... done.<br>
Prelude> (if then "Haskell" else "Cafe") False<br>
"Cafe"<br>
Prelude> (case of 1 -> "One"; _ -> "Not-one") 1<br>
"One"<br>
Prelude> :q<br>
<br>
Do you like this feature and think it would be worth incorporating<br>
this into GHC? Or is it too specialised to be of use? If there is<br>
enough support, I'll create a ticket and see what GHC HQ make of it.<br>
<br>
Max<br>
<br>
[1] <a href="http://hackage.haskell.org/trac/haskell-prime/ticket/41" target="_blank">http://hackage.haskell.org/trac/haskell-prime/ticket/41</a><br>
[2] <a href="http://www.omega-prime.co.uk/files/LambdaCase-Testsuite.patch" target="_blank">http://www.omega-prime.co.uk/files/LambdaCase-Testsuite.patch</a><br>
[3] <a href="http://www.omega-prime.co.uk/files/LambdaCase-Compiler.patch" target="_blank">http://www.omega-prime.co.uk/files/LambdaCase-Compiler.patch</a><br>
_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</blockquote></div><br>