Skip to content

Typechecker refactor: use checkTyEqRhs to make types concrete

sheaf requested to merge sheaf/ghc:unify-concrete-refactor into master

This MR fixes #25616 (closed).

@monoidal noted in #23883 (comment 602163) that #23883 (closed) has been fixed by f5d3e03c.

This means that MR !11313 (closed), which was intended to fix #23883 (closed), is no longer relevant. However, !11313 (closed) also contained the following:

  1. strengthening of an invariant surrounding the expected structure of a kind being checked for concreteness
  2. a refactor to remove code duplication in makeTypeConcrete
  3. fixing up missing concreteness checks in checkTyVar

This MR contains the changes (2) and (3), as well as some further refactoring that was suggested in review by @simonpj (see commit message). It does not contain (1) as @monoidal has indicated in #23883 (comment 602163) that this stronger invariant might not hold.

Edited by sheaf

Merge request reports

Loading