summaryrefslogtreecommitdiff
path: root/testsuite/tests/parser/should_fail
diff options
context:
space:
mode:
authorsheaf <sam.derbyshire@gmail.com>2021-11-19 10:19:19 +0100
committerMarge Bot <ben+marge-bot@smart-cactus.org>2021-11-20 18:13:23 -0500
commit742d8b6049c30f3b0cd1704d7a34d865bef41712 (patch)
treeb22ad862ca4db2e9004d8b4ab4aafbc11bcde0a9 /testsuite/tests/parser/should_fail
parentbc7e9f038112496c45aeb81d1504e57acb3722c7 (diff)
downloadhaskell-742d8b6049c30f3b0cd1704d7a34d865bef41712.tar.gz
Include "not more specific" info in overlap msg
When instances overlap, we now include additional information about why we weren't able to select an instance: perhaps one instance overlapped another but was not strictly more specific, so we aren't able to directly choose it. Fixes #20542
Diffstat (limited to 'testsuite/tests/parser/should_fail')
-rw-r--r--testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr7
-rw-r--r--testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr7
2 files changed, 6 insertions, 8 deletions
diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
index 4c26d77b10..595f32c8b2 100644
--- a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
+++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail11.stderr
@@ -3,12 +3,11 @@ RecordDotSyntaxFail11.hs:8:3: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘print’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
+ Potentially matching instances:
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
- instance Show Integer -- Defined in ‘GHC.Show’
- ...plus N others
- ...plus N instances involving out-of-scope types
+ ...plus 25 others
+ ...plus 12 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘($)’, namely ‘print’
In a stmt of a 'do' block: print $ (.foo.bar.baz) a
diff --git a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
index e66a9dfb28..ee03f9e4a1 100644
--- a/testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
+++ b/testsuite/tests/parser/should_fail/RecordDotSyntaxFail8.stderr
@@ -3,12 +3,11 @@ RecordDotSyntaxFail8.hs:37:3: error:
• Ambiguous type variable ‘a0’ arising from a use of ‘print’
prevents the constraint ‘(Show a0)’ from being solved.
Probable fix: use a type annotation to specify what ‘a0’ should be.
- These potential instances exist:
+ Potentially matching instances:
instance Show Ordering -- Defined in ‘GHC.Show’
instance Show Bar -- Defined at RecordDotSyntaxFail8.hs:22:41
- instance Show Baz -- Defined at RecordDotSyntaxFail8.hs:27:42
- ...plus N others
- ...plus N instances involving out-of-scope types
+ ...plus 29 others
+ ...plus 12 instances involving out-of-scope types
(use -fprint-potential-instances to see them all)
• In the first argument of ‘($)’, namely ‘print’
In a stmt of a 'do' block: print $ ....baz.quux