box type
This commit is contained in:
parent
37dd1ee76d
commit
8a9b4c23dd
15 changed files with 256 additions and 19 deletions
|
@ -390,6 +390,31 @@ tests = "typechecker" :- [
|
|||
Eq0 (Eq0 (FT "A") (FT "a") (FT "a")) (BVT 1) (BVT 0))
|
||||
],
|
||||
|
||||
"natural numbers" :- [
|
||||
testTC "0 · ℕ ⇐ ★₀" $ check_ empty szero Nat (TYPE 0),
|
||||
testTC "0 · ℕ ⇐ ★₇" $ check_ empty szero Nat (TYPE 7),
|
||||
testTCFail "1 · ℕ ⇍ ★₀" $ check_ empty sone Nat (TYPE 0),
|
||||
testTC "1 · zero ⇐ ℕ" $ check_ empty sone Zero Nat,
|
||||
testTC "1 · zero ⇍ ℕ×ℕ" $ check_ empty sone Zero (Nat `And` Nat),
|
||||
testTC "ω·n : ℕ ⊢ 1 · succ n ⇐ ℕ" $
|
||||
check_ (ctx [< ("n", Nat)]) sone (Succ (BVT 0)) Nat,
|
||||
testTC "1 · λ n ⇒ succ n ⇐ 1.ℕ → ℕ" $
|
||||
check_ empty sone ([< "n"] :\\ Succ (BVT 0)) (Arr One Nat Nat),
|
||||
todo "nat elim"
|
||||
],
|
||||
|
||||
"box types" :- [
|
||||
testTC "0 · [0.ℕ] ⇐ ★₀" $
|
||||
check_ empty szero (BOX Zero Nat) (TYPE 0),
|
||||
testTC "0 · [0.★₀] ⇐ ★₁" $
|
||||
check_ empty szero (BOX Zero (TYPE 0)) (TYPE 1),
|
||||
testTCFail "0 · [0.★₀] ⇍ ★₀" $
|
||||
check_ empty szero (BOX Zero (TYPE 0)) (TYPE 0)
|
||||
],
|
||||
|
||||
todo "box values",
|
||||
todo "box elim",
|
||||
|
||||
"misc" :- [
|
||||
note "0·A : Type, 0·P : A → Type, ω·p : (1·x : A) → P x",
|
||||
note "⊢",
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue