cvs commit: fptools/ghc/lib/std PrelIO.hsc
Simon Marlow
simonmar@microsoft.com
Tue, 18 Sep 2001 09:26:56 +0100
> Mon, 17 Sep 2001 09:21:41 -0700, Simon Marlow=20
> <simonmar@glass.cse.ogi.edu> pisze:
>=20
> > Subvert GHC's full-laziness optimisation by explicitly=20
> lambda-lifting
> > a local lambda expression to the top level, and exporting=20
> it to ensure
> > it doesn't get inlined.
>=20
> Why would {-# NOINLINE #-} not work?
Yes, that would be a better way to do it.
> > Without this hack, full-laziness will float out several
> > subexpressions, which turns out to be a pessimisation in=20
> this case.
>=20
> Is it possible to improve the compiler for such cases?
Keith Wansborough's usage type system is designed to handle these cases,
but it's a way off being ready. We've been discussing other ways of
getting some of the benefit without too much work, but haven't settled
on anything yet.
Cheers,
Simon