Integer
Arbitrary-precision integers.
This lexeme parser parses an integer (a whole number). This parser is like natural except that it can be prefixed with sign (i.e. '-' or '+'). 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.
Used for overloaded and non-overloaded literals. We don't have a good way to represent non-overloaded literals at the moment. Maybe that doesn't matter?
This Haskell library is a simple implementation of half-integers. That is, it provides a type that can represent both normal integers and integers plus a half. Changes: * Fixed documentation glitches. * Added Integral contexts to some functions.
Version 1.2.1
readInteger reads an Integer from the beginning of the ByteString. If there is no integer at the beginning of the string, it returns Nothing, otherwise it just returns the int read, and the rest of the string.