lean2/tests/lua/expr4.lua
Leonardo de Moura 193aa4a83f feat(library/kernel_bindings): improve Pi and Fun Lua APIs, and allow users to provide binder information
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-05-16 14:09:00 -07:00

15 lines
464 B
Lua

local a = Const("a")
local b = Const("b")
local f = Const("f")
local vec = Const("vec")
print(Pi({{a, Type}, {b, vec(a), true}}, vec(b)))
print(Pi({{a, Type, binder_info(true, true)}, {b, vec(a), true}}, vec(b)))
assert(not pcall(function()
print(Pi({{a, Type}, {f(b), vec(a), true}}, vec(b)))
end
))
assert(not pcall(function()
print(Pi({{a, Type, a}, {b, vec(a), true}}, vec(b)))
end
))