John Meacham wrote:

you can make things somewhat better with this construct

foo = do
        baz
        if cond then return bar else do
        bua
        bam

Except that this is invalid according to the Haskell report. In note 1 in section 9.3 (Layout), the report explicitly states that "A nested context must be further indented than the enclosing context". While hugs and ghc incorrectly accept your code, hbc and nhc98 get it right, i.e., they raise a parse error on it.

Wolfgang

_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to