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

Instances for Fixed #76

Open
lehins opened this issue Jul 1, 2020 · 2 comments
Open

Instances for Fixed #76

lehins opened this issue Jul 1, 2020 · 2 comments

Comments

@lehins
Copy link
Contributor

lehins commented Jul 1, 2020

One more type from base that is missing some instances.

I think I can see a lawful implementation for HasResolution e => UniformRange (Fixed e) instance. Also considering that we already have instance Random Integer we can definitely add instance HasResolution e => Random (Fixed e)

@Shimuuar
Copy link
Contributor

Shimuuar commented Jul 1, 2020

For a change I think UniformRange is perfectly reasonable instance. Only question is what should random return? I think it should follow Dounle/Float/proposed instance for Rationals and return numbers in [0,1] range.

@lehins
Copy link
Contributor Author

lehins commented Jul 1, 2020

Yes, [0, 1] range for Random is also what I had in mind.

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

No branches or pull requests

2 participants