haskell-src-1.0.4.2: Support for manipulating Haskell source code

Copyright | (c) The GHC Team 1997-2000
License | BSD-3-Clause
Maintainer | Andreas Abel
Stability | stable
Portability | portable
Safe Haskell | None
Language | Haskell98

Language.Haskell.Lexer

Description

Lexer for Haskell.

# Documentation

data Token Source #

Constructors

VarId String |
QVarId (String, String) |
ConId String |
QConId (String, String) |
VarSym String |
ConSym String |
QVarSym (String, String) |
QConSym (String, String) |
IntTok Integer |
FloatTok Rational |
Character Char |
StringTok String |
LeftParen |
RightParen |
SemiColon |
LeftCurly |
RightCurly |
VRightCurly |
LeftSquare |
RightSquare |
Comma |
Underscore |
BackQuote |
DotDot |
Colon |
DoubleColon |
Equals |
Backslash |
Bar |
LeftArrow |
RightArrow |
At |
Tilde |
DoubleArrow |
Minus |
Exclamation |
KW_Case |
KW_Class |
KW_Data |
KW_Default |
KW_Deriving |
KW_Do |
KW_Else |
KW_Foreign |
KW_If |
KW_Import |
KW_In |
KW_Infix |
KW_InfixL |
KW_InfixR |
KW_Instance |
KW_Let |
KW_Module |
KW_NewType |
KW_Of |
KW_Then |
KW_Type |
KW_Where |
KW_As |
KW_Export |
KW_Hiding |
KW_Qualified |
KW_Safe |
KW_Unsafe |
EOF |

#### Instances

Instances details

Show Token Source # |
Instance details Defined in Language.Haskell.Lexer Methods showsPrec :: Int -> Token -> ShowS Source # show :: Token -> String Source # showList :: [Token] -> ShowS Source #
Eq Token Source # |
Instance details Defined in Language.Haskell.Lexer Methods (==) :: Token -> Token -> Bool Source # (/=) :: Token -> Token -> Bool Source #

lexer :: (Token -> P a) -> P a Source #