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

Portability | portable
Stability | experimental
Maintainer | libraries@haskell.org
Safe Haskell | None

Language.Haskell.Lexer

Description

Lexer for Haskell.

# Documentation

data Token

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

Eq Token |
Show Token |

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