base-4.11.0.0: Basic libraries

Copyright(c) The University of Glasgow 2002
LicenseBSD-style (see the file libraries/base/LICENSE)
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (uses Text.ParserCombinators.ReadP)
Safe HaskellTrustworthy
LanguageHaskell2010

Text.Read.Lex

Description

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

Synopsis

Documentation

data Lexeme Source #

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

Since: 4.6.0.0

EOF 
Instances
Eq Lexeme Source # 
Instance details
Read Lexeme Source #

Since: 2.1

Instance details
Show Lexeme Source # 
Instance details

data Number Source #

Since: 4.7.0.0

Instances
Eq Number Source # 
Instance details
Show Number Source # 
Instance details

expect :: Lexeme -> ReadP () Source #

Since: 4.7.0.0

hsLex :: ReadP String Source #

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

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

readOctP :: (Eq a, Num a) => ReadP a Source #

readDecP :: (Eq a, Num a) => ReadP a Source #

readHexP :: (Eq a, Num a) => ReadP a Source #