diff options
author | Richard Eisenberg <rae@cs.brynmawr.edu> | 2018-03-17 01:57:28 -0400 |
---|---|---|
committer | Richard Eisenberg <rae@cs.brynmawr.edu> | 2018-03-31 23:17:01 -0400 |
commit | 1845d1bce2e4edea4f5cc9de0d46631369268212 (patch) | |
tree | fade243d9cd6e3380b66600df46b125e636496fd | |
parent | 3eaa55dcbcd860a035dfe2cae96866e96b008f67 (diff) | |
download | haskell-1845d1bce2e4edea4f5cc9de0d46631369268212.tar.gz |
Clarify comments around dropping Derived constraints
[skip ci]
-rw-r--r-- | compiler/typecheck/TcRnTypes.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compiler/typecheck/TcRnTypes.hs b/compiler/typecheck/TcRnTypes.hs index f0439a690d..6c221b75e8 100644 --- a/compiler/typecheck/TcRnTypes.hs +++ b/compiler/typecheck/TcRnTypes.hs @@ -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): |