[Haskell-cafe] bitSize

Andrew Coppin andrewcoppin at btinternet.com
Thu Aug 25 19:57:37 CEST 2011

Quoting the Haddock documentation for Data.Bits.bitSize:

"Return the number of bits in the type of the argument. The actual value 
of the argument is ignored. The function bitSize is undefined for types 
that do not have a fixed bitsize, like Integer."

Does anybody else think it would be *far* more useful if bitSize applied 
to an Integer would tell you how many bits that particular Integer is 
using? Especially given that it can vary?

Is there a way to actually determine how many bits are in an Integer?

More information about the Haskell-Cafe mailing list