use constraints when checking δ
when checking δ 𝑖 ⇒ s, add 𝑖=ε to Ψ instead of checking s‹ε/𝑖›. this has the same effect but an error message will show "𝑖, 𝑖=ε" in the context
This commit is contained in:
parent
ac85dc9352
commit
4db373a84f
1 changed files with 8 additions and 5 deletions
|
@ -196,12 +196,15 @@ mutual
|
||||||
|
|
||||||
check' ctx sg (DLam body) ty = do
|
check' ctx sg (DLam body) ty = do
|
||||||
(ty, l, r) <- expectEq !ask ctx ty
|
(ty, l, r) <- expectEq !ask ctx ty
|
||||||
|
let ctx' = extendDim body.name ctx
|
||||||
|
ty = ty.term
|
||||||
|
body = body.term
|
||||||
-- if Ψ, i | Γ ⊢ σ · t ⇐ A ⊳ Σ
|
-- if Ψ, i | Γ ⊢ σ · t ⇐ A ⊳ Σ
|
||||||
qout <- checkC (extendDim body.name ctx) sg body.term ty.term
|
qout <- checkC ctx' sg body ty
|
||||||
-- if Ψ | Γ ⊢ t‹0› = l : A‹0›
|
-- if Ψ, i, i = 0 | Γ ⊢ t = l : A
|
||||||
equal ctx ty.zero body.zero l
|
equal (eqDim (BV 0) (K Zero) ctx') ty body (dweakT 1 l)
|
||||||
-- if Ψ | Γ ⊢ t‹1› = r : A‹1›
|
-- if Ψ, i, i = 1 | Γ ⊢ t = r : A
|
||||||
equal ctx ty.one body.one r
|
equal (eqDim (BV 0) (K One) ctx') ty body (dweakT 1 r)
|
||||||
-- then Ψ | Γ ⊢ σ · (δ i ⇒ t) ⇐ Eq [i ⇒ A] l r ⊳ Σ
|
-- then Ψ | Γ ⊢ σ · (δ i ⇒ t) ⇐ Eq [i ⇒ A] l r ⊳ Σ
|
||||||
pure qout
|
pure qout
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue