2013-12-26 19:49:04 -08:00
|
|
|
import("util.lua")
|
2013-11-10 09:11:44 -08:00
|
|
|
e = environment()
|
|
|
|
assert(is_environment(e))
|
2014-01-06 16:46:11 -08:00
|
|
|
e:add_uvar_cnstr("M1")
|
2013-11-17 18:11:44 -08:00
|
|
|
print(e:get_uvar("M1"))
|
2013-11-10 09:11:44 -08:00
|
|
|
e:add_var("N", Type())
|
|
|
|
N, M = Consts("N M")
|
|
|
|
e:add_var("a", N)
|
|
|
|
x, a = Consts("x, a")
|
2013-12-22 11:51:38 -08:00
|
|
|
check_error(function() e:type_check(fun(x, M, a)) end)
|
|
|
|
print(e:type_check(fun(x, N, a)))
|