less prototype, less bad code implementation of CCHM type theory
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
454 B

  1. module Presyntax.Tokens where
  2. import Data.Text (Text)
  3. data TokenClass
  4. = TokVar Text
  5. | TokEof
  6. | TokLambda
  7. | TokArrow
  8. | TokOParen
  9. | TokOBrace
  10. | TokCParen
  11. | TokCBrace
  12. | TokStar
  13. | TokColon
  14. | TokEqual
  15. | TokComma
  16. | TokPi1
  17. | TokPi2
  18. | TokSemi
  19. deriving (Eq, Show, Ord)
  20. data Token
  21. = Token { tokenClass :: TokenClass
  22. , tokStartLine :: !Int
  23. , tokStartCol :: !Int
  24. }
  25. deriving (Eq, Show, Ord)