lean4-htt/tests/lean/run/basic_monitor1.lean
Leonardo de Moura 6e7929252f feat(frontends/lean, library/init): add 'thunk' gadget
We can now write
   trace "hello" t
instead of
   trace "hello" (fun _, t)
2017-01-31 18:41:59 -08:00

12 lines
279 B
Text

meta def basic_monitor : vm_monitor nat :=
{ init := 0, step := λ s, return (trace ("step " ++ s^.to_string) (s+1)) >> failure }
run_command vm_monitor.register `basic_monitor
set_option debugger true
def f : nat → nat
| 0 := 0
| (a+1) := f a
vm_eval trace "a" (f 4)