lean4-htt/tests/lean/run/diagRec.lean
Matthew Robert Ballard 7bea3c1508
chore: wrap diagnostic results in MessageData.traces (#4897)
Currently, the messages in the diagnostic summaries are created by
appending interpolated strings. We wrap these in `.trace`'s, and the
results are better formatted when expanding child nodes in the info
view. Particularly, the latter diagnostic summaries remain on their own
lines flush to the left instead of on the same line directly adjacent to
the last child node.
2024-08-06 19:10:51 +00:00

20 lines
586 B
Text

def fib (n : Nat) :=
match n with
| 0 | 1 => 1
| x+2 => fib x + fib (x+1)
termination_by n
/--
info: 89
---
info: [reduction] unfolded declarations (max: 407, num: 3):
[reduction] Nat.rec ↦ 407
[reduction] Or.rec ↦ 144
[reduction] Acc.rec ↦ 108[reduction] unfolded reducible declarations (max: 352, num: 2):
[reduction] Nat.casesOn ↦ 352
[reduction] Or.casesOn ↦ 144use `set_option diagnostics.threshold <num>` to control threshold for reporting counters
-/
#guard_msgs in
set_option diagnostics true in
set_option diagnostics.threshold 100 in
#reduce fib 10