Safe Haskell | None |
---|---|
Language | Haskell2010 |
- readInteger :: String -> Maybe Integer
- readNatural :: String -> Maybe Natural
- readDouble :: String -> Maybe Double
- readFloatingExact :: String -> ReadFloatingCallback a -> Maybe a
Documentation
readInteger :: String -> Maybe Integer Source #
Read an Integer from a String
Consume an optional minus sign and many digits until end of string.
readNatural :: String -> Maybe Natural Source #
Read a Natural from a String
Consume many digits until end of string.
readFloatingExact :: String -> ReadFloatingCallback a -> Maybe a Source #
Read an Floating like number of the form:
Call a function with:
- A boolean representing if the number is negative
- The leading integral part
- The floating part (number of digits after fractional part, and number) if any
- The exponant if any
The code is structured as a simple state machine that: