2013-11-10 17:11:44 +00:00
|
|
|
e = environment()
|
|
|
|
assert(is_environment(e))
|
2013-11-18 02:11:44 +00:00
|
|
|
e:add_uvar("M1")
|
|
|
|
print(e:get_uvar("M1"))
|
2013-11-10 17:11:44 +00:00
|
|
|
e:add_var("N", Type())
|
|
|
|
N, M = Consts("N M")
|
|
|
|
e:add_var("a", N)
|
|
|
|
x, a = Consts("x, a")
|
2013-11-10 17:23:05 +00:00
|
|
|
check_error(function() e:check_type(fun(x, M, a)) end)
|
|
|
|
print(e:check_type(fun(x, N, a)))
|