lean4-htt/tests/lean/elab_error_recovery.lean
2017-03-09 18:41:19 -08:00

21 lines
437 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
#reduce half_baked 3
#reduce half_baked 5
#eval half_baked 3
-- type errors in binders
#check ∀ x : nat.zero, x = x