base-4.6.0.1: Basic libraries

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

Text.Read.Lex

Description

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

Synopsis

Documentation

data Lexeme

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. >>, :%

Number Number 
EOF 

hsLex :: ReadP String

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

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