Copyright | (c) The University of Glasgow 2002 |
---|---|
License | BSD-style (see the file libraries/base/LICENSE) |
Maintainer | libraries@haskell.org |
Stability | provisional |
Portability | non-portable (uses Text.ParserCombinators.ReadP) |
Safe Haskell | Trustworthy |
Language | Haskell2010 |
Text.Read.Lex
Description
The cut-down Haskell lexer, used by Text.Read
- data Lexeme
- data Number
- 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 Integer Source
Since: 4.5.1.0
numberToRational ∷ Number → Rational Source
Since: 4.6.0.0