lean4-htt/tests/lean/calcErrors.lean.expected.out
Kyle Miller 28cf146d00
fix: make sure monad lift coercion elaborator has no side effects (#6024)
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.
2024-11-13 16:22:31 +00:00

20 lines
769 B
Text
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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