ghc-internal-9.1201.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

GHC.Internal.Text.Read.Lex

Description

The cut-down Haskell lexer, used by GHC.Internal.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: base-4.6.0.0

EOF 

Instances

Instances details
Read Lexeme Source #

Since: base-2.1

Instance details

Defined in GHC.Internal.Read

Show Lexeme Source #

Since: base-2.1

Instance details

Defined in GHC.Internal.Text.Read.Lex

Eq Lexeme Source #

Since: base-2.1

Instance details

Defined in GHC.Internal.Text.Read.Lex

data Number Source #

Since: base-4.6.0.0

Instances

Instances details
Show Number Source #

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Text.Read.Lex

Eq Number Source #

Since: base-4.6.0.0

Instance details

Defined in GHC.Internal.Text.Read.Lex

numberToInteger :: Number -> Maybe Integer Source #

Since: base-4.5.1.0

numberToFixed :: Integer -> Number -> Maybe (Integer, Integer) Source #

Since: base-4.7.0.0

numberToRational :: Number -> Rational Source #

Since: base-4.6.0.0

numberToRangedRational :: (Int, Int) -> Number -> Maybe Rational Source #

Since: base-4.5.1.0

expect :: Lexeme -> ReadP () Source #

Since: base-4.7.0.0

hsLex :: ReadP String Source #

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

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

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 #