-
Notifications
You must be signed in to change notification settings - Fork 11
UInt instances? #17
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
Comments
Looks like there was some previous discussion in #7 on this. From what I can tell, the outcome of that issue was the addition of an The Looking at the
|
I came here because I was looking for an Arbitrary instance for UInt. Is there a reason why we would not want to expose the Arbitrary instance in the API? |
I think providing something in terms of |
I would love a MonadGen PR @chtenb ... or Arbitrary, or whatever you think is best |
Right, so if chooseUInt :: forall gen. MonadGen gen => UInt -> UInt -> gen UInt
chooseUInt a b = fromInt $ chooseInt (toInt a) (toInt b) but we're using the Wouldn't it perhaps be better to add this to the quickCheck library instead then? The quickcheck lib would gain uint as a dependency, but that's a very small library. Another advantage would be that we could add Arbitrary while we're at it. |
You don't need the quickcheck dependency, you can just use the |
You're right @jamesdbrock |
We seem to have overlooked that genUInt already exists in |
Should we add some of these instances?
https://pursuit.purescript.org/packages/purescript-uint-instances/
The text was updated successfully, but these errors were encountered: