-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Add Uniform and UniformRM instances. #183
Conversation
Thanks for the PR! This compiles with As the ecosystem is still catching up with instance UniformRange a => UniformRange (V2 a) where
uniformRM (V2 x1 y1, V2 x2 y2) g = V2 <$> uniformRM (x1, x2) g <*> uniformRM (y1, y2) g Also, the |
How hard would it be to also add instances for |
…nstances of Uniform and UniformRange.
In my new commit, I added explicit |
Also, we need conditional compilation of the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! This looks good to me.
Why do you set the default value of
MIN_VERSION_*
macros to 1?
Judging from fbef54e, I think this was a technique that was required for old versions of HLint and when trying to compile the library code with bare GHC (way back when that was a somewhat common thing to do). Nowadays, HLint can handle CPP just fine, and building library code with a build tool like cabal
is pretty much the standard. As such, we could probably remove these MIN_VERSION_*
macro redefinitions. (No need to do so as part of this PR, however. I can do that separately.)
As suggested in #183 (review)
Resolves #182.