lean2/tests/lean/lua12.lean
Leonardo de Moura 7726ccad28 chore(builtin): rename nat, int and real modules to Nat, Int and Real.
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2014-01-01 13:52:25 -08:00

14 lines
284 B
Text

Import Int.
Variables x y z : Int
(**
import("util.lua")
local env = get_environment()
local plus = Const{"Int", "add"}
local x, y = Consts("x y")
local def = plus(plus(x, y), iVal(1000))
print(def, ":", env:type_check(def))
env:add_definition("sum", def)
**)
Eval sum + 3