diff options
author | Tom Smeding <tom@tomsmeding.com> | 2023-12-23 23:12:03 +0100 |
---|---|---|
committer | Tom Smeding <tom@tomsmeding.com> | 2023-12-23 23:12:07 +0100 |
commit | ae603f2423e967c55dfd31b0dec26d19584aa322 (patch) | |
tree | d40ba193a58001453825c7f4dcd164767e327577 /src/AST.hs | |
parent | 37acb2efba1cd159bda5d163192e2aba70c4e26b (diff) |
Can typecheck universe-polymorphic id
Diffstat (limited to 'src/AST.hs')
-rw-r--r-- | src/AST.hs | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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) |