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
561 B

  1. module Presyntax.Presyntax where
  2. import Data.Text (Text)
  3. data Plicity
  4. = Im | Ex
  5. deriving (Eq, Show, Ord)
  6. data Expr
  7. = Var Text
  8. | App Plicity Expr Expr
  9. | Pi Plicity Text Expr Expr
  10. | Lam Plicity Text Expr
  11. | Sigma Text Expr Expr
  12. | Pair Expr Expr
  13. | Proj1 Expr
  14. | Proj2 Expr
  15. | Span Expr Posn Posn
  16. deriving (Eq, Show, Ord)
  17. data Statement
  18. = Decl Text Expr
  19. | Defn Text Expr
  20. deriving (Eq, Show, Ord)
  21. data Posn
  22. = Posn { posnLine :: {-# UNPACK #-} !Int
  23. , posnColm :: {-# UNPACK #-} !Int
  24. }
  25. deriving (Eq, Show, Ord)