lean4-htt/tests/compiler/expr.lean
Leonardo de Moura 864b9c730c feat(library/init/lean/expr): helper functions
cc @dselsam

Notes:
- x.isAppOrConst => x.isApp || x.isConst
- x.isPi => x.isForall
2019-09-30 15:16:40 -07:00

10 lines
235 B
Text

import init.lean.expr
open Lean
def main : IO UInt32 :=
do
let e := Expr.app (Expr.app (Expr.const `f []) (Expr.const `a [])) (Expr.const `b []);
IO.println e;
IO.println ("hash: " ++ toString e.hash);
IO.println e.getAppArgs;
pure 0