base-4.3.1.0: Basic libraries

Portabilitynon-portable (uses Text.ParserCombinators.ReadP)
Stabilityprovisional
Maintainerlibraries@haskell.org

Text.Read.Lex

Description

The cut-down Haskell lexer, used by Text.Read

Documentation

data Lexeme Source

Haskell lexemes.

Constructors

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. foo, Baz

Symbol String

Haskell symbol, e.g. >>, :%

Int Integer

Integer literal

Rat Rational

Floating point literal

EOF

Instances

lex :: ReadP Lexeme Source

hsLex :: ReadP String Source

Haskell lexer: returns the lexed string, rather than the lexeme

lexChar :: ReadP Char Source

readIntP :: Num a => a -> (Char -> Bool) -> (Char -> Int) -> ReadP aSource

readOctP :: Num a => ReadP aSource

readDecP :: Num a => ReadP aSource

readHexP :: Num a => ReadP aSource

AltStyle によって変換されたページ (->オリジナル) /