[Haskell-cafe] deepSeq vs rnf
Malcolm Wallace
Malcolm.Wallace at cs.york.ac.uk
Mon Nov 27 08:52:42 EST 2006
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,
> >
> > 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?
Well, "NormalForm" perhaps, cryptic abbreviations like NF, no. But that
aside, I hadn't realised you were proposing to move so little. Would it
not be useful to have a lot more of the evaluation strategy stuff widely
available, even to sequential programs?
Regards,
Malcolm
More information about the Libraries
mailing list