[Haskell-cafe] problem with IO, strictness, and "let"

Derek Elkins derek.a.elkins at gmail.com
Fri Jul 13 20:29:49 EDT 2007

On Fri, 2007-07-13 at 17:20 -0700, Michael Vanier wrote:
> Stefan,
> Thanks for your comments, as always.
> What I meant by really-truly-absolutely-I-mean-right-now-seq is something that would evaluate its 
> argument as far as it is possible to do so i.e. something that forces strict evaluation of an 
> argument.  That's what I thought seq did, but now I see I was wrong; it only "goes one deep" as it 
> were.  In fact, as you say, seq is not defined in terms of evaluation; all that it guarantees is 
> that its first argument is either (a) bottom, in which the result of the entire seq is bottom, or 
> (b) not bottom.  To do so it has to evaluate the first argument only far enough to show bottom-ness 
> or not, which is not strict evaluation as I understand it.  So am I right in saying that Haskell has 
> no way to force strict evaluation?  Or am I confused as to the correct definition of "strict"?

There's no polymorphic reduce to normal form function, though one could
be implemented as a primitive.  There are two typeclasses for this, the
DeepSeq library that floats around and NFData in
Control.Parallel.Strategies (with method rnf, wonder where they got

This is not unreasonable.  seq being polymorphic is a significant source
of woe (it was not always so).

More information about the Haskell-Cafe mailing list