deepseq: instance NFData (a -> b)

Henning Thielemann lemming at henning-thielemann.de
Fri May 6 16:03:04 UTC 2016


On Fri, 6 May 2016, Ryan Scott wrote:

> Perhaps, if we wanted to retain the ability to use the NFData (a -> b)
> instance in limited scenarios (e.g., when you're writing an
> application and there's no risk of leaking orphan instances to other
> users), then we could also introduce a Control.DeepSeq.Functions
> module that exports an orphan NFData (a -> b) instance, and put a
> giant warning at the top stating that such an instance should be used
> responsibly. What say ye?

Since we got several problematic instances over time, we might also 
consider my proposal of warning about these instances on user demand:
    http://mail.haskell.org/pipermail/libraries/2016-March/026859.html
    https://ghc.haskell.org/trac/ghc/ticket/11796


More information about the Libraries mailing list