
I say no. An `IORef` is just a pointer, and forcing one to NF means
quite simply that you determine exactly where it points, which is
completely different from forcing whatever happens to be on the other
end. A function seems much more problematic.
On Sun, May 1, 2016 at 11:00 AM, Herbert Valerio Riedel
On 2016-05-01 at 16:51:45 +0200, Boespflug, Mathieu wrote:
[...]
This instance doesn't make much sense (to me at least) and is pretty problematic for apps that use NFData constraints as evidence that values are ground and fully evaluated (hence don't capture arbitrary resources). In HaskellR we use NFData constraints to make sure only fully evaluated ground data escapes the scope of a region. But functions are not a first-order values. They can leak arbitrary resources out of the scope of a region.
Are the recently added NFData instances for IORef/MVar problematic as well?
-- hvr _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries