NFData

Don Stewart dons at galois.com
Fri Feb 27 12:18:25 EST 2009


Should NFData class and instances be in base?

Data.Strict ?

ganesh.sittampalam:
> Hi,
> 
> NFData seems to be the "standard" deepseq-style class these days, but it
> lives in Control.Parallel.Strategies in the parallel package whereas it
> obviously has uses beyond this. Is there a case for moving it into its
> own package and module?
> 
> I'd also like to add something like
> 
> strictly :: (Monad m, NFData a) => m a -> m a
> strictly ma = do a <- ma
>                  rnf a `seq` return a
> 
> The most important use for this would be to provide a standard way to do
> strict IO:
> 
> strictly $ readFile "..."
> strictly $ hGetContents ...
> 
> Thoughts?
> 
> Cheers,
> 
> Ganesh
> 
> =============================================================================== 
>  Please access the attached hyperlink for an important electronic communications disclaimer: 
>  http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html 
>  =============================================================================== 
>  
> _______________________________________________
> Libraries mailing list
> Libraries at haskell.org
> http://www.haskell.org/mailman/listinfo/libraries


More information about the Libraries mailing list