base-4.7.0.0: Basic libraries

Copyright(c) The University of Glasgow 2002
License(c) The University of Glasgow 2002
Maintainerlibraries@haskell.org
Stabilityprovisional
Portabilitynon-portable (uses Text.ParserCombinators.ReadP)
Safe HaskellTrustworthy

Text.Read.Lex

Description

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

Synopsis

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

Number Number 
EOF 

hsLex :: ReadP StringSource

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

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

readOctP :: (Eq a, Num a) => ReadP aSource

readDecP :: (Eq a, Num a) => ReadP aSource

readHexP :: (Eq a, Num a) => ReadP aSource