lean4-htt/tests/lean/run/inline_fn.lean
2019-03-21 15:11:05 -07:00

18 lines
247 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

def f {α : Type} [HasAdd α] (x : α) :=
x + x + x
def h : Nat → Nat
| 0 := 10
| (n+1) := n * h n
set_option pp.all true
set_option trace.compiler true
def g1 (x : Nat) :=
inline f x
def g2 (x : Nat) :=
inline h x
def g3 :=
inline h 2