2014-05-20 17:16:19 +00:00
|
|
|
local env = environment()
|
|
|
|
local nat = Const("nat")
|
|
|
|
|
|
|
|
env = add_inductive(env,
|
|
|
|
"nat", Type,
|
|
|
|
"zero", nat,
|
|
|
|
"succ", mk_arrow(nat, nat))
|
|
|
|
|
|
|
|
-- Display all declarations in the environment
|
2014-06-13 15:26:05 +00:00
|
|
|
env:for_each_decl(function(d)
|
|
|
|
print(tostring(d:name()) .. " : " .. tostring(d:type()))
|
|
|
|
end
|
2014-05-20 17:16:19 +00:00
|
|
|
)
|