-
Notifications
You must be signed in to change notification settings - Fork 0
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
Purpose of this library #1
Comments
Good question. The main difference with Word is that Pos doesn't allow zero and does not provide a Num instance. Pos is designed to work with nonempty containers and in configuration where zero is invalid.
Not having a Num instance for Pos is annoying, but the primus package provides a Num1 class that is a safer alternative to Num that respects the bounds of those numbers. So there are Num1 instances for Natural/Word/Pos etc. |
Awesome, thank you very much for this explanation! |
Glad that helped. |
Hi, I'm reading the documentation of this library and I have a hard time determining the purpose of the
Pos
datatype, compared toWord
. Is there some advantage that I missed?The text was updated successfully, but these errors were encountered: