summaryrefslogtreecommitdiff
path: root/testsuite/tests/overloadedrecflds
diff options
context:
space:
mode:
authorSimon Peyton Jones <simonpj@microsoft.com>2018-08-20 10:01:16 +0100
committerSimon Peyton Jones <simonpj@microsoft.com>2018-08-21 16:03:20 +0100
commit18c302cb3802e485e0837538d7d09e1ac21c3ee2 (patch)
treed2d4d94e4dbb04c8641da63649bd5b6b3329bfca /testsuite/tests/overloadedrecflds
parentce6ce788251b6102f5c1b878ffec53ba7ad678b5 (diff)
downloadhaskell-18c302cb3802e485e0837538d7d09e1ac21c3ee2.tar.gz
Improve ambiguous-occurrence error message
Trac #15487 correctly reported that the qualification of a Name in an ambiguous-occurrence error message was wrong. This patch fixes it. It's easily done, in RnUtils.addNameClashErrRn The problem was that in complaining about M.x we must enusre that 'M' part is the same as that used in pprNameProvenance.
Diffstat (limited to 'testsuite/tests/overloadedrecflds')
-rw-r--r--testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout18
1 files changed, 9 insertions, 9 deletions
diff --git a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
index 3270089b9c..cfed45f6f1 100644
--- a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
+++ b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout
@@ -6,21 +6,21 @@ data T a = MkT {Ghci2.foo :: Bool, ...}
<interactive>:1:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
<interactive>:9:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
True
<interactive>:1:1: error:
Ambiguous occurrence ‘foo’
- It could refer to either the field ‘foo’,
- defined at <interactive>:3:16
- or the field ‘foo’, defined at <interactive>:4:18
+ It could refer to
+ either the field ‘foo’, defined at <interactive>:3:16
+ or the field ‘foo’, defined at <interactive>:4:18
foo :: U -> Int
42