| Copyright | (c) The University of Glasgow 2002 | 
|---|---|
| License | (c) The University of Glasgow 2002 | 
| Maintainer | libraries@haskell.org | 
| Stability | provisional | 
| Portability | non-portable (uses Text.ParserCombinators.ReadP) | 
| Safe Haskell | Trustworthy | 
Text.Read.Lex
Description
The cut-down Haskell lexer, used by Text.Read
- data Lexeme
 - numberToInteger :: Number -> Maybe Integer
 - numberToFixed :: Integer -> Number -> Maybe (Integer, Integer)
 - numberToRational :: Number -> Rational
 - numberToRangedRational :: (Int, Int) -> Number -> Maybe Rational
 - lex :: ReadP Lexeme
 - expect :: Lexeme -> ReadP ()
 - hsLex :: ReadP String
 - lexChar :: ReadP Char
 - readIntP :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadP a
 - readOctP :: (Eq a, Num a) => ReadP a
 - readDecP :: (Eq a, Num a) => ReadP a
 - readHexP :: (Eq a, Num a) => ReadP a
 
Documentation
Haskell lexemes.
numberToInteger :: Number -> Maybe IntegerSource
numberToRational :: Number -> RationalSource