lean4-htt/tests/compile_bench
Kim Morrison e01cbf2b8f
feat: add structured TraceResult to TraceData (#12698)
This PR adds a `result? : Option TraceResult` field to `TraceData` and
populates it in `withTraceNode` and `withTraceNodeBefore`, so that
metaprograms walking trace trees can determine success/failure
structurally instead of string-matching on emoji.

`TraceResult` has three cases: `.success` (checkEmoji), `.failure`
(crossEmoji), and `.error` (bombEmoji, exception thrown). An
`ExceptToTraceResult` typeclass converts `Except` results to
`TraceResult` directly, with instances for `Bool` and `Option`.
`TraceResult.toEmoji` converts back to emoji for display. This replaces
the previous `ExceptToEmoji` typeclass — `TraceResult` is now the
primary representation rather than being derived from emoji strings.

`withTraceNodeBefore` (used by `isDefEq`) uses
`ExceptToTraceResult.toTraceResult` directly, correctly handling `Bool`
(`.ok false` = failure) and `Option` (`.ok none` = failure), with
`Except.error` mapping to `.error`.

For `withTraceNode`, `result?` defaults to `none`. Callers can pass
`mkResult?` to provide structured results; when set, the corresponding
emoji is auto-prepended to the message.

Motivated by mathlib's `#defeq_abuse` diagnostic tactic
(https://github.com/leanprover-community/mathlib4/pull/35750) which
currently string-matches on emoji to determine trace node outcomes. See
https://leanprover.zulipchat.com/#narrow/channel/113488-general/topic/backward.2EisDefEq.2ErespectTransparency

🤖 Prepared with Claude Code

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-10 02:42:57 +00:00
..
identifier_completion.lean.dir chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.st.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.st.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
binarytrees.st.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
channel.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
channel.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
const_fold.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
const_fold.lean.init.sh chore: fix ci for new test suite (#12704) 2026-02-27 23:25:37 +00:00
const_fold.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
deriv.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
deriv.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
deriv.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
hashmap.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
hashmap.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
hashmap.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
identifier_completion.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
identifier_completion.lean.do_interpret chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
identifier_completion.lean.no_compile chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
identifier_completion.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
ilean_roundtrip.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
ilean_roundtrip.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
ilean_roundtrip.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
iterators.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
iterators.lean.do_interpret chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
iterators.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
liasolver.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
liasolver.lean.ex-50-50-1.leq chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
liasolver.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
liasolver.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
nat_repr.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
nat_repr.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
nat_repr.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
parser.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
parser.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
phashmap.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
phashmap.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
phashmap.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
qsort.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
qsort.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint2.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint2.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_checkpoint2.lean.no_test chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_fbip.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_fbip.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_fbip.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_library.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_library.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
rbmap_library.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
run_bench chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
run_test chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
server_startup.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
server_startup.lean.log chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
sigmaIterator.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
sigmaIterator.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
treemap.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
treemap.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
treemap.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
unionfind.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
unionfind.lean.init.sh chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
unionfind.lean.out.expected chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
watchdogRss.lean chore: switch to new test/bench suite (#12590) 2026-02-25 13:51:53 +00:00
workspaceSymbolsNewRanges.lean feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00
workspaceSymbolsNewRanges.lean.out.expected feat: add structured TraceResult to TraceData (#12698) 2026-03-10 02:42:57 +00:00