9eb4dc4a81
This commit affects different modules. I used the following approach: 1- I store the metavariable environment at unification_failure_justifications. The idea is to capture the set of instantiated metavariables at the time of failure. 2- I added a remove_detail function. It removes propagation steps from the justification tree object. I also remove the backtracking search space associated with higher-order unificiation. I keep only the search related to case-splits due to coercions and overloads. 3- I use the metavariable environment captured at step 1 when pretty printing the justification of an elaborator_exception. Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
45 lines
1.1 KiB
Text
45 lines
1.1 KiB
Text
Set: pp::colors
|
||
Set: pp::unicode
|
||
Imported 'Int'
|
||
Imported 'Real'
|
||
Failed to solve
|
||
⊢ (?M::0 ≈ Nat::add) ⊕ (?M::0 ≈ Int::add) ⊕ (?M::0 ≈ Real::add)
|
||
(line: 3: pos: 9) Overloading at
|
||
(Real::add | Int::add | Nat::add) 1 ⊤
|
||
Failed to solve
|
||
⊢ Bool ≺ ℕ
|
||
(line: 3: pos: 9) Type of argument 2 must be convertible to the expected type in the application of
|
||
Nat::add
|
||
with arguments:
|
||
1
|
||
⊤
|
||
Failed to solve
|
||
⊢ Bool ≺ ℤ
|
||
(line: 3: pos: 9) Type of argument 2 must be convertible to the expected type in the application of
|
||
Int::add
|
||
with arguments:
|
||
1
|
||
⊤
|
||
Failed to solve
|
||
⊢ Bool ≺ ℝ
|
||
(line: 3: pos: 9) Type of argument 2 must be convertible to the expected type in the application of
|
||
Real::add
|
||
with arguments:
|
||
1
|
||
⊤
|
||
Assumed: R
|
||
Assumed: T
|
||
Assumed: r2t
|
||
Coercion r2t
|
||
Assumed: t2r
|
||
Coercion t2r
|
||
Assumed: f
|
||
Assumed: a
|
||
Assumed: b
|
||
Set: lean::pp::coercion
|
||
Set: lean::pp::notation
|
||
f a b
|
||
f (r2t b) (t2r a)
|
||
Assumed: g
|
||
f a b
|
||
f (r2t b) (t2r a)
|