lean4-htt/tests/elab/tc_cache.lean
Garmelon 08eb78a5b2
chore: switch to new test/bench suite (#12590)
This PR sets up the new integrated test/bench suite. It then migrates
all benchmarks and some related tests to the new suite. There's also
some documentation and some linting.

For now, a lot of the old tests are left alone so this PR doesn't become
even larger than it already is. Eventually, all tests should be migrated
to the new suite though so there isn't a confusing mix of two systems.
2026-02-25 13:51:53 +00:00

31 lines
1.1 KiB
Text

/-
Type class resolution cache.
Recall that we normalize keys for type class with output parameters only when the input type
contains metavariables. This is why in the following example we sold
```
new: HAppend (List Nat) (List Nat) ?_
```
and
```
new: HAppend (List Nat) (List Nat) (List Nat)
```
-/
set_option pp.mvars.anonymous false
set_option trace.Meta.synthInstance.cache true
/--
trace: [Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) (List Nat)
[Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) ?_
---
trace: [Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) (List Nat)
[Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) ?_
---
trace: [Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) (List Nat)
[Meta.synthInstance.cache] new: HAppend (List Nat) (List Nat) ?_
---
trace: [Meta.synthInstance.cache] new: HAppend (List Nat) (List Nat) (List Nat)
[Meta.synthInstance.cache] cached: HAppend (List Nat) (List Nat) ?_
-/
#guard_msgs (ordering := sorted) in
def ex (a : List Nat) : List Nat :=
a ++ a ++ a ++ a ++ a