pretty-ghci-0.1.0.0: Functionality for beautifying GHCi

Safe HaskellNone
LanguageHaskell2010

Text.PrettyPrint.GHCi.Value.Lexer

Synopsis

Documentation

lexTokens :: String -> [Token] Source #

Turn a String into a list of Token. This may error out for particularly bad inputs (ex: unclosed string).

data Token Source #

Our somewhat simplified version of GHC Haskell tokens

Constructors

WhiteTok String 
NumberTok String 
StringTok String 
CharacterTok String 
OperatorTok String 
IdentifierTok String

we're overly liberal with what can be an identifier (so as to accomodate custom Show instances)

OpenParen 
CloseParen 
OpenBracket 
CloseBracket 
OpenBrace 
CloseBrace 
Comma 
Equal 
Instances
Eq Token Source # 
Instance details

Defined in Text.PrettyPrint.GHCi.Value.Lexer

Methods

(==) :: Token -> Token -> Bool #

(/=) :: Token -> Token -> Bool #

Show Token Source # 
Instance details

Defined in Text.PrettyPrint.GHCi.Value.Lexer

Methods

showsPrec :: Int -> Token -> ShowS #

show :: Token -> String #

showList :: [Token] -> ShowS #