lean2/tests/lua/env1.lua
2013-12-22 11:51:38 -08:00

10 lines
258 B
Lua

e = environment()
assert(is_environment(e))
e:add_uvar("M1")
print(e:get_uvar("M1"))
e:add_var("N", Type())
N, M = Consts("N M")
e:add_var("a", N)
x, a = Consts("x, a")
check_error(function() e:type_check(fun(x, M, a)) end)
print(e:type_check(fun(x, N, a)))