Simon Peyton-Jones | 6 Dec 10:06
Picon
Favicon
Gravatar

RE: Nested guards?

| Note that Clean also supports nested guards. See section 3.3 of the
| Clean language report:
|
| http://clean.cs.ru.nl/download/Clean20/doc/CleanRep2.0.pdf

Interesting, I didn't know that.

But (a) Clean guards don't bind, and pattern guards that bind was where this thread started.   And (b) the
Clean manual says: "To ensure that at least one of the alternatives of a nested guard will be successful, a
nested guarded alternative must always have a 'default case' as last alternative".  That's a pity.  The
main point about guards is that failure means "go on to the next equation", a semantics that they could have
chosen I guess.

Simon

Gmane