seq / strictness and laziness

John Meacham john@repetae.net
Mon, 12 Nov 2001 13:59:56 -0800


yeah, I doublevote for deepSeq being part of the libraries or a
'blessed' extension. I would like to do things like deepSeq the abstract
tree of a compiled language then force a GC, thus making sure that the
original file text gets all cleaned up properly. deepSeq would be a much
nicer way of dealing with some efficiency issues since it can be
completly seperated from the implementation of code which generates a
data structure, rather than having to 'seq' at every step, you just
deepSeq the resulting structure.
	John

On Mon, Nov 12, 2001 at 08:58:06AM -0800, Hal Daume wrote:
> 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.     
> 
> As someone who also had this problem a while ago, I'm curious
> why DeepSeq never made it into the Libraries.  This would, imo,
> be something quite generally useful (and it would be really nice
> to be able to derive it).
> 
>  - Hal
> 
> _______________________________________________
> Haskell mailing list
> Haskell@haskell.org
> http://www.haskell.org/mailman/listinfo/haskell
> 

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@repetae.net
---------------------------------------------------------------------------