Layout rule (again)

Ian Lynagh igloo@earth.li
Tue, 11 Dec 2001 23:16:39 +0000


I'm afraid it doesn't seem to be quite right yet  :-(

Consider

    instance Foo Maybe where
    foo = 5

=>

    {4}instance Foo Maybe where
    {4}foo = 5

=>

    {instance Foo Maybe where
    {}}foo = 5

The second {4} has meant there is no <4> to cause an implicit semicolon
to be inserted. This can be fixed by changing

L ({n}:ts) (m:ms) = { : (L ts (n:m:ms)) if n > m, (Note 1)
                  = { : } : (L ts (m:ms)) otherwise

to

L ({n}:ts) (m:ms) = { : (L ts (n:m:ms))           if n > m, (Note 1)
                  = { : } : (L (<n>:ts) (m:ms))   otherwise


Thanks
Ian, having a bad day, predominantly due to the layout rule  :-(