lean4-htt/tests/lean/run/attachJp.lean
Leonardo de Moura 0d52a3f92b fix: add attachJp
Auxiliary function for attaching jump to a join point to an existing
let-code block.
2022-08-17 07:32:11 -07:00

15 lines
257 B
Text

import Lean
def one := 1
def zero := 0
def f (x : Nat) (b : Bool) :=
let k := fun b =>
let y := match b with
| true => one
| false => zero
Nat.succ y
x == k b
set_option trace.Compiler.simp true
#eval Lean.Compiler.compile #[``f]