lean4-htt/tests/lean/parser_error_recovery.lean

37 lines
No EOL
643 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.

/- unknown identifiers -/
def f1 :
| 42 := 9000
| arg := ag
#eval f1 42 -- OK (prints 9000)
/- incomplete structure instances -/
def f2 : × := { fst := 9000, sn}
#reduce f2.fst -- OK (prints 9000)
/- incomplete if-then-else -/
def f3 (x : ) : :=
(if x ≥ 42 then 9000)
-- ^ missing else reported here
#eval f3 42 -- OK (prints 9000)
/- η-expanded syntax errors -/
def f4 : list :=
list.map nat.suc []
#eval f4 -- OK (prints [])
/- tactic scripts with syntax errors -/
lemma f5 (x : ) : x+1 = 1+x :=
by {
simp,
trace_state, -- OK (no goals)
simmp,***,
simp a,,,