decimal package:megaparsec

Parse an integer in the decimal representation according to the format of integer literals described in the Haskell report. If you need to parse signed integers, see the signed combinator. Warning: this function does not perform range checks.
Parse an integer in the decimal representation according to the format of integer literals described in the Haskell report. If you need to parse signed integers, see the signed combinator. Note: before the version 6.0.0 the function returned Integer, i.e. it wasn't polymorphic in its return type. Warning: this function does not perform range checks.
Parse an integer in the hexadecimal representation. The format of the hexadecimal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse “0x” or “0X” prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself. For example you can make it conform to the Haskell report like this:
hexadecimal = char 48 >> char' 120 >> L.hexadecimal
Warning: this function does not perform range checks.
Parse an integer in the hexadecimal representation. The format of the hexadecimal number is expected to be according to the Haskell report except for the fact that this parser doesn't parse “0x” or “0X” prefix. It is a responsibility of the programmer to parse correct prefix before parsing the number itself. For example you can make it conform to the Haskell report like this:
hexadecimal = char '0' >> char' 'x' >> L.hexadecimal
Note: before version 6.0.0 the function returned Integer, i.e. it wasn't polymorphic in its return type. Warning: this function does not perform range checks.