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
Closed

isNaN should be available #138

pcarbonn opened this issue Feb 15, 2019 · 2 comments
Labels
reexport Reexport something new

Comments

@pcarbonn
Copy link
Contributor

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
Copy link
Contributor Author

workaround: I import RealFloat from GHC.Float

import GHC.Float (RealFloat)

@chshersh chshersh added the reexport Reexport something new label Feb 16, 2019
@chshersh chshersh added this to the v0.5.0: Improvements milestone Feb 16, 2019
@chshersh
Copy link
Contributor

@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 mentioned this issue Feb 20, 2019
10 tasks
chshersh pushed a commit that referenced this issue Feb 21, 2019
* + RealFloat

* update CHANGELOG
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
reexport Reexport something new
Projects
None yet
Development

No branches or pull requests

2 participants