fix the most embarrassing quantity mistake ever

This commit is contained in:
rhiannon morris 2023-04-20 19:29:57 +02:00
parent 3f06e8d68b
commit a4ffd74625
2 changed files with 38 additions and 3 deletions

View file

@ -26,7 +26,7 @@ runTC defs =
export
popQs : Has ErrorEff fs => QOutput s -> QOutput (s + n) -> Eff fs (QOutput n)
popQs : Has ErrorEff fs => QContext s -> QOutput (s + n) -> Eff fs (QOutput n)
popQs [<] qout = pure qout
popQs (pis :< pi) (qout :< rh) = do expectCompatQ rh pi; popQs pis qout
@ -363,10 +363,10 @@ mutual
(qty, argty, res) <- expectPi !defs ctx funres.type
-- if Ψ | Γ ⊢ σ ⨴ π · s ⇐ A ⊳ Σ₂
argout <- checkC ctx (subjMult sg qty) arg argty
-- then Ψ | Γ ⊢ σ · f s ⇒ B[s] ⊳ Σ₁ + Σ₂
-- then Ψ | Γ ⊢ σ · f s ⇒ B[s] ⊳ Σ₁ + πΣ₂
pure $ InfRes {
type = sub1 res $ arg :# argty,
qout = funres.qout + argout
qout = funres.qout + qty * argout
}
infer' ctx sg (CasePair pi pair ret body) = do