2013-11-11 21:11:31 +00:00
|
|
|
e = context_entry("a", Const("a"))
|
|
|
|
n = e:get_body()
|
2014-01-10 02:09:53 +00:00
|
|
|
check_error(function() mk_heq(n, Const("a")) end)
|
2013-11-11 21:11:31 +00:00
|
|
|
print(Const("a") < Const("b"))
|
|
|
|
check_error(function() mk_app(Const("a")) end)
|
2014-01-10 02:09:53 +00:00
|
|
|
print(mk_heq(Const("a"), Const("b")))
|
2013-11-11 21:11:31 +00:00
|
|
|
print(mk_pi("x", Const("N"), Var(0)))
|
|
|
|
print(Pi("x", Const("N"), Const("x")))
|
|
|
|
assert(mk_pi("x", Const("N"), Var(0)) == Pi("x", Const("N"), Const("x")))
|
|
|
|
assert(mk_let("x", Const("a"), Var(0)) == Let("x", Const("a"), Const("x")))
|
|
|
|
print(mk_let("x", Const("N"), Const("a"), Var(0)))
|
|
|
|
check_error(function() Pi({"x"}, Const("x")) end)
|
|
|
|
check_error(function() Pi({"x", Const("N")}, Const("x")) end)
|
|
|
|
check_error(function() Pi({{"x"}}, Const("x")) end)
|
|
|
|
check_error(function() Pi(Const("x")) end)
|
|
|
|
check_error(function() Pi(Const("x"), Const("N"), Const("x"), Const("a")) end)
|
|
|
|
check_error(function() Pi({}, Const("x")) end)
|