Understanding strictness of ghc output

Simon Peyton-Jones simonpj at microsoft.com
Tue Jun 22 09:44:46 EDT 2004

| Well, it is certainly the case that in a denotational sense the
| function is strict in h, because if h is bottom, the result is bottom.

Right.  And GHC's operational behaviour is faithful to the denotational
semantics. When GHC compiles the program, if h is bottom, the call will
not return.


| But my operational understanding is that h is a projection, that is,
| it is passed from argument to result unmodified.  The demand on h
| comes from the caller of the present function, which may or may not
| be strict in that result.  Thus, the function code itself here does
| not force the evaluation of h.
| Regards,
|     Malcolm
| _______________________________________________
| Glasgow-haskell-users mailing list
| Glasgow-haskell-users at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

More information about the Glasgow-haskell-users mailing list