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 |
The cut-down Haskell lexer, used by GHC.Internal.Text.Read
Synopsis
- 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
- readBinP :: (Eq a, Num a) => ReadP a
- 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
- isSymbolChar :: Char -> Bool
Documentation
Char Char | Character literal |
String String | String literal, with escapes interpreted |
Punc String | Punctuation or reserved symbol, e.g. |
Ident String | Haskell identifier, e.g. |
Symbol String | Haskell symbol, e.g. |
Number Number | @since base-4.6.0.0 |
EOF |
@since base-4.6.0.0
numberToRational :: Number -> Rational Source #
@since base-4.6.0.0
isSymbolChar :: Char -> Bool Source #