Understanding strictness of ghc output

Tomasz Zielonka t.zielonka at students.mimuw.edu.pl
Tue Jun 22 09:17:41 EDT 2004


On Tue, Jun 22, 2004 at 01:52:44PM +0100, Malcolm Wallace wrote:
> 
> Same again.  Try
>    addHeight h  E        = h `seq` h
> 
> which, although it looks bizarre, actually forces the evaluation of h,
> whilst simply returning it does not.

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?

Best regards,
Tom

-- 
.signature: Too many levels of symbolic links


More information about the Glasgow-haskell-users mailing list