Skip to content

Fix GNFData instance for V1 #20

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

Merged
merged 1 commit into from
Aug 16, 2016
Merged

Fix GNFData instance for V1 #20

merged 1 commit into from
Aug 16, 2016

Conversation

treeowl
Copy link
Contributor

@treeowl treeowl commented Jul 18, 2016

Make grnf for V1 a well-defined function that forces its
(bottom) argument rather than making the function itself bottom.

Fixes #19

Make `grnf` for `V1` a well-defined function that forces its
(bottom) argument rather than making the function itself bottom.

Fixes haskell#19
@RyanGlScott
Copy link
Member

This looks reasonable to me. It might be worthwhile to add a note to the CHANGELOG.

Any objections to merging this, @hvr?

@hvr
Copy link
Member

hvr commented Aug 15, 2016

@RyanGlScott no objections :-)

I'm wondering as well if we want to mention this in the changelog... (since we're both considering it, we just should)

@RyanGlScott
Copy link
Member

@hvr I think it's worth mentioning, since it changes the way generically defined NFData instances behave. Before, they would unconditionally throw an error, regardless of whether the argument to grnf is let x = x in x or undefined. Now, if the argument truly does recurse infinitely when evaluated, then calling grnf will actually recurse infinitely, so you won't be able to observe this behavior with something like an exception handler.

@RyanGlScott RyanGlScott merged commit 6ca510a into haskell:master Aug 16, 2016
@hvr hvr added this to the 1.4.3 milestone Nov 17, 2016
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.

3 participants