seq / strictness and laziness

Amanda Clare ajc99@aber.ac.uk
Mon, 12 Nov 2001 16:36:29 +0000


Dean Herington wrote:
> 
> `seq` forces evaluation of only the top-level construct in its first
> argument.  (($!) similarly for its second argument.)  I would guess your
> "newcounts" are structured (probably a tuple or list), in which case you are
> not forcing evaluation deeply enough.  See
> http://haskell.org/pipermail/haskell/2001-August/001581.html and followup
> article.


Thanks, that's just what I need. It works! Perhaps if this is becoming a
frequently asked question, there should be a mention of this problem in
the Haskell report where seq is described. 

Amanda
--
Amanda Clare  http://users.aber.ac.uk/ajc99/
Tel: +44 (0)1970 621922  Fax: +44 (0)1970 622455
Dept. of Computer Science, University of Wales, Aberystwyth, SY23 3DB