-
Notifications
You must be signed in to change notification settings - Fork 139
-
Notifications
You must be signed in to change notification settings - Fork 139
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
Bits instances for strict and lazy bytestrings #110
Comments
Yes, I think this could be sensible. I guess it's a Bits instance in a similar way to how Integer is an instance right? |
This recently was discussed on reddit. To my understanding, the instance as you describe it makes sense, but there are some arguments against it that, for lack of greater elaboration, I don't really understand. I'd like to wait and think a little more before I go further with this. |
@andrewthad What did you conclude? |
I concluded that this just isn't a very useful thing to do. Any time I wanted to do this, the type I really wanted to be working with was a 128-bit word or a 256-bit word. Fortunately, the wide-word library provides a good implementation of a 128-bit word, and I have very nearly added a 256-bit word data type to it. Closing. |
There is a well-defined
Bits
instance for bytestrings. Implementations for some of the functions, likeshiftL
andpopCount
, are not readily available but could be written. I would be willing to contribute this if the maintainers are interested.The text was updated successfully, but these errors were encountered: