natural -package:nats
This lexeme parser parses a natural number (a non-negative whole
number). Returns the value of the number. The number can be specified
in
decimal,
hexadecimal or
octal. The number is
parsed according to the grammar rules in the Haskell report.
This token parser parses a natural number (a non-negative whole
number). Returns the value of the number. The number can be specified
in
decimal,
hexadecimal or
octal. The number is
parsed according to the grammar rules in the Haskell report.
Decode a
Natural.
>>> input natural "42"
42
Codec for natural values.
Not on Stackage, so not searched.
Natural number
Decode JSON number to GHC's
Natural (non negative)
This function requires
base >= 4.8.0
Encode JSON number to GHC's
Natural (non negative)
This function requires
base >= 4.8.0
The arbitrary-precision
Natural number type.
Compatibility module for pre ghc-bignum code.
Natural number
Invariant: numbers <= 0xffffffffffffffff use the
NS
constructor
Type representing arbitrary-precision non-negative integers.
>>> 2^100 :: Natural
1267650600228229401496703205376
Operations whose result would be negative
throw
(Underflow :: ArithException),
>>> -1 :: Natural
*** Exception: arithmetic underflow
Natural number
Invariant: numbers <= 0xffffffffffffffff use the
NS
constructor
Deprecated: It is no faster than (^)