diff options
Diffstat (limited to 'testsuite')
32 files changed, 178 insertions, 147 deletions
diff --git a/testsuite/tests/module/mod110.stderr b/testsuite/tests/module/mod110.stderr index 38e9c79a54..97f7eedadb 100644 --- a/testsuite/tests/module/mod110.stderr +++ b/testsuite/tests/module/mod110.stderr @@ -1,7 +1,8 @@ mod110.hs:11:10: error: [GHC-87543] - Ambiguous occurrence ‘Eq’ - It could refer to either ‘Prelude.Eq’, - imported from ‘Prelude’ at mod110.hs:4:1-14 - (and originally defined in ‘GHC.Classes’) - or ‘M.Eq’, defined at mod110.hs:7:1 + Ambiguous occurrence ‘Eq’. + It could refer to + either ‘Prelude.Eq’, + imported from ‘Prelude’ at mod110.hs:4:1-14 + (and originally defined in ‘GHC.Classes’), + or ‘M.Eq’, defined at mod110.hs:7:1. diff --git a/testsuite/tests/module/mod151.stderr b/testsuite/tests/module/mod151.stderr index 8bb41459fb..ca382a3155 100644 --- a/testsuite/tests/module/mod151.stderr +++ b/testsuite/tests/module/mod151.stderr @@ -1,7 +1,8 @@ mod151.hs:2:20: error: [GHC-87543] - Ambiguous occurrence ‘id’ - It could refer to either ‘Prelude.id’, - imported from ‘Prelude’ at mod151.hs:2:8 - (and originally defined in ‘GHC.Base’) - or ‘M.id’, defined at mod151.hs:2:30 + Ambiguous occurrence ‘id’. + It could refer to + either ‘Prelude.id’, + imported from ‘Prelude’ at mod151.hs:2:8 + (and originally defined in ‘GHC.Base’), + or ‘M.id’, defined at mod151.hs:2:30. diff --git a/testsuite/tests/module/mod152.stderr b/testsuite/tests/module/mod152.stderr index d60269b757..9742ed69ba 100644 --- a/testsuite/tests/module/mod152.stderr +++ b/testsuite/tests/module/mod152.stderr @@ -1,7 +1,8 @@ mod152.hs:2:26: error: [GHC-87543] - Ambiguous occurrence ‘id’ - It could refer to either ‘Prelude.id’, - imported from ‘Prelude’ at mod152.hs:2:8 - (and originally defined in ‘GHC.Base’) - or ‘M.id’, defined at mod152.hs:2:36 + Ambiguous occurrence ‘id’. + It could refer to + either ‘Prelude.id’, + imported from ‘Prelude’ at mod152.hs:2:8 + (and originally defined in ‘GHC.Base’), + or ‘M.id’, defined at mod152.hs:2:36. diff --git a/testsuite/tests/module/mod153.stderr b/testsuite/tests/module/mod153.stderr index 989b27a77e..7d71dbcd0a 100644 --- a/testsuite/tests/module/mod153.stderr +++ b/testsuite/tests/module/mod153.stderr @@ -1,7 +1,8 @@ mod153.hs:2:11: error: [GHC-87543] - Ambiguous occurrence ‘id’ - It could refer to either ‘Prelude.id’, - imported from ‘Prelude’ at mod153.hs:2:8 - (and originally defined in ‘GHC.Base’) - or ‘M.id’, defined at mod153.hs:2:21 + Ambiguous occurrence ‘id’. + It could refer to + either ‘Prelude.id’, + imported from ‘Prelude’ at mod153.hs:2:8 + (and originally defined in ‘GHC.Base’), + or ‘M.id’, defined at mod153.hs:2:21. diff --git a/testsuite/tests/module/mod164.stderr b/testsuite/tests/module/mod164.stderr index d6c0a9eec2..26de35564e 100644 --- a/testsuite/tests/module/mod164.stderr +++ b/testsuite/tests/module/mod164.stderr @@ -1,9 +1,10 @@ -mod164.hs:9:5: [GHC-87543] - Ambiguous occurrence ‘D1’ - It could refer to either ‘Mod164_A.D1’, - imported from ‘Mod164_A’ at mod164.hs:4:1-15 - (and originally defined at Mod164_A.hs:3:10-11) - or ‘Mod164_B.D1’, - imported from ‘Mod164_B’ at mod164.hs:5:1-15 - (and originally defined at Mod164_B.hs:3:10-11) +mod164.hs:9:5: error: [GHC-87543] + Ambiguous occurrence ‘D1’. + It could refer to + either ‘Mod164_A.D1’, + imported from ‘Mod164_A’ at mod164.hs:4:1-15 + (and originally defined at Mod164_A.hs:3:10-11), + or ‘Mod164_B.D1’, + imported from ‘Mod164_B’ at mod164.hs:5:1-15 + (and originally defined at Mod164_B.hs:3:10-11). diff --git a/testsuite/tests/module/mod165.stderr b/testsuite/tests/module/mod165.stderr index 9ef57d4bbd..be092c086e 100644 --- a/testsuite/tests/module/mod165.stderr +++ b/testsuite/tests/module/mod165.stderr @@ -1,7 +1,7 @@ -mod165.hs:9:5: [GHC-87543] - Ambiguous occurrence ‘A.D1’ - It could refer to either ‘A.D1’, - imported from ‘Mod164_A’ at mod165.hs:4:1-20 - or ‘A.D1’, imported from ‘Mod164_B’ at mod165.hs:5:1-20 +mod165.hs:9:5: error: [GHC-87543] + Ambiguous occurrence ‘A.D1’. + It could refer to + either ‘A.D1’, imported from ‘Mod164_A’ at mod165.hs:4:1-20, + or ‘A.D1’, imported from ‘Mod164_B’ at mod165.hs:5:1-20. exit(1) diff --git a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout index 4d4e5817d9..f68331068f 100644 --- a/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout +++ b/testsuite/tests/overloadedrecflds/ghci/GHCiDRF.stdout @@ -1,10 +1,10 @@ GHCiDRF.foo :: T -> Int <interactive>:1:1: error: [GHC-87543] - Ambiguous occurrence ‘GHCiDRF.bar’ + Ambiguous occurrence ‘GHCiDRF.bar’. It could refer to - either the field ‘bar’ of record ‘T’, defined at GHCiDRF.hs:3:28 - or the field ‘bar’ of record ‘U’, defined at GHCiDRF.hs:4:16 + either the field ‘bar’ of record ‘T’, defined at GHCiDRF.hs:3:28, + or the field ‘bar’ of record ‘U’, defined at GHCiDRF.hs:4:16. type T :: * data T = MkT {foo :: Int, ...} -- Defined at GHCiDRF.hs:3:16 @@ -18,14 +18,14 @@ data U = MkU {bar :: Bool} GHCiDRF.foo :: GHCiDRF.T -> Int <interactive>:1:1: error: [GHC-87543] - Ambiguous occurrence ‘GHCiDRF.bar’ + Ambiguous occurrence ‘GHCiDRF.bar’. It could refer to - either the field ‘bar’, + either the field ‘bar’ belonging to data constructor ‘MkT’, imported qualified from ‘GHCiDRF’ - (and originally defined at GHCiDRF.hs:3:28-30) - or the field ‘bar’, + (and originally defined at GHCiDRF.hs:3:28-30), + or the field ‘bar’ belonging to data constructor ‘MkU’, imported qualified from ‘GHCiDRF’ - (and originally defined at GHCiDRF.hs:4:16-18) + (and originally defined at GHCiDRF.hs:4:16-18). type GHCiDRF.T :: * data GHCiDRF.T = GHCiDRF.MkT {GHCiDRF.foo :: Int, ...} -- Defined at GHCiDRF.hs:3:16 @@ -38,11 +38,11 @@ data GHCiDRF.U = GHCiDRF.MkU {GHCiDRF.bar :: Bool} -- Defined at GHCiDRF.hs:4:16 <interactive>:11:1: error: [GHC-87543] - Ambiguous occurrence ‘GHCiDRF.bar’ + Ambiguous occurrence ‘GHCiDRF.bar’. It could refer to - either the field ‘bar’, + either the field ‘bar’ belonging to data constructor ‘MkT’, imported qualified from ‘GHCiDRF’ - (and originally defined at GHCiDRF.hs:3:28-30) - or the field ‘bar’, + (and originally defined at GHCiDRF.hs:3:28-30), + or the field ‘bar’ belonging to data constructor ‘MkU’, imported qualified from ‘GHCiDRF’ - (and originally defined at GHCiDRF.hs:4:16-18) + (and originally defined at GHCiDRF.hs:4:16-18). diff --git a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout index c1bb4c99f0..c13d87bb8e 100644 --- a/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout +++ b/testsuite/tests/overloadedrecflds/ghci/duplicaterecfldsghci01.stdout @@ -9,10 +9,12 @@ data T a = MkT {foo :: Bool, ...} True <interactive>:1:1: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to - either the field ‘foo’ of record ‘S’, defined at <interactive>:3:16 - or the field ‘foo’ of record ‘T’, defined at <interactive>:4:18 + either the field ‘foo’ of record ‘S’, + defined at <interactive>:3:16, + or the field ‘foo’ of record ‘T’, + defined at <interactive>:4:18. type U :: * data U = MkU {foo :: Int} -- Defined at <interactive>:12:16 diff --git a/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr b/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr index 29d8f451ca..b284812ce2 100644 --- a/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr +++ b/testsuite/tests/overloadedrecflds/should_compile/BootFldReexport.stderr @@ -1,11 +1,11 @@ BootFldReexport.hs:8:9: error: [GHC-87543] - Ambiguous occurrence ‘fld’ + Ambiguous occurrence ‘fld’. It could refer to either ‘BootFldReexport_N.fld’, imported from ‘BootFldReexport_N’ at BootFldReexport.hs:4:5-7 (and originally defined in ‘BootFldReexport_O’ - at BootFldReexport_O.hs-boot:4:1-13) + at BootFldReexport_O.hs-boot:4:1-13), or the field ‘fld’ of record ‘BootFldReexport_O.O’, imported from ‘BootFldReexport_O’ at BootFldReexport.hs:6:5-7 - (and originally defined at BootFldReexport_O.hs:5:16-18) + (and originally defined at BootFldReexport_O.hs:5:16-18). diff --git a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr index 81029d6cd3..026a8b0c56 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/DRFUnused.stderr @@ -1,7 +1,10 @@ DRFUnused.hs:18:5: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to - either the field ‘foo’ of record ‘S’, defined at DRFUnused.hs:10:16 - or the field ‘foo’ of record ‘T’, defined at DRFUnused.hs:11:16 - or the field ‘foo’ of record ‘U’, defined at DRFUnused.hs:12:16 + either the field ‘foo’ of record ‘S’, + defined at DRFUnused.hs:10:16, + or the field ‘foo’ of record ‘T’, + defined at DRFUnused.hs:11:16, + or the field ‘foo’ of record ‘U’, + defined at DRFUnused.hs:12:16. diff --git a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr index 4eb98f3778..cf92d760c2 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/NoFieldSelectorsFail.stderr @@ -1,13 +1,13 @@ NoFieldSelectorsFail.hs:9:14: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to either the field ‘foo’ of record ‘Foo’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 - (and originally defined at NoFieldSelectorsFailA.hs:5:18-20) + (and originally defined at NoFieldSelectorsFailA.hs:5:18-20), or the field ‘foo’ of record ‘Bar’, imported from ‘NoFieldSelectorsFailA’ at NoFieldSelectorsFail.hs:4:1-28 - (and originally defined at NoFieldSelectorsFailA.hs:6:18-20) + (and originally defined at NoFieldSelectorsFailA.hs:6:18-20). NoFieldSelectorsFail.hs:12:15: error: [GHC-56428] Ambiguous record field ‘foo’. diff --git a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr index 8a1691ac22..d05c8e76fe 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T11167_ambiguous_fixity.stderr @@ -3,14 +3,14 @@ [3 of 3] Compiling T11167_ambiguous_fixity ( T11167_ambiguous_fixity.hs, T11167_ambiguous_fixity.o ) T11167_ambiguous_fixity.hs:6:16: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to either the field ‘foo’ of record ‘A’, imported from ‘T11167_ambiguous_fixity_A’ at T11167_ambiguous_fixity.hs:3:1-32 - (and originally defined at T11167_ambiguous_fixity_A.hs:3:16-18) + (and originally defined at T11167_ambiguous_fixity_A.hs:3:16-18), or the field ‘foo’ of record ‘C’, imported from ‘T11167_ambiguous_fixity_A’ at T11167_ambiguous_fixity.hs:3:1-32 - (and originally defined at T11167_ambiguous_fixity_A.hs:4:16-18) + (and originally defined at T11167_ambiguous_fixity_A.hs:4:16-18), or the field ‘foo’ of record ‘B’, imported from ‘T11167_ambiguous_fixity_B’ at T11167_ambiguous_fixity.hs:4:1-32 - (and originally defined at T11167_ambiguous_fixity_B.hs:2:16-18) + (and originally defined at T11167_ambiguous_fixity_B.hs:2:16-18). diff --git a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr index 00fbe0899b..576e6d41f6 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T13132_duplicaterecflds.stderr @@ -1,11 +1,11 @@ T13132_duplicaterecflds.hs:7:16: error: [GHC-87543] - Ambiguous occurrence ‘runContT’ + Ambiguous occurrence ‘runContT’. It could refer to either the field ‘runContT’ of record ‘ContT’, - defined at T13132_duplicaterecflds.hs:4:31 + defined at T13132_duplicaterecflds.hs:4:31, or the field ‘runContT’ of record ‘ContT2’, - defined at T13132_duplicaterecflds.hs:5:33 + defined at T13132_duplicaterecflds.hs:5:33. T13132_duplicaterecflds.hs:9:11: error: [GHC-46878] The operator ‘runContT’ [infixl 9] of a section @@ -14,9 +14,9 @@ T13132_duplicaterecflds.hs:9:11: error: [GHC-46878] in the section: ‘`runContT` x `y` x’ T13132_duplicaterecflds.hs:9:12: error: [GHC-87543] - Ambiguous occurrence ‘runContT’ + Ambiguous occurrence ‘runContT’. It could refer to either the field ‘runContT’ of record ‘ContT’, - defined at T13132_duplicaterecflds.hs:4:31 + defined at T13132_duplicaterecflds.hs:4:31, or the field ‘runContT’ of record ‘ContT2’, - defined at T13132_duplicaterecflds.hs:5:33 + defined at T13132_duplicaterecflds.hs:5:33. diff --git a/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr b/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr index b4515b8a19..ebc974a123 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T16745.stderr @@ -4,11 +4,11 @@ [4 of 4] Compiling T16745A ( T16745A.hs, T16745A.o ) T16745A.hs:8:9: error: [GHC-87543] - Ambiguous occurrence ‘field’ + Ambiguous occurrence ‘field’. It could refer to either ‘T16745B.field’, imported from ‘T16745B’ at T16745A.hs:3:24-28 - (and originally defined in ‘T16745C’ at T16745C.hs:2:1-5) + (and originally defined in ‘T16745C’ at T16745C.hs:2:1-5), or the field ‘field’ of record ‘T16745B.R’, imported from ‘T16745B’ at T16745A.hs:3:24-28 - (and originally defined at T16745B.hs:11:14-18) + (and originally defined at T16745B.hs:11:14-18). diff --git a/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr index 3a94cd5639..3079d44aba 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T17420.stderr @@ -2,11 +2,11 @@ [2 of 2] Compiling T17420 ( T17420.hs, T17420.o ) T17420.hs:6:17: error: [GHC-87543] - Ambiguous occurrence ‘name’ + Ambiguous occurrence ‘name’. It could refer to either the field ‘name’ of record ‘Dog’, imported from ‘T17420A’ at T17420.hs:4:1-14 - (and originally defined at T17420A.hs:4:18-21) + (and originally defined at T17420A.hs:4:18-21), or the field ‘name’ of record ‘Human’, imported from ‘T17420A’ at T17420.hs:4:1-14 - (and originally defined at T17420A.hs:5:22-25) + (and originally defined at T17420A.hs:5:22-25). diff --git a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr index 7e7939e028..a54338cbf0 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T18999_NoDisambiguateRecordFields.stderr @@ -1,12 +1,12 @@ T18999_NoDisambiguateRecordFields.hs:6:13: error: [GHC-87543] - Ambiguous occurrence ‘not’ + Ambiguous occurrence ‘not’. It could refer to either ‘Prelude.not’, imported from ‘Prelude’ at T18999_NoDisambiguateRecordFields.hs:2:8-40 - (and originally defined in ‘GHC.Classes’) + (and originally defined in ‘GHC.Classes’), or the field ‘not’ of record ‘Foo’, - defined at T18999_NoDisambiguateRecordFields.hs:4:18 + defined at T18999_NoDisambiguateRecordFields.hs:4:18. T18999_NoDisambiguateRecordFields.hs:8:11: error: [GHC-56428] Ambiguous record field ‘not’. diff --git a/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr b/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr index 6a1b76dae9..6b31785f07 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/T23010_fail.stderr @@ -1,8 +1,8 @@ T23010_fail.hs-boot:7:1: error: [GHC-87543] - Ambiguous occurrence ‘T23010_fail.fld’ + Ambiguous occurrence ‘T23010_fail.fld’. It could refer to either the field ‘fld’ of record ‘A’, - defined at T23010_fail.hs:6:16 + defined at T23010_fail.hs:6:16, or the field ‘fld’ of record ‘B’, - defined at T23010_fail.hs:7:16 + defined at T23010_fail.hs:7:16. diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr index aaf57bd710..932f99ad32 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail02.stderr @@ -1,8 +1,8 @@ overloadedrecfldsfail02.hs:8:18: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘R’, - defined at overloadedrecfldsfail02.hs:5:16 + defined at overloadedrecfldsfail02.hs:5:16, or the field ‘x’ of record ‘S’, - defined at overloadedrecfldsfail02.hs:6:16 + defined at overloadedrecfldsfail02.hs:6:16. diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr index d319ae53f6..91ddc1721b 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail04.stderr @@ -2,11 +2,11 @@ [2 of 3] Compiling Main ( overloadedrecfldsfail04.hs, overloadedrecfldsfail04.o ) overloadedrecfldsfail04.hs:9:6: error: [GHC-87543] - Ambiguous occurrence ‘I.x’ + Ambiguous occurrence ‘I.x’. It could refer to either the field ‘x’ of record ‘V’, imported from ‘OverloadedRecFldsFail04_A’ at overloadedrecfldsfail04.hs:6:1-37 - (and originally defined at OverloadedRecFldsFail04_A.hs:6:16) + (and originally defined at OverloadedRecFldsFail04_A.hs:6:16), or the field ‘x’ of record ‘U’, imported from ‘OverloadedRecFldsFail04_A’ at overloadedrecfldsfail04.hs:6:1-37 - (and originally defined at OverloadedRecFldsFail04_A.hs:5:16) + (and originally defined at OverloadedRecFldsFail04_A.hs:5:16). diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr index 423472841c..02316fbe92 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail11.stderr @@ -2,11 +2,11 @@ [2 of 3] Compiling Main ( overloadedrecfldsfail11.hs, overloadedrecfldsfail11.o ) overloadedrecfldsfail11.hs:5:15: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to either the field ‘foo’ of record ‘S’, imported from ‘OverloadedRecFldsFail11_A’ at overloadedrecfldsfail11.hs:3:1-32 - (and originally defined at OverloadedRecFldsFail11_A.hs:5:16-18) + (and originally defined at OverloadedRecFldsFail11_A.hs:5:16-18), or the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail11_A’ at overloadedrecfldsfail11.hs:3:1-32 - (and originally defined at OverloadedRecFldsFail11_A.hs:6:16-18) + (and originally defined at OverloadedRecFldsFail11_A.hs:6:16-18). diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr index a6abb29b19..92bf5a8217 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail12.stderr @@ -2,19 +2,19 @@ [2 of 3] Compiling Main ( overloadedrecfldsfail12.hs, overloadedrecfldsfail12.o ) overloadedrecfldsfail12.hs:13:5: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to either the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail12_A’ at overloadedrecfldsfail12.hs:4:1-32 - (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18) + (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18), or the field ‘foo’ of record ‘S’, - defined at overloadedrecfldsfail12.hs:6:16 + defined at overloadedrecfldsfail12.hs:6:16. overloadedrecfldsfail12.hs:16:5: error: [GHC-87543] - Ambiguous occurrence ‘foo’ + Ambiguous occurrence ‘foo’. It could refer to either the field ‘foo’ of record ‘T’, imported from ‘OverloadedRecFldsFail12_A’ at overloadedrecfldsfail12.hs:4:1-32 - (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18) + (and originally defined at OverloadedRecFldsFail12_A.hs:5:16-18), or the field ‘foo’ of record ‘S’, - defined at overloadedrecfldsfail12.hs:6:16 + defined at overloadedrecfldsfail12.hs:6:16. diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr index cf9a7a5678..89cc10f4f6 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail13.stderr @@ -1,32 +1,32 @@ overloadedrecfldsfail13.hs:10:5: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldsfail13.hs:6:16 + defined at overloadedrecfldsfail13.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldsfail13.hs:7:16 + defined at overloadedrecfldsfail13.hs:7:16. overloadedrecfldsfail13.hs:12:5: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldsfail13.hs:6:16 + defined at overloadedrecfldsfail13.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldsfail13.hs:7:16 + defined at overloadedrecfldsfail13.hs:7:16. overloadedrecfldsfail13.hs:15:5: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldsfail13.hs:6:16 + defined at overloadedrecfldsfail13.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldsfail13.hs:7:16 + defined at overloadedrecfldsfail13.hs:7:16. overloadedrecfldsfail13.hs:18:5: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldsfail13.hs:6:16 + defined at overloadedrecfldsfail13.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldsfail13.hs:7:16 + defined at overloadedrecfldsfail13.hs:7:16. diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr index 2b90b16f97..f658bb1223 100644 --- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr +++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldswasrunnowfail06.stderr @@ -1,40 +1,40 @@ overloadedrecfldswasrunnowfail06.hs:11:11: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldswasrunnowfail06.hs:6:16 + defined at overloadedrecfldswasrunnowfail06.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldswasrunnowfail06.hs:7:16 + defined at overloadedrecfldswasrunnowfail06.hs:7:16, or the field ‘x’ of record ‘U’, - defined at overloadedrecfldswasrunnowfail06.hs:8:18 + defined at overloadedrecfldswasrunnowfail06.hs:8:18. overloadedrecfldswasrunnowfail06.hs:13:11: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldswasrunnowfail06.hs:6:16 + defined at overloadedrecfldswasrunnowfail06.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldswasrunnowfail06.hs:7:16 + defined at overloadedrecfldswasrunnowfail06.hs:7:16, or the field ‘x’ of record ‘U’, - defined at overloadedrecfldswasrunnowfail06.hs:8:18 + defined at overloadedrecfldswasrunnowfail06.hs:8:18. overloadedrecfldswasrunnowfail06.hs:15:13: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldswasrunnowfail06.hs:6:16 + defined at overloadedrecfldswasrunnowfail06.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldswasrunnowfail06.hs:7:16 + defined at overloadedrecfldswasrunnowfail06.hs:7:16, or the field ‘x’ of record ‘U’, - defined at overloadedrecfldswasrunnowfail06.hs:8:18 + defined at overloadedrecfldswasrunnowfail06.hs:8:18. overloadedrecfldswasrunnowfail06.hs:21:20: error: [GHC-87543] - Ambiguous occurrence ‘x’ + Ambiguous occurrence ‘x’. It could refer to either the field ‘x’ of record ‘S’, - defined at overloadedrecfldswasrunnowfail06.hs:6:16 + defined at overloadedrecfldswasrunnowfail06.hs:6:16, or the field ‘x’ of record ‘T’, - defined at overloadedrecfldswasrunnowfail06.hs:7:16 + defined at overloadedrecfldswasrunnowfail06.hs:7:16, or the field ‘x’ of record ‘U’, - defined at overloadedrecfldswasrunnowfail06.hs:8:18 + defined at overloadedrecfldswasrunnowfail06.hs:8:18. diff --git a/testsuite/tests/rename/should_fail/T11167_ambig.stderr b/testsuite/tests/rename/should_fail/T11167_ambig.stderr index f23a644772..e4f552b3b9 100644 --- a/testsuite/tests/rename/should_fail/T11167_ambig.stderr +++ b/testsuite/tests/rename/should_fail/T11167_ambig.stderr @@ -1,16 +1,16 @@ T11167_ambig.hs:10:13: error: [GHC-87543] - Ambiguous occurrence ‘runContT’ + Ambiguous occurrence ‘runContT’. It could refer to either the field ‘runContT’ of record ‘ContT’, - defined at T11167_ambig.hs:6:30 + defined at T11167_ambig.hs:6:30, or the field ‘runContT’ of record ‘ContT'’, - defined at T11167_ambig.hs:7:32 + defined at T11167_ambig.hs:7:32. T11167_ambig.hs:17:9: error: [GHC-87543] - Ambiguous occurrence ‘runContT’ + Ambiguous occurrence ‘runContT’. It could refer to either the field ‘runContT’ of record ‘ContT’, - defined at T11167_ambig.hs:6:30 + defined at T11167_ambig.hs:6:30, or the field ‘runContT’ of record ‘ContT'’, - defined at T11167_ambig.hs:7:32 + defined at T11167_ambig.hs:7:32. diff --git a/testsuite/tests/rename/should_fail/T15487.stderr b/testsuite/tests/rename/should_fail/T15487.stderr index a02cbe40c2..63b2101d1f 100644 --- a/testsuite/tests/rename/should_fail/T15487.stderr +++ b/testsuite/tests/rename/should_fail/T15487.stderr @@ -1,8 +1,8 @@ T15487.hs:7:9: error: [GHC-87543] - Ambiguous occurrence ‘null’ + Ambiguous occurrence ‘null’. It could refer to either ‘Prelude.null’, imported from ‘Prelude’ at T15487.hs:1:8-13 - (and originally defined in ‘Data.Foldable’) - or ‘T15487.null’, defined at T15487.hs:5:1 + (and originally defined in ‘Data.Foldable’), + or ‘T15487.null’, defined at T15487.hs:5:1. diff --git a/testsuite/tests/rename/should_fail/T23301.hs b/testsuite/tests/rename/should_fail/T23301.hs new file mode 100644 index 0000000000..e487d34324 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T23301.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE DuplicateRecordFields, TypeFamilies #-} + +module T23301 where + +data family D a +data instance D Int = MkD1 { fld :: Int } | MkD1b | MkD1c { fld :: Int, bar :: Bool } +data instance D Bool = MkD2 { fld :: Bool } + +foo = fld diff --git a/testsuite/tests/rename/should_fail/T23301.stderr b/testsuite/tests/rename/should_fail/T23301.stderr new file mode 100644 index 0000000000..ac6f2479d9 --- /dev/null +++ b/testsuite/tests/rename/should_fail/T23301.stderr @@ -0,0 +1,10 @@ + +T23301.hs:9:7: [GHC-87543] + Ambiguous occurrence ‘fld’. + It could refer to + either the field ‘fld’ belonging to data constructor ‘MkD1’ (among others) + in a data family instance of ‘D’, + defined at T23301.hs:6:31, + or the field ‘fld’ belonging to data constructor ‘MkD2’ + in a data family instance of ‘D’, + defined at T23301.hs:7:31. diff --git a/testsuite/tests/rename/should_fail/all.T b/testsuite/tests/rename/should_fail/all.T index 7ea8d6fd3a..883476aac5 100644 --- a/testsuite/tests/rename/should_fail/all.T +++ b/testsuite/tests/rename/should_fail/all.T @@ -188,6 +188,7 @@ test('T21605b', normal, compile_fail, ['']) test('T21605c', normal, compile_fail, ['']) test('T21605d', normal, compile_fail, ['']) test('T22839', normal, compile_fail, ['']) +test('T23301', normal, compile_fail, ['']) test('RnPatternSynonymFail', [js_broken(22261), req_th], compile_fail, ['']) test('RnMultipleFixityFail', normal, compile_fail, ['']) test('RnEmptyCaseFail', normal, compile_fail, ['']) diff --git a/testsuite/tests/rename/should_fail/rnfail044.stderr b/testsuite/tests/rename/should_fail/rnfail044.stderr index 795cee0dfa..8c25ec2cda 100644 --- a/testsuite/tests/rename/should_fail/rnfail044.stderr +++ b/testsuite/tests/rename/should_fail/rnfail044.stderr @@ -1,8 +1,8 @@ rnfail044.hs:5:12: error: [GHC-87543] - Ambiguous occurrence ‘splitAt’ + Ambiguous occurrence ‘splitAt’. It could refer to either ‘Prelude.splitAt’, imported from ‘Prelude’ at rnfail044.hs:5:8 - (and originally defined in ‘GHC.List’) - or ‘A.splitAt’, defined at rnfail044.hs:8:3 + (and originally defined in ‘GHC.List’), + or ‘A.splitAt’, defined at rnfail044.hs:8:3. diff --git a/testsuite/tests/typecheck/should_fail/T19397E1.stderr b/testsuite/tests/typecheck/should_fail/T19397E1.stderr index 066b8f1da4..6e614caebc 100644 --- a/testsuite/tests/typecheck/should_fail/T19397E1.stderr +++ b/testsuite/tests/typecheck/should_fail/T19397E1.stderr @@ -1,8 +1,8 @@ T19397E1.hs:1:14: error: [GHC-87543] - Ambiguous occurrence ‘main’ + Ambiguous occurrence ‘main’. It could refer to either ‘T19397S.main’, imported from ‘T19397S’ at T19397E1.hs:2:1-14 - (and originally defined at T19397S.hs:4:1-4) - or ‘Main.main’, defined at T19397E1.hs:5:1 + (and originally defined at T19397S.hs:4:1-4), + or ‘Main.main’, defined at T19397E1.hs:5:1. diff --git a/testsuite/tests/typecheck/should_fail/T19397E2.stderr b/testsuite/tests/typecheck/should_fail/T19397E2.stderr index a66e6170ca..ec444f8f65 100644 --- a/testsuite/tests/typecheck/should_fail/T19397E2.stderr +++ b/testsuite/tests/typecheck/should_fail/T19397E2.stderr @@ -1,8 +1,8 @@ T19397E2.hs:1:1: error: [GHC-87543] - Ambiguous occurrence ‘main’ + Ambiguous occurrence ‘main’. It could refer to either ‘T19397S.main’, imported from ‘T19397S’ at T19397E2.hs:2:1-14 - (and originally defined at T19397S.hs:4:1-4) - or ‘Main.main’, defined at T19397E2.hs:5:1 + (and originally defined at T19397S.hs:4:1-4), + or ‘Main.main’, defined at T19397E2.hs:5:1. diff --git a/testsuite/tests/typecheck/should_fail/tcfail037.stderr b/testsuite/tests/typecheck/should_fail/tcfail037.stderr index 60432d8626..f0b809c6af 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail037.stderr +++ b/testsuite/tests/typecheck/should_fail/tcfail037.stderr @@ -1,7 +1,8 @@ tcfail037.hs:7:11: error: [GHC-87543] - Ambiguous occurrence ‘+’ - It could refer to either ‘Prelude.+’, - imported from ‘Prelude’ at tcfail037.hs:3:8-17 - (and originally defined in ‘GHC.Num’) - or ‘ShouldFail.+’, defined at tcfail037.hs:10:5 + Ambiguous occurrence ‘+’. + It could refer to + either ‘Prelude.+’, + imported from ‘Prelude’ at tcfail037.hs:3:8-17 + (and originally defined in ‘GHC.Num’), + or ‘ShouldFail.+’, defined at tcfail037.hs:10:5. |