Skip to content
Snippets Groups Projects
Commit 1e53277a authored by sheaf's avatar sheaf Committed by Marge Bot
Browse files

Allow defaulting of representational equalities

This commit generalises the defaulting of equality constraints that
was introduced in 663daf8d (with follow-up in 6863503c) to allow
the defaulting of *representational* equality constraints.

Now we default a representational equality

  ty1 ~R# ty2

by unifying ty1 ~# ty2.

This allows the following defaulting to take place:

  - Coercible alpha[tau] Int ==> alpha := Int
  - Coercible (IO beta[tau]) (IO Char) ==> beta := Char

See Note [Defaulting representational equalities] in GHC.Tc.Solver.Default
for more details.

Fixes #21003
parent 324222bd
No related branches found
No related tags found
Loading
Showing
with 222 additions and 49 deletions
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment