2013-12-27 03:49:04 +00:00
|
|
|
import("util.lua")
|
2013-11-10 17:11:44 +00:00
|
|
|
e = environment()
|
|
|
|
assert(is_environment(e))
|
2014-01-07 00:46:11 +00:00
|
|
|
e:add_uvar_cnstr("M1")
|
2013-11-18 02:11:44 +00:00
|
|
|
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-12-22 19:51:38 +00:00
|
|
|
check_error(function() e:type_check(fun(x, M, a)) end)
|
|
|
|
print(e:type_check(fun(x, N, a)))
|