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.

30 lines
441 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. deriving (Eq, Show, Ord)
  19. data Token
  20. = Token { tokenClass :: TokenClass
  21. , tokStartLine :: !Int
  22. , tokStartCol :: !Int
  23. }
  24. deriving (Eq, Show, Ord)