[Haskell-cafe] deepSeq vs rnf

Ross Paterson ross at soi.city.ac.uk
Fri Nov 24 13:22:38 EST 2006


On Fri, Nov 24, 2006 at 02:53:45PM +0000, Malcolm Wallace wrote:
> Ross Paterson <ross at soi.city.ac.uk> wrote:
> > Perhaps it would make sense to move all the NFData material to a new
> > module called, say, Control.NormalForm, and maybe add a deepSeq
> > function there.  Control.Parallel.Strategies is a somewhat surprising
> > place to find normal form functions, and most of the people who are
> > using them aren't thinking about parallelism.
> 
> Agreed.  [ Bikeshed time:  Control.Evaluation.Strategies anyone? ]

The suggestion is a module containing just class NFData, instances for
Prelude types, and perhaps

	deepSeq :: NFData a => a -> b -> b
	deepSeq x y = rnf x `seq` y

Shouldn't it have something like NF in the name?



More information about the Libraries mailing list