Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove NFData instance for a -> b #47

Closed
wants to merge 2 commits into from

Conversation

chessai
Copy link
Member

@chessai chessai commented Jun 24, 2019

resolves #16

@cartazio
Copy link

@ekmett @hvr i was trying to understand the associated ticket: is the issue that functions / closures can't be deepseq'd wrt the references in their closure? or am i missing something about which sense its deemed unimplementable? (would some evil CMM of doom help?)

@hvr hvr added this to the 1.5.0.0 milestone Jun 26, 2019
@hvr
Copy link
Member

hvr commented Jun 26, 2019

note that this is for a next major version of deepseq -- a cost which I'm rather reluctant to impose upon the ecosystem (due to the amount of reverse deps) until there's breaking changes beyond the mere removal of the -> instance prompting a major version increment.

Btw, I'd like to know what other instances fall into the same category as NFData (a -> b) which ought not exist; I for one would think that if we consider the instance for a -> b to be unsound, we'd also consider IORef et al. to be unsound which similar to a->b also lack instances such as Show (see e.g. https://mail.haskell.org/libraries/2016-May/026966.html). It seems inconsistent to me to single out a -> b while tolerating other instances which IMO are morally similar in their uneval-thunk-leaking. And given we've had this instance for ages, I'd also want to see a rationale/justification documented for why there shall not be any a -> b instance in the Haddocks as a note.

@mixphix mixphix closed this Feb 21, 2023
@mixphix mixphix deleted the 16-remove-nfdata-function-instance branch February 21, 2023 15:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

remove instance NFData (a -> b)
4 participants