lean4-htt/tests/lean/elab_error_recovery.lean

21 lines
431 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 half_baked :
| 3 := 2
-- type mismatches
| 0 := 1 + ""
-- placeholders
| 5 := _ + 4
-- missing typeclass instances
| 42 := if 2 ∈ 3 then 3 else _
-- exceptions during tactic evaluation
| 7 := by do undefined
-- nested elaboration errors
| _ := begin exact [] end
print half_baked._main
eval half_baked 3
eval half_baked 5
vm_eval half_baked 3
-- type errors in binders
check ∀ x : nat.zero, x = x