:: String -> Int is:exact -package:string-conversions -package:speculate -package:ghc-boot -package:hledger-lib package:ghc

Panics and asserts.
Panics and asserts.
Panics and asserts.
Convert to an Int. It is implementation-dependent what fromEnum returns when applied to a value that is too large to fit in an Int.
a constant function, returning the number of digits of floatRadix in the significand
exponent corresponds to the second component of decodeFloat. exponent 0 = 0 and for finite nonzero x, exponent x = snd (decodeFloat x) + floatDigits x. If x is a finite floating-point number, it is equal in value to significand x * b ^^ exponent x, where b is the floating-point radix. The behaviour is unspecified on infinite or NaN values.
The read function reads input from a string, which must be completely consumed by the input process. read fails with an error if the parse is unsuccessful, and it is therefore discouraged from being used in real applications. Use readMaybe or readEither for safe alternatives.
>>> read "123" :: Int
123
>>> read "hello" :: Int
*** Exception: Prelude.read: no parse
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. Default implementation based upon bitSizeMaybe provided since 4.12.0.0.
Return the number of set bits in the argument. This number is known as the population count or the Hamming weight. Can be implemented using popCountDefault if a is also an instance of Num.
Return the number of bits in the type of the argument. The actual value of the argument is ignored. Moreover, finiteBitSize is total, in contrast to the deprecated bitSize function it replaces.
finiteBitSize = bitSize
bitSizeMaybe = Just . finiteBitSize
Count number of zero bits preceding the most significant set bit.
countLeadingZeros (zeroBits :: a) = finiteBitSize (zeroBits :: a)
countLeadingZeros can be used to compute log base 2 via
logBase2 x = finiteBitSize x - 1 - countLeadingZeros x
Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.
Count number of zero bits following the least significant set bit.
countTrailingZeros (zeroBits :: a) = finiteBitSize (zeroBits :: a)
countTrailingZeros . negate = countTrailingZeros
The related find-first-set operation can be expressed in terms of countTrailingZeros as follows
findFirstSet x = 1 + countTrailingZeros x
Note: The default implementation for this method is intentionally naive. However, the instances provided for the primitive integral types are implemented using CPU specific machine instructions.
Sadness.
Default implementation for popCount. This implementation is intentionally naive. Instances are expected to provide an optimized implementation for their size.
Return the number of bits in the type of the argument. The actual value of the argument is ignored. Returns Nothing for types that do not have a fixed bitsize, like Integer.
See if this instruction is telling us the current C stack delta