lean4-htt/tests/lua/tc3.lua
Leonardo de Moura 606e6226c2 fix(kernel/type_checker): the type checker cache was not taking into account binder information
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-14 17:14:57 -07:00

14 lines
522 B
Lua

local env = empty_environment()
local t1 = mk_lambda("A", Type, mk_lambda("a", Var(0), Var(0)), binder_info(true))
local t2 = mk_lambda("A", Type, mk_lambda("a", Var(0), Var(0)))
print(t1)
print(t2)
local tc = type_checker(env)
local T1 = mk_pi("A", Type, mk_arrow(Var(0), Var(1)), binder_info(true))
local T2 = mk_pi("A", Type, mk_arrow(Var(0), Var(1)))
print(T1)
print(T2)
print(tc:check(t1))
print(tc:check(t2))
assert(tc:check(t1):binder_info():is_implicit())
assert(not tc:check(t2):binder_info():is_implicit())