On Dec 6, 2007 9:06 AM, Simon Peyton-Jones <simonpj@microsoft.com> wrote:
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.
I brought this up some time ago on haskell-prime ( http://thread.gmane.org/gmane.comp.lang.haskell.prime/1561 ). One of the Clean guys mentioned that "the compiler can handle nested-guards with fall-throughs just fine" and that "The reason that a nested guard must have a default case is syntactical, otherwise there could be the dangling-else ambiguity". Bas