summaryrefslogtreecommitdiff
path: root/src/AST.hs
diff options
context:
space:
mode:
authorTom Smeding <tom@tomsmeding.com>2023-12-23 23:12:03 +0100
committerTom Smeding <tom@tomsmeding.com>2023-12-23 23:12:07 +0100
commitae603f2423e967c55dfd31b0dec26d19584aa322 (patch)
treed40ba193a58001453825c7f4dcd164767e327577 /src/AST.hs
parent37acb2efba1cd159bda5d163192e2aba70c4e26b (diff)
Can typecheck universe-polymorphic id
Diffstat (limited to 'src/AST.hs')
-rw-r--r--src/AST.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/AST.hs b/src/AST.hs
index ba018f5..d828e26 100644
--- a/src/AST.hs
+++ b/src/AST.hs
@@ -1,15 +1,15 @@
module AST where
-import Data.Map.Strict (Map)
+import Numeric.Natural
+import Data.Map.Strict (Map)
-data Nat = Z | S Nat
- deriving (Show)
type Name = String
data Term
= TSet Term -- ^ The n-th universe (n : Level)
+ | TSetw Natural -- ^ The n-th ω-universe
| TVar Name -- ^ variable
| TPi Name Term Term -- ^ Pi: (x : A) -> B
| TLam Name Term Term -- ^ λ(x : A). B
@@ -36,7 +36,7 @@ data Term
data Definition = Definition Name (OfType Term Term)
deriving (Show)
-type Env = Map Name Term
+type Env = Map Name (OfType (Maybe Term) Term)
data OfType a b = a :| b
deriving (Show)