Skip to content

Improve defaulting of representational equalities

sheaf requested to merge sheaf/ghc:T25825 into master

Tickets: #15850 (closed), #20289 (closed), #25825 (closed), #23731 (closed), #20468 (closed), #25949 (closed), #26137 (closed).

This MR implements the plan laid out in #25825 (closed):

  • Zeroth commit: adds a test.
  • First commit: implements (1) and (2). Generalises how representational equalities are defaulted.
  • Second commit: implements (3). Improves error message reporting for constraints that arose from representational equalities, addressing #20468 (closed) as well. Fixes #25949 (closed) by either providing import suggestions or mentioning that the newtype is opaque.
Edited by sheaf

Merge request reports

Loading