lean4-htt/tests/lean/run/inlineApp.lean
Leonardo de Moura 59b4d977b5 chore: fix tests
2022-09-10 15:06:03 -07:00

16 lines
396 B
Text

import Lean
def f (x : Nat) :=
(x - 1) + x * 2 + x*x
def h (x : Nat) :=
inline <| f (x + x)
#eval Lean.Compiler.compile #[``h]
open Lean Compiler LCNF in
@[cpass] def simpInline : PassInstaller :=
Testing.assertDoesNotContainConstAfter ``inline "simp did not inline `inline`" |>.install `simp `simpInlinesInline
set_option trace.Compiler.result true
#eval Lean.Compiler.compile #[``h]