HsTokens.hs

module HsTokens where

-- Haskell token classifications:

data Token
  = Varid | Conid | Varsym | Consym
  | Reservedid | Reservedop  -- | Specialid
  | IntLit | FloatLit | CharLit | StringLit
  | Special
  | Qvarid | Qconid | Qvarsym | Qconsym
  | Whitespace

  | NestedComment -- will cause a call to an external function
  | Commentstart  -- dashes
  | ErrorToken
  | GotEOF
  | TheRest

  | Layout     -- for braces inserted by layout processing
  | Indent Int -- <n>, to preceed first token on each line, see Haskell 98, B.3 
  | Open Int   -- {n}, after let, where, do or of, if not followed by a "{"
  deriving (Show,Eq,Ord)

Plain-text version of HsTokens.hs | Valid HTML?