This PR fixes a bug where the monad lift coercion elaborator would partially unify expressions even if they were not monads. This could be taken advantage of to propagate information that could help elaboration make progress, for example the first `change` worked because the monad lift coercion elaborator was unifying `@Eq _ _` with `@Eq (Nat × Nat) p`: ```lean example (p : Nat × Nat) : p = p := by change _ = ⟨_, _⟩ -- used to work (yielding `p = (p.fst, p.snd)`), now it doesn't change ⟨_, _⟩ = _ -- never worked ``` As such, this is a breaking change; you may need to adjust expressions to include additional implicit arguments.
20 lines
769 B
Text
20 lines
769 B
Text
calcErrors.lean:7:30-7:33: error: type mismatch
|
||
rfl
|
||
has type
|
||
?m = ?m : Prop
|
||
but is expected to have type
|
||
b + b = 0 + c + b : Prop
|
||
calcErrors.lean:13:8-13:29: error: invalid 'calc' step, left-hand side is
|
||
0 + c + b : Nat
|
||
but previous right-hand side is
|
||
b + b : Nat
|
||
calcErrors.lean:24:8-24:11: error: invalid 'calc' step, relation expected
|
||
p a
|
||
calcErrors.lean:31:8-31:13: error: invalid 'calc' step, failed to synthesize `Trans` instance
|
||
Trans p p ?m
|
||
Additional diagnostic information may be available using the `set_option diagnostics true` command.
|
||
calcErrors.lean:41:7-41:12: error: invalid 'calc' step, left-hand side is
|
||
γ : Sort u_1
|
||
but previous right-hand side is
|
||
b : β
|
||
calcErrors.lean:61:18-61:19: error: unexpected token '['; expected command
|