A question about the "awkward squad"
Simon Marlow
simonmar at microsoft.com
Mon Dec 6 08:19:13 EST 2004
On 04 December 2004 04:27, Judah Jacobson wrote:
> What exactly are redex's, in this context,
Any expression which can be beta-reduced or case-reduced.
> and is it (still?) true that GHC never expands them?
I'm not sure if GHC guarantees never to duplicate a redex, Simon PJ
might know.
> Or are there certain types of redex's
> that aren't? Or is it just really complicated? :-) For example, if I
> understand this right, does it mean that in the classic top-level
> unsafePerformIO+NOINLINE hack, the NOINLINE is actually unnecessary in
> some or all cases?
Probably, yes. The reason being that currently unsafePeformIO itself is
marked NOINLINE, so GHC can't see its definition, so it won't ever
duplicate an expression of the form (unsafePerformIO e) because that
would duplicate an unbounded amount of work. The NOINLINE pragma is
useful documentation, though.
Cheers,
Simon
More information about the Glasgow-haskell-users
mailing list