bug in language definition (strictness)

Simon Peyton-Jones simonpj at microsoft.com
Tue Sep 1 17:56:07 EDT 2009

| This suggests a natural implementation (and specification) for pseq,
| pseq :: a -> b -> b
| pseq x y = x `seq` lazy y
| where lazy :: a -> a is a compiler provided function equivalent to 'id'
| except that it is considered lazy in its argument by the strictness
| analyzer.

Exactly so!  Here is the definition of `pseq` in GHC.Conc:

Conc.lhs:368:pseq :: a -> b -> b
Conc.lhs:369:pseq  x y = x `seq` lazy y

And 'lazy' is documented in the user manual:


More information about the Haskell-prime mailing list