On 13/11/2011 01:30, David Terei wrote:
Hi all,
I've seen it said in various places that for Core the semantics are basically:
- case = only place evaluation occurs
- let = only place heap allocation occurs / thunk creation / introduce
laziness
These are both true after the CorePrep phase, but false before that.
There are two ways a "let" might not correspond to thunk creation:
- if it is strict (the binder's demand type tells you)
- if the right hand side has an unboxed type
In these two case, the "let" really means "case".
As you noticed, function and constructor arguments are not always
atomic. A non-atomic function argument can correspond to either a "let"
or a "case", depending on whether the function is strict or not.
CorePrep makes function arguments atomic and turns "let" into "case" as
appropriate.
Cheers,
Simon
_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc