Haskell 98 Revised

Ian Lynagh igloo@earth.li
Mon, 5 Nov 2001 19:55:45 +0000

On Sun, Nov 04, 2001 at 12:46:34AM +0000, Ian Lynagh wrote:
> Finally, ghci, hi and hugs seem to accept
> > instance Fractional Int where
> as a valid program, but the layout rule doesn't seem to specify how ot
> handle this (and as the last token is a new line token some simple fixes
> don't work).

Bother, completely forgot about this.

I think after

    If the first token after a let, where, do, or of keyword is not {,
    it is preceded by {n} where n is the indentation of the token.

(with s/token/lexeme/g as before) we need

    If there is no lexeme after a let, where, do, or of keyword then {0}
    is appended to the token stream.

(thus forcing implicit { }).