(Pattern) Guards in lambdas
ravi at bluespec.com
Fri Oct 20 14:13:20 EDT 2006
John Meacham wrote:
> On Thu, Oct 19, 2006 at 12:55:48PM +0100, Simon Marlow wrote:
>> As for extending lambda to allow multiple guards and/or multiple pattern
>> matches, I don't think we need that either. Lambda is a quiet syntax
>> and will be lost at the beginning of a sequence of pattern
>> matches/guards; it's best used for simple lambda expressions,
>> complicated pattern matches should be done using function equations.
> I think I would like to allow a (single) guard on a lambda. for
> assertion checking, I am a sucker for assertion checking and the more
> lightweight the better when it comes to that sort of thing.
I like idea of a single guard on a lambda as well. I think it simplifies
the language (slightly) by eliminating a special case where patterns are
allowed but guards are not.
More information about the Haskell-prime