lean4-htt/tests/lean/353.lean.expected.out
Robert J. Simmons 31f09da88a
feat: prioritize stuck synthetic MVar problems to improve error messages (#11184)
This PR modifies the error message that is returned when more than one
synthetic metavariable can't be resolved.

The two heuristics used for prioritization are:
- prefer typeclass problems associated with small ranges over typeclass
problems associated with large ranges (I'm pretty confident in this
heuristic)
- do not prefer typeclass problems over other kinds of errors (not as
confident in this heuristic)
2025-11-16 00:09:48 +00:00

7 lines
666 B
Text

353.lean:13:27-13:35: error: typeclass instance problem is stuck
Arr.{1, ?u} Bool (@?m a₁ a₂)
Note: Lean will not try to resolve this typeclass instance problem because the second type argument to `Arr.{u1,
u2}` contains metavariables. This argument must be fully determined before Lean will try to resolve the typeclass.
Hint: Adding type annotations and supplying implicit arguments to functions can give Lean more information for typeclass resolution. For example, if you have a variable `x` that you intend to be a `Nat`, but Lean reports it as having an unresolved type like `?m`, replacing `x` with `(x : Nat)` can get typeclass resolution un-stuck.