John Lauchbury writes: > Simon's syntax also provides a viable alternative to @ patterns > f x @ (Just 3) y = e > f x y | Just 3 <- x = e > though it is slightly less convenient in certain contrived examples (but > very much less ad hoc). Reversing this idea, we have another syntax for Simon's generalised guards: f x y | x@(Just 3) = e This to me is nicer than re-using <- in a different setting. Ok, it means more than a one-symbol change to the grammar. Comments? Cheers, Simon -- Simon Marlow [EMAIL PROTECTED] University of Glasgow http://www.dcs.gla.ac.uk/~simonm/ finger for PGP public key
- Re: A new view of guards Simon L Peyton Jones
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards John Launchbury
- Re: A new view of guards Brian Boutel
- Re: A new view of guards Frank Christoph
- Re: A new view of guards Tony Davie
- Re: A new view of guards Andrew Moran
- Re: A new view of guards D. tweed
- Re: A new view of guards Greg Michaelson
- Re: A new view of guards Stefan Kahrs
- Re: A new view of guards Simon Marlow
- Re: A new view of guards Tony Davie
- Re: A new view of guards Libor Skarvada
- Re: A new view of guards Hans Aberg
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards Heribert Schuetz
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards Heribert Schuetz
- Re: A new view of guards Philip Wadler
- Re: A new view of guards Alex Ferguson
- Re: A new view of guards Heribert Schuetz