diff options
author | sheaf <sam.derbyshire@gmail.com> | 2021-10-05 18:16:27 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-10-06 10:58:03 -0400 |
commit | a466b02492f73a43c6cb9ce69491fc85234b9559 (patch) | |
tree | 6d4f7c1d0ad4609fa1878d44f0e1e20b8c4501ef /testsuite/tests/annotations | |
parent | 9af29e7fa81a8696a2d829a0ecbebcbc8be5badd (diff) | |
download | haskell-a466b02492f73a43c6cb9ce69491fc85234b9559.tar.gz |
Improve overlap error for polykinded constraints
There were two problems around `mkDictErr`:
1. An outdated call to `flattenTys` meant that we missed out on some
instances. As we no longer flatten type-family applications,
the logic is obsolete and can be removed.
2. We reported "out of scope" errors in a poly-kinded situation
because `BoxedRep` and `Lifted` were considered out of scope.
We fix this by using `pretendNameIsInScope`.
fixes #20465
Diffstat (limited to 'testsuite/tests/annotations')
-rw-r--r-- | testsuite/tests/annotations/should_fail/annfail10.stderr | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testsuite/tests/annotations/should_fail/annfail10.stderr b/testsuite/tests/annotations/should_fail/annfail10.stderr index a6e767f9e5..bd28fb4b17 100644 --- a/testsuite/tests/annotations/should_fail/annfail10.stderr +++ b/testsuite/tests/annotations/should_fail/annfail10.stderr @@ -10,8 +10,8 @@ annfail10.hs:9:1: error: instance Data.Data.Data Ordering -- Defined in ‘Data.Data’ instance Data.Data.Data a => Data.Data.Data (Maybe a) -- Defined in ‘Data.Data’ - ...plus 16 others - ...plus 50 instances involving out-of-scope types + ...plus N others + ...plus N instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the annotation: {-# ANN f 1 #-} @@ -23,7 +23,7 @@ annfail10.hs:9:11: error: instance Num Integer -- Defined in ‘GHC.Num’ instance Num Double -- Defined in ‘GHC.Float’ instance Num Float -- Defined in ‘GHC.Float’ - ...plus two others - ...plus 19 instances involving out-of-scope types + ...plus N others + ...plus N instances involving out-of-scope types (use -fprint-potential-instances to see them all) • In the annotation: {-# ANN f 1 #-} |