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

Copyright | (c) The GHC Team, 1997-2000
License | BSD-style (see the file libraries/base/LICENSE)
Maintainer | libraries@haskell.org
Stability | experimental
Portability | portable
Safe Haskell | None
Language | Haskell98

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