2014-05-20 16:56:27 +00:00
|
|
|
local env = environment()
|
2014-07-22 16:43:18 +00:00
|
|
|
local m = mk_metavar("m", mk_arrow(Prop, Prop))
|
|
|
|
local a = Local("a", Prop)
|
2014-05-20 16:56:27 +00:00
|
|
|
print(env:normalize(Fun(a, m)))
|
|
|
|
print(env:normalize(Fun(a, m(a))))
|
2014-07-22 16:43:18 +00:00
|
|
|
local m2 = mk_metavar("m2", mk_arrow(Prop, Prop, Prop))
|
2014-05-20 16:56:27 +00:00
|
|
|
print(env:normalize(Fun(a, (m2(a))(a))))
|
2014-06-22 16:00:04 +00:00
|
|
|
print("step1")
|
2014-05-20 16:56:27 +00:00
|
|
|
env:type_check(m)
|
2014-06-22 16:00:04 +00:00
|
|
|
print("step2")
|
2014-05-20 16:56:27 +00:00
|
|
|
env:type_check(Fun(a, m(a)))
|
2014-06-22 16:00:04 +00:00
|
|
|
print("step3")
|
2014-05-20 16:56:27 +00:00
|
|
|
env:type_check(Fun(a, (m2(a))(a)))
|
|
|
|
local m3 = mk_metavar("m3", mk_metavar("m4", mk_sort(mk_meta_univ("l"))))
|
2014-06-22 16:00:04 +00:00
|
|
|
print("step4")
|
2014-05-20 16:56:27 +00:00
|
|
|
env:type_check(m3)
|
2014-06-22 16:00:04 +00:00
|
|
|
print("step5")
|
2014-06-26 20:35:36 +00:00
|
|
|
print(env:type_check(m3(a)))
|
2014-06-22 16:00:04 +00:00
|
|
|
print("before end")
|