1module Language.Haskell.Lexer.Tokens where 2 3-- | Haskell token classifications: 4data Token 5 = Varid -- ^ Variable 6 | Conid -- ^ Constructor 7 | Varsym -- ^ Variable operator 8 | Consym -- ^ Constructor operator 9 | Reservedid -- ^ Reserved keyword 10 | Reservedop -- ^ Reserved operator 11 | Specialid 12 | IntLit -- ^ Integral numeric literal 13 | FloatLit -- ^ Fractional numeric literal 14 | CharLit -- ^ Character literal 15 | StringLit -- ^ String literal 16 17 18 | QQuote -- ^ Quasi quote: @[|text|stuff|]@ 19 20 | Qvarid -- ^ Qualified variable 21 | Qconid -- ^ Qualified constructor 22 | Qvarsym -- ^ Qualified variable operator 23 | Qconsym -- ^ Qualified constructor operator 24 25 | Special 26 | Whitespace -- ^ White space 27 28 | NestedCommentStart -- ^ Internal: causes a call to an external function 29 | NestedComment -- ^ A nested comment ({- ... -}) 30 | LiterateComment -- ^ Not handled by the lexer 31 32 | Commentstart -- ^ Dashes 33 | Comment -- ^ The stuff after the dashes 34 35 | ErrorToken | GotEOF | TheRest 36 37 | ModuleName | ModuleAlias -- ^ recognized in a later pass 38 39 -- Inserted during layout processing (see Haskell 98, 9.3): 40 | Layout -- ^ for implicit braces 41 | Indent Int -- ^ \<n\>, to preceed first token on each line 42 | Open Int -- ^ \{n\}, after let, where, do or of, if not followed by a \"{\" 43 deriving (Show,Eq,Ord) 44