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

isNaN should be available #138

Closed
pcarbonn opened this issue Feb 15, 2019 · 2 comments

Comments

Projects
None yet
2 participants
@pcarbonn
Copy link
Contributor

commented Feb 15, 2019

isNaN (and RealFloat) is missing in Relude.Base, while it is present in Base Prelude.

Is there any reason for that ? How can I fix it ?

@pcarbonn

This comment has been minimized.

Copy link
Contributor Author

commented Feb 15, 2019

workaround: I import RealFloat from GHC.Float

import GHC.Float (RealFloat)

@chshersh chshersh added the reexport label Feb 16, 2019

@chshersh chshersh added this to the v0.5.0: Improvements milestone Feb 16, 2019

@chshersh

This comment has been minimized.

Copy link
Member

commented Feb 16, 2019

@pcarbonn Thanks for opening the issue! I don't see any particular reason why we shouldn't reexport RealFloat so I'm okay with reexporting this typeclass and isNaN function. Not sure about all functions, some names look common enough so they could conflict with something. As a safe solution I propose to reexport the following:

import GHC.Float (RealFloat (isNaN, isInfinite, isDenormalized, isNegativeZero, isIEEE))

Note, that in relude-0.5.0 all numeric-related functions were moved to the Relude.Numeric module so this reexport should go there:

Feel free to open pull request, I really appreciate this 🙂

@pcarbonn pcarbonn referenced this issue Feb 20, 2019

Merged

[#138] + RealFloat #142

4 of 10 tasks complete

chshersh added a commit that referenced this issue Feb 21, 2019

[#138] + RealFloat (#142)
* + RealFloat

* update CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.