Commit 1845d1bc authored by Richard Eisenberg's avatar Richard Eisenberg

Clarify comments around dropping Derived constraints

[skip ci]
parent 3eaa55dc
......@@ -1981,7 +1981,7 @@ isDroppableCt ct
= definitely_insoluble -- Keep only definitely insoluble
| otherwise
= case orig of
KindEqOrigin {} -> True -- Why?
KindEqOrigin {} -> True -- See Note [Dropping derived constraints]
-- See Note [Dropping derived constraints]
-- For fundeps, drop wanted/wanted interactions
......@@ -2031,6 +2031,9 @@ But (tiresomely) we do keep *some* Derived constraints:
* Insoluble kind equalities (e.g. [D] * ~ (* -> *)), with
KindEqOrigin, may arise from a type equality a ~ Int#, say. See
Note [Equalities with incompatible kinds] in TcCanonical.
These need to be kept because the kind equalities might have different
source locations and hence different error messages.
E.g., test case dependent/should_fail/T11471
* We keep most derived equalities arising from functional dependencies
- Given/Given interactions (subset of FunDepOrigin1):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment