-
Notifications
You must be signed in to change notification settings - Fork 15
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
Add a bitset newtype wrapper #113
Comments
Makes sense. PR welcome. EDIT: I'm not sure about name though. We have EDIT: |
FWIW, I wanted to clean up |
How about Bitwise? I'm not sure if there might be some other useful Bits-based lattice other than wrappers applied to this however (like something acting as a nested Lexicographic on bits), and it doesn't really indicate the idea of a set. I just added Bounded as they're bounds for the partial order, the docs on Bounded themselves say I have not had much luck with a show instance only requiring Bits. What I really need is a bit size that's argument dependent rather than a constant (and for read a function to check an argument can get another bit). Basically a partial isomorphism with [Bool]. The instance is possibly more hassle than it's worth over using stock show/read (either way a show instance is required by the tests). |
These would function the same as other set instances or n-tupled bool instances but efficiently via Bits and FiniteBits.
(Natural is an example of a Bits that is not a FiniteBits, and is undefined for complement)
The text was updated successfully, but these errors were encountered: