Understanding strictness of ghc output

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Tue Jun 22 11:27:48 EDT 2004

On Tue, Jun 22, 2004 at 02:28:21PM +0100, Simon Peyton-Jones wrote:
> | That contradicts my intution for seq. I would read it as "h is forced
> | before h is forced", and I would think that (h `seq` h) is equivalent
> | to h.
> | 
> | Were I am wrong?
> You're not wrong -- Malcolm is.  The function is certainly strict in h,
> and GHC finds it.  

I will only add that I am aware that my wording is imprecise. It's more
like "Forcing (a `seq` b) forces a, then forces b, and then returns the
value of b, unless a is bottom or b is bottom - in which case it returns

Best regards,

.signature: Too many levels of symbolic links

More information about the Glasgow-haskell-users mailing list