FW: Pattern guards vs. case (was, unfortunately :Re: interesting example of laziness/ghc optimisation)
1 Mar
2001
1 Mar
'01
7:21 p.m.
| * * * Ketil Malde <ketil@ii.uib.no> wrote: | | > ut - the converse is not true, is it? I can write | > | > ... = case foo of | > (Foo f) -> ... | > (Bar b) -> ... | > | > ut I can't express that as a pattern-guarded expression, can I? Check out http://research.microsoft.com/~simonpj/Haskell/guards.html which is implemented in GHC. Thus f x | Foo a <- x = ... | Bar b <- x = ... Simon
9278
Age (days ago)
9278
Last active (days ago)
0 comments
1 participants
participants (1)
-
Simon Peyton-Jones