remove input qctx since it isn't used
This commit is contained in:
parent
846bbc9ca3
commit
c40e6a60ff
3 changed files with 48 additions and 63 deletions
|
@ -69,13 +69,8 @@ parameters (label : String) (act : Lazy (M ()))
|
|||
testTCFail = testThrows label (const True) $ runReaderT globals act
|
||||
|
||||
|
||||
ctxWith : DContext d -> Context (\i => (Term Three d i, Three)) n ->
|
||||
TyContext Three d n
|
||||
ctxWith dctx tqctx =
|
||||
let (tctx, qctx) = unzip tqctx in MkTyContext {dctx, tctx, qctx}
|
||||
|
||||
ctx : Context (\i => (Term Three 0 i, Three)) n -> TyContext Three 0 n
|
||||
ctx = ctxWith DNil
|
||||
ctx : TContext Three 0 n -> TyContext Three 0 n
|
||||
ctx = MkTyContext DNil
|
||||
|
||||
inferredTypeEq : TyContext Three d n -> (exp, got : Term Three d n) -> M ()
|
||||
inferredTypeEq ctx exp got =
|
||||
|
@ -170,17 +165,15 @@ tests = "typechecker" :- [
|
|||
],
|
||||
|
||||
"bound vars" :- [
|
||||
testTC "1·x : A ⊢ 1 · x ⇒ A ⊳ 1·x" $
|
||||
inferAsQ {n = 1} (ctx [< (FT "A", one)]) sone
|
||||
testTC "x : A ⊢ 1 · x ⇒ A ⊳ 1·x" $
|
||||
inferAsQ {n = 1} (ctx [< FT "A"]) sone
|
||||
(BV 0) (FT "A") [< one],
|
||||
testTC "1·x : A ⊢ 1 · [x] ⇐ A ⊳ 1·x" $
|
||||
checkQ {n = 1} (ctx [< (FT "A", one)]) sone (BVT 0) (FT "A") [< one],
|
||||
testTC "x : A ⊢ 1 · [x] ⇐ A ⊳ 1·x" $
|
||||
checkQ {n = 1} (ctx [< FT "A"]) sone (BVT 0) (FT "A") [< one],
|
||||
note "f2 : A ⊸ A ⊸ A",
|
||||
testTC "ω·x : A ⊢ 1 · f2 [x] [x] ⇒ A ⊳ ω·x" $
|
||||
inferAsQ {n = 1} (ctx [< (FT "A", Any)]) sone
|
||||
(F "f2" :@@ [BVT 0, BVT 0]) (FT "A") [< Any],
|
||||
note #"("0·x : A ⊢ 1 · x ⇒ A" won't fail because"#,
|
||||
note " a var's quantity is only checked once it leaves scope)"
|
||||
testTC "x : A ⊢ 1 · f2 [x] [x] ⇒ A ⊳ ω·x" $
|
||||
inferAsQ {n = 1} (ctx [< FT "A"]) sone
|
||||
(F "f2" :@@ [BVT 0, BVT 0]) (FT "A") [< Any]
|
||||
],
|
||||
|
||||
"lambda" :- [
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue