layout rule infelicity

Jon Fairbairn Jon.Fairbairn@cl.cam.ac.uk
Thu, 30 May 2002 16:19:17 +0100


I wrote:
> > Can someone remind me why the "A close brace is also inserted wheneve=
r
> > the syntactic category containing the layout list ends" part
> > of the rule is there?

Lennart wrote:
> It's so you can write
>     let x =3D 2+2 in x*x
>  (and similar things)

and Arjan van IJzendoorn wrote:
> x =3D (3, case True of =

>              True -> 4)
> =

> The ')' ends the syntactic category 'tuple'

So we get all this misery just so that people can cram
things onto fewer lines?

>     let x =3D 2+2 in x*x

could be

> let {x =3D 2+2} in x*x

or

> let x =3D 2+2
>  in x*x

and =

> x =3D (3, case True of =

>              True -> 4
>     )

would be fine.

I'd like to see a "-fuse-simpler-layout-rule"=B9 option on the
compilers. . .


  J=F3n

1. Why "-f" anyway? It took me ages to work out what
"-fallow-overlapping-instances" meant -- I wondered how
"fallow" could apply to overlapping instances.


-- =

J=F3n Fairbairn                                 Jon.Fairbairn@cl.cam.ac.u=
k
31 Chalmers Road                                         jf@cl.cam.ac.uk
Cambridge CB1 3SZ            +44 1223 570179 (after 14:00 only, please!)