RE: Understanding strictness of ghc output

| 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. Simon | | 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@haskell.org | http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
participants (1)
-
Simon Peyton-Jones