This PR changes the "declaration uses 'sorry'" warning to use backticks instead of single quotes, consistent with Lean's conventions for formatting code identifiers in diagnostic messages.
80 lines
1.8 KiB
Text
80 lines
1.8 KiB
Text
|
|
/--
|
|
trace: b : Bool
|
|
⊢ if b = true then
|
|
have unused := ();
|
|
True
|
|
else False
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
trace_state; sorry
|
|
|
|
/--
|
|
trace: b : Bool
|
|
⊢ b = true
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
simp; trace_state; sorry
|
|
|
|
/--
|
|
trace: b : Bool
|
|
⊢ b = true ∧
|
|
have unused := ();
|
|
True
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
simp (config := Lean.Meta.Simp.neutralConfig); trace_state; sorry
|
|
|
|
/-- error: `simp` made no progress -/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
simp (config := Lean.Meta.Simp.neutralConfig) only; trace_state; sorry
|
|
|
|
/--
|
|
trace: b : Bool
|
|
⊢ if b = true then True else False
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
simp (config := Lean.Meta.Simp.neutralConfig) +zeta only; trace_state; sorry
|
|
|
|
|
|
/--
|
|
trace: b : Bool
|
|
⊢ if b = true then True else False
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
simp (config := Lean.Meta.Simp.neutralConfig) +zetaUnused only; trace_state; sorry
|
|
|
|
|
|
-- Before the introduction of zetaUnused, split would do collateral damage to unused `have`s.
|
|
-- Now they are preserved:
|
|
|
|
/--
|
|
trace: case isTrue
|
|
b : Bool
|
|
h✝ : b = true
|
|
⊢ have unused := ();
|
|
True
|
|
---
|
|
warning: declaration uses `sorry`
|
|
-/
|
|
#guard_msgs in
|
|
example (b : Bool) : if b then have unused := (); True else False := by
|
|
split
|
|
· trace_state; sorry
|
|
· sorry
|