
21 Jun
2020
21 Jun
'20
6:40 p.m.
The documentation for these functions in Data.Bits say that these functions do not evaluate their arguments. This wording is a bit strange to me, since it seems that does not exactly mean that any such implementation _must not_ evaluate its argument. This may be an issue when dealing with types whose inhabitants have finite but not necessarily fixed sizes. For example, there is a valid Bits instance for strict ByteString, which is finite but not fixed-size. My question is, should the wording be changed to be a bit clearer? Or should this restriction exist in the first place?