<div dir="ltr">Small request: could you bump the upper bound to allow base 4? ;)<br></div><br><div class="gmail_quote">On Wed, Apr 22, 2015 at 10:50 AM Edward Z. Yang <<a href="mailto:ezyang@mit.edu">ezyang@mit.edu</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hello all,<br>
<br>
Taking the appropriate suggestion, I have created a small<br>
package to provide this functionality:<br>
<br>
<a href="https://hackage.haskell.org/package/nf" target="_blank">https://hackage.haskell.org/package/nf</a><br>
<br>
If it migrates into deepseq, we can update this package to reexport<br>
the appropriate modules from deepseq when it is available.<br>
<br>
Please let me know if there's anything (e.g. version bounds) which<br>
I can do to make this more "enterprise" ready.<br>
<br>
Cheers,<br>
Edward<br>
<br>
Excerpts from Edward Z. Yang's message of 2015-02-10 08:46:37 +0000:<br>
> I propose the following (abstract) data type, functions, and instance be<br>
> added to deepseq (naming amenable to bikeshedding):<br>
><br>
> newtype NF a = NF a -- abstract<br>
> makeNF :: NFData a => a -> NF a<br>
> getNF :: NF a -> a<br>
> instance NFData (NF a) where<br>
> rnf x = x `seq` ()<br>
><br>
> NF is an abstract data type representing data which has been evaluated<br>
> to normal form; the guarantee specifically is, if NF is in whnf, then<br>
> it is in nf. Crucially, when we have 'NF a', we ONLY need to seq it<br>
> in order to assure that it is fully evaluated.<br>
><br>
> This guarantee is sufficient for a variety of cases where<br>
> normal data is necessary, e.g. when transmitting data over Channels.<br>
> For example, from the monad-par library 'put_' could be used in place<br>
> of 'put' with this type signature.<br>
><br>
> put_ :: IVar (NF a) -> (NF a) -> Par ()<br>
><br>
> Cheers,<br>
> Edward<br>
_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org" target="_blank">Libraries@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries</a><br>
</blockquote></div>