Q: Forcing repeated evaluation

Simon Marlow simonmar@microsoft.com
Wed, 18 Sep 2002 11:21:45 +0100


> From: D. Tweed [mailto:tweed@compsci.bristol.ac.uk]=20
>
> Note that (assuming that I'm not missing something) you can=20
> prevent the
> moving of expressions involving l in a very ugly way by=20
> noting that these
> `dummy argument functions' are polymorphic so that you could write
>=20
> x1 =3D f1 (l 1)
> x2 =3D f2 x1 (l 2)
> x3 =3D f3 x2 (l 3)

Please don't encourage this sort of thing.  If two expressions are
semantically equivalent, there's always a chance that the compiler will
replace one by the other or common them up.=20

In this case, I believe GHC's worker-wrapper transformation will do it.

Cheers,
	Simon