lean2/tests/lua/sect2.lua
Leonardo de Moura 585f3adde1 feat(library/scope): add sections
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-06-01 17:55:11 -07:00

11 lines
375 B
Lua

local env = environment()
env = env:begin_section_scope()
env = env:add_global_level("l")
local l = mk_global_univ("l")
env = env:add(check(env, mk_var_decl("A", mk_sort(l))), binder_info(true))
local A = Const("A")
local l2 = mk_param_univ("l")
check_error(function()
env = add_decl(env, mk_var_decl("R", {l2}, mk_arrow(A, A, mk_sort(l2))))
end
)