Macros

Simon Marlow simonmar@microsoft.com
Mon, 7 May 2001 14:42:20 +0100


> Simon Marlow wrote:
> >=20
> > Well, simply extending the Haskell syntax to allow
> >=20
> >         \ p11 .. p1n -> e1
> >         ..
> >         pm1 .. pmn -> em
> >=20
> > (with appropriate layout) should be ok, but I haven't tried=20
> it.  Guarded
> > right-hand-sides could be allowed too.
>=20
> Introducing layout after \ will break a lot of programs. For example,
> consider the way >>=3D is often formatted:
>=20
> 	f >>=3D \x ->
> 	g >>=3D \y ->
> 	...
>=20
> I guess that's why Marcin suggested using a new keyword.

Ah yes, I forgot that lambda expressions are often used like that
(actually, I think that this use of the syntax is horrible, but that's
just MHO).

Cheers,
	Simon