diff options
author | Tom Smeding <t.j.smeding@uu.nl> | 2024-01-20 23:25:51 +0100 |
---|---|---|
committer | Tom Smeding <t.j.smeding@uu.nl> | 2024-01-20 23:25:51 +0100 |
commit | 43b4a4e3564c602a0da9c7ea9a6fc8d60087cd6e (patch) | |
tree | deee0de9c359aebfb6c517d12002d519a83a3b07 /src/TypeCheck.hs | |
parent | 07a64a3096b1e48fd240d19e51f3448dd9402787 (diff) |
Diffstat (limited to 'src/TypeCheck.hs')
-rw-r--r-- | src/TypeCheck.hs | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/src/TypeCheck.hs b/src/TypeCheck.hs index 6777ec8..bc25419 100644 --- a/src/TypeCheck.hs +++ b/src/TypeCheck.hs @@ -97,17 +97,37 @@ inferW env term = do infer :: Env -> Term -> TM (OfType Term Term) infer env = \case + -- Γ |- t ~~> τ -- this is infer, dropping the term result (don't need that) + -- τ ~WHNF~> τ' + -- ---- + -- Γ |- t ~~>_W τ' + + + -- ---- + -- Set i : Set (isucc i) TSet i -> do return (TSet i :| TSet (TISucc i)) + -- ---- + -- Setω i : Setω (i + 1) TSetw i -> do return (TSetw i :| TSetw (succ i)) + -- x : τ \in Γ + -- ---- + -- Γ |- x : τ TVar n -> do case Map.lookup n env of Just (_ :| ty) -> return (TVar n :| ty) Nothing -> throw $ "Variable out of scope: " ++ n + -- Γ |- a ~~>_W τ₁ + -- Γ, x : a |- b ~~>_W τ₂ + -- k₁ <- ArgKind(τ₁) + -- k₂ <- ArgKind(τ₂) + -- τ <- ArgKindLower(k₁ <> k₂) + -- ---- + -- Γ |- Π (x : a) b : τ TPi x a b -> do inferW env a >>= \case a' :| (argumentKind -> Just kindA) -> do |