fix case-box typing

This commit is contained in:
rhiannon morris 2023-04-01 16:01:29 +02:00
parent 1fce4d80f6
commit 036e2bd4a5

View file

@ -407,7 +407,7 @@ parameters {auto _ : IsQty q}
-- if Ψ | Γ, x : A ⊢ t ⇐ R[[x] ∷ [ρ.A/x]] ⊳ Σ₂, ς·x
-- with ς ≤ ρπσ
let qpisg = q * pi * sg.fst
bodyCtx = extendTy qpisg body.name boxres.type ctx
bodyCtx = extendTy qpisg body.name ty ctx
bodyType = substCaseBoxRet ty ret
bodyout <- checkC bodyCtx sg body.term bodyType >>= popQ qpisg
-- then Ψ | Γ ⊢ case ⋯ ⇒ R[b/x] ⊳ Σ₁ + Σ₂