summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGHC GitLab CI <ghc-ci@gitlab-haskell.org>2022-05-06 12:19:12 +0100
committerGHC GitLab CI <ghc-ci@gitlab-haskell.org>2022-05-06 12:19:12 +0100
commita771d2bbb72d6004dded05d3c4642296eccd0b50 (patch)
treebc326dc27f9acab048aa84dc433d236615357276
parentbb2a9228befd4d5f0d2714abe0050d164dfa32c1 (diff)
downloadhaskell-wip/test-record-disambig.tar.gz
-rw-r--r--testsuite/tests/linters/notes.stdout125
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr27
-rw-r--r--testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr33
-rw-r--r--testsuite/tests/overloadedrecflds/should_run/all.T4
4 files changed, 81 insertions, 108 deletions
diff --git a/testsuite/tests/linters/notes.stdout b/testsuite/tests/linters/notes.stdout
index 8540d0c06d..f059bdbd52 100644
--- a/testsuite/tests/linters/notes.stdout
+++ b/testsuite/tests/linters/notes.stdout
@@ -1,95 +1,94 @@
ref compiler/GHC/Core/Coercion/Axiom.hs:458:2: Note [RoughMap and rm_empty]
ref compiler/GHC/Core/Opt/OccurAnal.hs:851:15: Note [Loop breaking]
ref compiler/GHC/Core/Opt/SetLevels.hs:1598:30: Note [Top level scope]
-ref compiler/GHC/Core/Opt/Simplify.hs:2618:13: Note [Case binder next]
-ref compiler/GHC/Core/Opt/Simplify.hs:3239:0: Note [Suppressing binder-swaps on linear case]
-ref compiler/GHC/Core/Opt/Simplify.hs:3767:8: Note [Lambda-bound unfoldings]
-ref compiler/GHC/Core/Opt/Simplify/Utils.hs:1225:37: Note [Gentle mode]
-ref compiler/GHC/Core/Opt/Specialise.hs:1593:28: Note [Arity decrease]
+ref compiler/GHC/Core/Opt/Simplify.hs:2666:13: Note [Case binder next]
+ref compiler/GHC/Core/Opt/Simplify.hs:3288:0: Note [Suppressing binder-swaps on linear case]
+ref compiler/GHC/Core/Opt/Simplify.hs:3816:8: Note [Lambda-bound unfoldings]
+ref compiler/GHC/Core/Opt/Simplify/Utils.hs:1282:37: Note [Gentle mode]
+ref compiler/GHC/Core/Opt/Specialise.hs:1607:28: Note [Arity decrease]
ref compiler/GHC/Core/RoughMap.hs:183:35: Note [RoughMatch and beta reduction]
-ref compiler/GHC/Core/TyCo/Rep.hs:1711:31: Note [What prevents a constraint from floating]
-ref compiler/GHC/Driver/Main.hs:1566:34: Note [simpleTidyPgm - mkBootModDetailsTc]
-ref compiler/GHC/Driver/Session.hs:3916:49: Note [Eta-reduction in -O0]
+ref compiler/GHC/Core/TyCo/Rep.hs:1748:31: Note [What prevents a constraint from floating]
+ref compiler/GHC/Driver/Main.hs:1585:34: Note [simpleTidyPgm - mkBootModDetailsTc]
+ref compiler/GHC/Driver/Session.hs:3975:49: Note [Eta-reduction in -O0]
ref compiler/GHC/Hs/Extension.hs:140:5: Note [Strict argument type constraints]
ref compiler/GHC/HsToCore/Binds.hs:313:33: Note [AbsBinds wrappers]
-ref compiler/GHC/HsToCore/Binds.hs:849:46: Note [Free dictionaries]
-ref compiler/GHC/HsToCore/Binds.hs:883:36: Note [Free tyvars in rule LHS]
-ref compiler/GHC/HsToCore/Binds.hs:884:35: Note [Free dictionaries in rule LHS]
-ref compiler/GHC/HsToCore/Binds.hs:942:24: Note [Free dictionaries]
-ref compiler/GHC/HsToCore/Binds.hs:999:34: Note [Dead spec binders]
-ref compiler/GHC/HsToCore/Docs.hs:126:70: Note [1]
-ref compiler/GHC/HsToCore/Docs.hs:130:0: Note [1]
-ref compiler/GHC/HsToCore/Pmc/Solver.hs:853:20: Note [COMPLETE sets on data families]
-ref compiler/GHC/HsToCore/Utils.hs:939:62: Note [Don't CPR join points]
+ref compiler/GHC/HsToCore/Binds.hs:850:46: Note [Free dictionaries]
+ref compiler/GHC/HsToCore/Binds.hs:884:36: Note [Free tyvars in rule LHS]
+ref compiler/GHC/HsToCore/Binds.hs:885:35: Note [Free dictionaries in rule LHS]
+ref compiler/GHC/HsToCore/Binds.hs:943:24: Note [Free dictionaries]
+ref compiler/GHC/HsToCore/Binds.hs:1000:34: Note [Dead spec binders]
+ref compiler/GHC/HsToCore/Docs.hs:272:70: Note [1]
+ref compiler/GHC/HsToCore/Docs.hs:276:0: Note [1]
+ref compiler/GHC/HsToCore/Pmc/Solver.hs:855:20: Note [COMPLETE sets on data families]
+ref compiler/GHC/HsToCore/Utils.hs:936:62: Note [Don't CPR join points]
ref compiler/GHC/Rename/Pat.hs:888:29: Note [Disambiguating record fields]
-ref compiler/GHC/Rename/Splice.hs:450:27: Note [Splices]
-ref compiler/GHC/Runtime/Eval.hs:996:2: Note [Querying instances for a type]
-ref compiler/GHC/Runtime/Interpreter.hs:198:30: Note [uninterruptibleMask_]
-ref compiler/GHC/StgToCmm.hs:108:18: Note [codegen-split-init]
-ref compiler/GHC/StgToCmm.hs:111:18: Note [pipeline-split-init]
+ref compiler/GHC/Rename/Splice.hs:478:27: Note [Splices]
+ref compiler/GHC/Runtime/Eval.hs:987:2: Note [Querying instances for a type]
+ref compiler/GHC/Runtime/Interpreter.hs:203:30: Note [uninterruptibleMask_]
+ref compiler/GHC/StgToCmm.hs:106:18: Note [codegen-split-init]
+ref compiler/GHC/StgToCmm.hs:109:18: Note [pipeline-split-init]
ref compiler/GHC/StgToCmm/Expr.hs:585:4: Note [case on bool]
-ref compiler/GHC/StgToCmm/Expr.hs:848:3: Note [alg-alt heap check]
-ref compiler/GHC/Tc/Errors.hs:180:13: Note [Fail fast on kind errors]
-ref compiler/GHC/Tc/Errors.hs:2016:0: Note [Highlighting ambiguous type variables]
-ref compiler/GHC/Tc/Errors/Ppr.hs:1760:11: Note [Highlighting ambiguous type variables]
-ref compiler/GHC/Tc/Errors/Types.hs:2986:28: Note [Don't promote data constructors with non-equality contexts]
-ref compiler/GHC/Tc/Gen/Arrow.hs:435:29: Note [RecStmt]
-ref compiler/GHC/Tc/Gen/Expr.hs:670:24: Note [Disambiguating record fields]
+ref compiler/GHC/StgToCmm/Expr.hs:849:3: Note [alg-alt heap check]
+ref compiler/GHC/Tc/Errors.hs:178:13: Note [Fail fast on kind errors]
+ref compiler/GHC/Tc/Errors.hs:2239:0: Note [Highlighting ambiguous type variables]
+ref compiler/GHC/Tc/Errors/Ppr.hs:2236:11: Note [Highlighting ambiguous type variables]
+ref compiler/GHC/Tc/Errors/Types.hs:2979:28: Note [Don't promote data constructors with non-equality contexts]
+ref compiler/GHC/Tc/Gen/Arrow.hs:438:29: Note [RecStmt]
+ref compiler/GHC/Tc/Gen/Expr.hs:662:24: Note [Disambiguating record fields]
ref compiler/GHC/Tc/Gen/Expr.hs:1195:7: Note [Disambiguating record fields]
-ref compiler/GHC/Tc/Gen/Expr.hs:1298:11: Note [Deprecating ambiguous fields]
ref compiler/GHC/Tc/Gen/Foreign.hs:149:26: Note [Expanding newtypes]
-ref compiler/GHC/Tc/Gen/HsType.hs:552:56: Note [Skolem escape prevention]
-ref compiler/GHC/Tc/Gen/HsType.hs:2623:7: Note [Matching a kind sigature with a declaration]
-ref compiler/GHC/Tc/Gen/Match.hs:553:20: Note [GroupStmt binder map]
-ref compiler/GHC/Tc/Gen/Match.hs:746:20: Note [GroupStmt binder map]
-ref compiler/GHC/Tc/Gen/Match.hs:1011:0: Note [typechecking ApplicativeStmt]
-ref compiler/GHC/Tc/Gen/Pat.hs:169:20: Note [Typing patterns in pattern bindings]
-ref compiler/GHC/Tc/Gen/Pat.hs:476:7: Note [Pattern coercions]
-ref compiler/GHC/Tc/Gen/Pat.hs:1077:7: Note [Matching polytyped patterns]
-ref compiler/GHC/Tc/Gen/Pat.hs:1376:16: Note [Pattern coercions]
+ref compiler/GHC/Tc/Gen/HsType.hs:551:56: Note [Skolem escape prevention]
+ref compiler/GHC/Tc/Gen/HsType.hs:2619:7: Note [Matching a kind sigature with a declaration]
+ref compiler/GHC/Tc/Gen/Match.hs:549:20: Note [GroupStmt binder map]
+ref compiler/GHC/Tc/Gen/Match.hs:742:20: Note [GroupStmt binder map]
+ref compiler/GHC/Tc/Gen/Match.hs:1007:0: Note [typechecking ApplicativeStmt]
+ref compiler/GHC/Tc/Gen/Pat.hs:171:20: Note [Typing patterns in pattern bindings]
+ref compiler/GHC/Tc/Gen/Pat.hs:480:7: Note [Pattern coercions]
+ref compiler/GHC/Tc/Gen/Pat.hs:1107:7: Note [Matching polytyped patterns]
+ref compiler/GHC/Tc/Gen/Pat.hs:1407:16: Note [Pattern coercions]
ref compiler/GHC/Tc/Gen/Sig.hs:78:10: Note [Overview of type signatures]
ref compiler/GHC/Tc/Instance/Family.hs:515:35: Note [Constrained family instances]
-ref compiler/GHC/Tc/Module.hs:698:15: Note [Extra dependencies from .hs-boot files]
-ref compiler/GHC/Tc/Solver/Canonical.hs:1229:33: Note [Canonical LHS]
-ref compiler/GHC/Tc/Solver/Interact.hs:1638:9: Note [No touchables as FunEq RHS]
-ref compiler/GHC/Tc/Solver/Rewrite.hs:1032:7: Note [Stability of rewriting]
+ref compiler/GHC/Tc/Module.hs:705:15: Note [Extra dependencies from .hs-boot files]
+ref compiler/GHC/Tc/Solver/Canonical.hs:1087:33: Note [Canonical LHS]
+ref compiler/GHC/Tc/Solver/Interact.hs:1611:9: Note [No touchables as FunEq RHS]
+ref compiler/GHC/Tc/Solver/Rewrite.hs:988:7: Note [Stability of rewriting]
ref compiler/GHC/Tc/TyCl.hs:627:3: Note [Single function non-recursive binding special-case]
ref compiler/GHC/Tc/TyCl.hs:1106:6: Note [Unification variables need fresh Names]
ref compiler/GHC/Tc/TyCl.hs:1895:13: Note [TyConBinders for the result kind signatures of a data type]
ref compiler/GHC/Tc/TyCl/Instance.hs:947:26: Note [Generalising in tcFamTyPatsGuts]
-ref compiler/GHC/Tc/Types.hs:696:33: Note [Extra dependencies from .hs-boot files]
-ref compiler/GHC/Tc/Types.hs:1230:36: Note [Bindings with closed types]
-ref compiler/GHC/Tc/Types.hs:1466:47: Note [Care with plugin imports]
-ref compiler/GHC/Tc/Types/Constraint.hs:238:34: Note [NonCanonical Semantics]
+ref compiler/GHC/Tc/Types.hs:702:33: Note [Extra dependencies from .hs-boot files]
+ref compiler/GHC/Tc/Types.hs:1217:36: Note [Bindings with closed types]
+ref compiler/GHC/Tc/Types.hs:1430:47: Note [Care with plugin imports]
+ref compiler/GHC/Tc/Types/Constraint.hs:253:34: Note [NonCanonical Semantics]
ref compiler/GHC/Tc/Utils/Env.hs:556:7: Note [Bindings with closed types]
ref compiler/GHC/Tc/Utils/Env.hs:1128:7: Note [Generating fresh names for ccall wrapper]
ref compiler/GHC/Tc/Utils/Env.hs:1192:7: Note [Placeholder PatSyn kinds]
-ref compiler/GHC/Tc/Utils/TcMType.hs:793:7: Note [Kind checking for GADTs]
-ref compiler/GHC/Tc/Utils/TcType.hs:529:7: Note [TyVars and TcTyVars]
-ref compiler/GHC/ThToHs.hs:1738:11: Note [Adding parens for splices]
-ref compiler/GHC/ThToHs.hs:1749:3: Note [Adding parens for splices]
-ref compiler/GHC/Types/Basic.hs:619:17: Note [Safe Haskell isSafeOverlap]
-ref compiler/GHC/Types/Demand.hs:307:25: Note [Preserving Boxity of results is rarely a win]
-ref compiler/GHC/Types/Demand.hs:1100:4: Note [Use one-shot information]
+ref compiler/GHC/Tc/Utils/TcMType.hs:750:7: Note [Kind checking for GADTs]
+ref compiler/GHC/Tc/Utils/TcType.hs:591:7: Note [TyVars and TcTyVars]
+ref compiler/GHC/ThToHs.hs:1790:11: Note [Adding parens for splices]
+ref compiler/GHC/ThToHs.hs:1801:3: Note [Adding parens for splices]
+ref compiler/GHC/Types/Basic.hs:624:17: Note [Safe Haskell isSafeOverlap]
+ref compiler/GHC/Types/Demand.hs:310:25: Note [Preserving Boxity of results is rarely a win]
+ref compiler/GHC/Types/Demand.hs:1146:4: Note [Use one-shot information]
ref compiler/GHC/Types/Name/Occurrence.hs:301:4: Note [Unique OccNames from Template Haskell]
ref compiler/GHC/Types/Unique.hs:78:25: Note [Uniques-prelude - Uniques for wired-in Prelude things]
-ref compiler/GHC/Unit/Module/Deps.hs:79:13: Note [Structure of dep_boot_mods]
+ref compiler/GHC/Unit/Module/Deps.hs:82:13: Note [Structure of dep_boot_mods]
ref compiler/GHC/Utils/Monad.hs:391:34: Note [multiShotIO]
-ref compiler/Language/Haskell/Syntax/Binds.hs:226:31: Note [fun_id in Match]
-ref compiler/Language/Haskell/Syntax/Expr.hs:1561:32: Note [Quasi-quote overview]
+ref compiler/Language/Haskell/Syntax/Binds.hs:204:31: Note [fun_id in Match]
+ref compiler/Language/Haskell/Syntax/Expr.hs:1558:32: Note [Quasi-quote overview]
ref compiler/Language/Haskell/Syntax/Pat.hs:336:12: Note [Disambiguating record fields]
ref configure.ac:212:10: Note [Linking ghc-bin against threaded stage0 RTS]
ref docs/core-spec/core-spec.mng:177:6: Note [TyBinders]
-ref ghc/GHCi/UI.hs:3646:25: Note [ModBreaks.decls]
+ref ghc/GHCi/UI.hs:3642:25: Note [ModBreaks.decls]
ref ghc/ghc.mk:62:6: Note [Linking ghc-bin against threaded stage0 RTS]
ref hadrian/src/Expression.hs:130:30: Note [Linking ghc-bin against threaded stage0 RTS]
-ref libraries/base/GHC/ST.hs:139:7: Note [Definition of runRW#]
+ref libraries/base/GHC/ST.hs:134:7: Note [Definition of runRW#]
ref linters/lint-notes/Notes.hs:32:29: Note [" <> T.unpack x <> "]
ref linters/lint-notes/Notes.hs:69:22: Note [...]
-ref testsuite/config/ghc:212:10: Note [WayFlags]
-ref testsuite/driver/testlib.py:152:10: Note [Why is there no stage1 setup function?]
-ref testsuite/driver/testlib.py:156:2: Note [Why is there no stage1 setup function?]
-ref testsuite/mk/boilerplate.mk:263:2: Note [WayFlags]
+ref testsuite/config/ghc:240:10: Note [WayFlags]
+ref testsuite/driver/testlib.py:153:10: Note [Why is there no stage1 setup function?]
+ref testsuite/driver/testlib.py:157:2: Note [Why is there no stage1 setup function?]
+ref testsuite/mk/boilerplate.mk:267:2: Note [WayFlags]
ref testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs:30:27: Note [Extra TcS Untouchables]
ref testsuite/tests/perf/join_points/join005.hs:19:63: Note [Don't CPR join points]
ref testsuite/tests/perf/should_run/all.T:3:6: Note [Solving from instances when interacting Dicts]
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
index a7eb1debd1..112be12759 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail01.stderr
@@ -1,23 +1,16 @@
overloadedrecfldsfail01.hs:11:10: error:
- Record update is ambiguous, and requires a type signature
- In the expression: r {x = 3}
- In an equation for ‘upd1’: upd1 r = r {x = 3}
+ • Record update is ambiguous, and requires a type signature
+ • In the expression: r {x = 3}
+ In an equation for ‘upd1’: upd1 r = r {x = 3}
overloadedrecfldsfail01.hs:14:10: error:
- No type has all these fields: ‘x’, ‘y’, ‘z’
- In the expression: r {x = 3, y = True, z = False}
- In an equation for ‘upd2’: upd2 r = r {x = 3, y = True, z = False}
+ • No type has all these fields: ‘x’, ‘y’, ‘z’
+ • In the expression: r {x = 3, y = True, z = False}
+ In an equation for ‘upd2’: upd2 r = r {x = 3, y = True, z = False}
overloadedrecfldsfail01.hs:17:10: error:
- ‘x’ is not a (visible) field of type ‘U’
- In the expression: r {w = True, x = 3, y = True} :: U
- In an equation for ‘upd3’:
- upd3 r = r {w = True, x = 3, y = True} :: U
-
-overloadedrecfldsfail01.hs:17:10: error:
- ‘w’ is not a (visible) field of type ‘U’
- In the expression: r {w = True, x = 3, y = True} :: U
- In an equation for ‘upd3’:
- upd3 r = r {w = True, x = 3, y = True} :: U
-
+ • Record update is ambiguous, and requires a type signature
+ • In the expression: r {w = True, x = 3, y = True} :: U
+ In an equation for ‘upd3’:
+ upd3 r = r {w = True, x = 3, y = True} :: U
diff --git a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
index 10e3b1ece8..07b000f100 100644
--- a/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
+++ b/testsuite/tests/overloadedrecflds/should_fail/overloadedrecfldsfail06.stderr
@@ -10,27 +10,12 @@ OverloadedRecFldsFail06_A.hs:9:59: warning: [-Wunused-top-binds (in -Wextra, -Wu
Defined but not used: ‘used_locally’
[2 of 3] Compiling Main ( overloadedrecfldsfail06.hs, overloadedrecfldsfail06.o )
-overloadedrecfldsfail06.hs:7:1: error: [-Wunused-imports (in -Wextra), -Werror=unused-imports]
- The import of ‘Unused(unused), V(x), U(y), MkV, Unused’
- from module ‘OverloadedRecFldsFail06_A’ is redundant
-
-overloadedrecfldsfail06.hs:8:1: error: [-Wunused-imports (in -Wextra), -Werror=unused-imports]
- The qualified import of ‘OverloadedRecFldsFail06_A’ is redundant
- except perhaps to import instances from ‘OverloadedRecFldsFail06_A’
- To import instances alone, use: import OverloadedRecFldsFail06_A()
-
-overloadedrecfldsfail06.hs:9:1: error: [-Wunused-imports (in -Wextra), -Werror=unused-imports]
- The qualified import of ‘V(y)’
- from module ‘OverloadedRecFldsFail06_A’ is redundant
-
-overloadedrecfldsfail06.hs:10:1: error: [-Wunused-imports (in -Wextra), -Werror=unused-imports]
- The qualified import of ‘U(x), U’
- from module ‘OverloadedRecFldsFail06_A’ is redundant
-
-overloadedrecfldsfail06.hs:15:22: error: [-Wambiguous-fields (in -Wdefault), -Werror=ambiguous-fields]
- The record update u {x = True} with type U is ambiguous.
- This will not be supported by -XDuplicateRecordFields in future releases of GHC.
-
-overloadedrecfldsfail06.hs:18:28: error: [-Wambiguous-fields (in -Wdefault), -Werror=ambiguous-fields]
- The record update v {P.x = 3} with type V is ambiguous.
- This will not be supported by -XDuplicateRecordFields in future releases of GHC.
+overloadedrecfldsfail06.hs:15:18: error:
+ • Record update is ambiguous, and requires a type signature
+ • In the first argument of ‘print’, namely ‘(u {x = True} :: U)’
+ In a stmt of a 'do' block: print (u {x = True} :: U)
+ In the expression:
+ do print (u {x = True} :: U)
+ print ((\ MkV2 {y = y} -> y) v)
+ print (N.x v)
+ print (getY (v {P.x = 3}))
diff --git a/testsuite/tests/overloadedrecflds/should_run/all.T b/testsuite/tests/overloadedrecflds/should_run/all.T
index 8d6d9850bb..f6e51e320c 100644
--- a/testsuite/tests/overloadedrecflds/should_run/all.T
+++ b/testsuite/tests/overloadedrecflds/should_run/all.T
@@ -1,10 +1,6 @@
-test('overloadedrecfldsrun01', [], multimod_compile_and_run,
- ['overloadedrecfldsrun01', ''])
test('overloadedrecfldsrun02', [extra_files(['OverloadedRecFldsRun02_A.hs'])], multimod_compile_and_run,
['overloadedrecfldsrun02', ''])
-test('overloadedrecfldsrun03', normal, compile_and_run, [''])
test('overloadedrecfldsrun04', omit_ways(prof_ways), compile_and_run, [''])
-test('overloadedrecfldsrun05', normal, compile_and_run, [''])
test('overloadedrecfldsrun07', normal, compile_and_run, [''])
test('overloadedrecflds_generics', normal, compile_and_run, [''])
test('overloadedlabelsrun01', normal, compile_and_run, [''])