From 44bb71115bcf1edaee82fc75cbe07a3e242e9476 Mon Sep 17 00:00:00 2001 From: romes Date: Sun, 22 May 2022 21:05:32 +0200 Subject: TTG: Move MatchGroup Origin field and MatchGroupTc to GHC.Hs --- testsuite/tests/ghc-api/T6145.hs | 2 +- testsuite/tests/module/mod185.stderr | 5 +- .../parser/should_compile/DumpParsedAst.stderr | 5 +- .../should_compile/DumpParsedAstComments.stderr | 16 +++--- .../parser/should_compile/DumpRenamedAst.stderr | 5 +- .../tests/parser/should_compile/DumpSemis.stderr | 60 +++++++++------------- .../should_compile/DumpTypecheckedAst.stderr | 6 +-- .../tests/parser/should_compile/KindSigs.stderr | 10 ++-- .../tests/parser/should_compile/T20718.stderr | 7 +-- .../tests/parser/should_compile/T20846.stderr | 7 +-- testsuite/tests/printer/Test20297.stdout | 32 +++++------- 11 files changed, 68 insertions(+), 87 deletions(-) (limited to 'testsuite/tests') diff --git a/testsuite/tests/ghc-api/T6145.hs b/testsuite/tests/ghc-api/T6145.hs index f9dbfff86c..2b55c1267d 100644 --- a/testsuite/tests/ghc-api/T6145.hs +++ b/testsuite/tests/ghc-api/T6145.hs @@ -40,7 +40,7 @@ main = do isDataCon (L _ (XHsBindsLR (AbsBinds { abs_binds = bs }))) = not (isEmptyBag (filterBag isDataCon bs)) isDataCon (L l (f@FunBind {})) - | (MG _ (L _ (m:_)) _) <- fun_matches f, + | (MG _ (L _ (m:_))) <- fun_matches f, ((L _ (c@ConPat{})):_)<-hsLMatchPats m, (L l _)<-pat_con c = isGoodSrcSpan (locA l) -- Check that the source location is a good one diff --git a/testsuite/tests/module/mod185.stderr b/testsuite/tests/module/mod185.stderr index 04dc4758b1..678557c52f 100644 --- a/testsuite/tests/module/mod185.stderr +++ b/testsuite/tests/module/mod185.stderr @@ -75,7 +75,7 @@ (Unqual {OccName: main})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { mod185.hs:5:1-24 }) [(L @@ -124,8 +124,7 @@ {ModuleName: Prelude} {OccName: undefined}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) diff --git a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr index 089fe770c8..c91d8cdc70 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpParsedAst.stderr @@ -1457,7 +1457,7 @@ (Unqual {OccName: main})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpParsedAst.hs:24:1-23 }) [(L @@ -1528,8 +1528,7 @@ (SourceText "hello") {FastString: "hello"})))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) diff --git a/testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr b/testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr index f25f99cd32..6673dff801 100644 --- a/testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr +++ b/testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr @@ -33,7 +33,7 @@ (UnchangedAnchor)) (EpaComment (EpaBlockComment - "{-/n Block comment at the beginning/n -}") + "{-\n Block comment at the beginning\n -}") { DumpParsedAstComments.hs:1:1-28 }))] [(L (Anchor @@ -76,7 +76,7 @@ (Unqual {OccName: foo})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpParsedAstComments.hs:(7,1)-(9,3) }) @@ -185,8 +185,7 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -206,7 +205,7 @@ (Unqual {OccName: main})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpParsedAstComments.hs:12:1-23 }) [(L @@ -277,8 +276,9 @@ (SourceText "hello") {FastString: "hello"})))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) - (Nothing))) \ No newline at end of file + (Nothing))) + + diff --git a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr index c89f054ce4..f5fc2e9d00 100644 --- a/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpRenamedAst.stderr @@ -26,7 +26,7 @@ (SrcSpanAnn (EpAnnNotUsed) { DumpRenamedAst.hs:34:1-4 }) {Name: DumpRenamedAst.main}) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpRenamedAst.hs:34:1-23 }) [(L @@ -81,8 +81,7 @@ (SourceText "hello") {FastString: "hello"})))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))]})] [])) [] diff --git a/testsuite/tests/parser/should_compile/DumpSemis.stderr b/testsuite/tests/parser/should_compile/DumpSemis.stderr index 8f7b2252d8..45a3d7acda 100644 --- a/testsuite/tests/parser/should_compile/DumpSemis.stderr +++ b/testsuite/tests/parser/should_compile/DumpSemis.stderr @@ -230,7 +230,7 @@ (Unqual {OccName: foo})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:(10,1)-(12,3) }) [(L @@ -381,8 +381,7 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -476,7 +475,7 @@ (Unqual {OccName: bar})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:(15,1)-(19,3) }) [(L @@ -593,8 +592,7 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -682,7 +680,7 @@ (Unqual {OccName: baz})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:22:1-30 }) [(L @@ -831,8 +829,7 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -852,7 +849,7 @@ (Unqual {OccName: a})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:24:1-13 }) [(L @@ -900,8 +897,7 @@ (Unqual {OccName: undefined}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -921,7 +917,7 @@ (Unqual {OccName: b})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:25:1-13 }) [(L @@ -969,8 +965,7 @@ (Unqual {OccName: undefined}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -991,7 +986,7 @@ (Unqual {OccName: s})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:26:1-13 }) [(L @@ -1039,8 +1034,7 @@ (Unqual {OccName: undefined}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -1375,7 +1369,7 @@ (Unqual {OccName: f})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:32:1-7 }) [(L @@ -1442,8 +1436,7 @@ (Unqual {OccName: x}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -1466,7 +1459,7 @@ (Unqual {OccName: x})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:34:8-35 }) [(L @@ -1568,7 +1561,7 @@ (Unqual {OccName: y})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:34:19-21 }) [(L @@ -1625,8 +1618,7 @@ (False) (2))))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])) ,(L (SrcSpanAnn (EpAnn @@ -1651,7 +1643,7 @@ (Unqual {OccName: z})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:34:24-26 }) [(L @@ -1708,8 +1700,7 @@ (False) (3))))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))]} [])) (L @@ -1725,8 +1716,7 @@ (Unqual {OccName: y}))))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -1746,7 +1736,7 @@ (Unqual {OccName: fot})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { DumpSemis.hs:(36,1)-(44,4) }) [(L @@ -1822,7 +1812,7 @@ (Unqual {OccName: x})))) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnn (Anchor @@ -2124,11 +2114,9 @@ (SourceText 'd') ('d'))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource))))))] + (NoExtField)))))]))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) diff --git a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr index 59b4113c1b..8cc15cc04c 100644 --- a/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr +++ b/testsuite/tests/parser/should_compile/DumpTypecheckedAst.stderr @@ -1547,7 +1547,8 @@ ({abstract:TyCon}) [(TyConApp ({abstract:TyCon}) - [])])) + [])]) + (FromSource)) (L (SrcSpanAnn (EpAnnNotUsed) { DumpTypecheckedAst.hs:19:1-23 }) [(L @@ -1596,8 +1597,7 @@ (SourceText "hello") {FastString: "hello"})))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))]} (False))))]} diff --git a/testsuite/tests/parser/should_compile/KindSigs.stderr b/testsuite/tests/parser/should_compile/KindSigs.stderr index 634d488cf7..b3107c18c6 100644 --- a/testsuite/tests/parser/should_compile/KindSigs.stderr +++ b/testsuite/tests/parser/should_compile/KindSigs.stderr @@ -843,7 +843,7 @@ (Unqual {OccName: qux})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { KindSigs.hs:23:1-12 }) [(L @@ -915,8 +915,7 @@ (Exact {Name: ()}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -1464,7 +1463,7 @@ (Unqual {OccName: true})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { KindSigs.hs:35:1-11 }) [(L @@ -1512,8 +1511,7 @@ (Unqual {OccName: True}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) diff --git a/testsuite/tests/parser/should_compile/T20718.stderr b/testsuite/tests/parser/should_compile/T20718.stderr index c041db260a..77563d8631 100644 --- a/testsuite/tests/parser/should_compile/T20718.stderr +++ b/testsuite/tests/parser/should_compile/T20718.stderr @@ -98,7 +98,7 @@ (Unqual {OccName: x})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { T20718.hs:8:1-5 }) [(L @@ -155,8 +155,9 @@ (False) (1))))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) + + diff --git a/testsuite/tests/parser/should_compile/T20846.stderr b/testsuite/tests/parser/should_compile/T20846.stderr index f68526360d..775531c619 100644 --- a/testsuite/tests/parser/should_compile/T20846.stderr +++ b/testsuite/tests/parser/should_compile/T20846.stderr @@ -89,7 +89,7 @@ (Unqual {OccName: ++++})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { T20846.hs:4:1-18 }) [(L @@ -148,8 +148,9 @@ (Unqual {OccName: undefined}))))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) [])))] (Nothing) (Nothing))) + + diff --git a/testsuite/tests/printer/Test20297.stdout b/testsuite/tests/printer/Test20297.stdout index 6d7212f250..2328e8201c 100644 --- a/testsuite/tests/printer/Test20297.stdout +++ b/testsuite/tests/printer/Test20297.stdout @@ -66,7 +66,7 @@ (Unqual {OccName: bar})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.hs:(5,1)-(7,7) }) [(L @@ -140,8 +140,7 @@ (NoAnnSortKey) {Bag(LocatedA (HsBind GhcPs)): []} - [])))))]) - (FromSource)) + [])))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -161,7 +160,7 @@ (Unqual {OccName: foo})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.hs:(9,1)-(11,26) }) [(L @@ -250,7 +249,7 @@ (Unqual {OccName: doStuff})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.hs:11:9-26 }) [(L @@ -340,11 +339,9 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))]} - [])))))]) - (FromSource)) + [])))))])) [])))] (Nothing) (Nothing))) @@ -411,7 +408,7 @@ (Unqual {OccName: bar})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.ppr.hs:(3,1)-(5,7) }) [(L @@ -478,8 +475,7 @@ (NoAnnSortKey) {Bag(LocatedA (HsBind GhcPs)): []} - [])))))]) - (FromSource)) + [])))))])) []))) ,(L (SrcSpanAnn (EpAnn @@ -499,7 +495,7 @@ (Unqual {OccName: foo})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.ppr.hs:(6,1)-(9,24) }) [(L @@ -581,7 +577,7 @@ (Unqual {OccName: doStuff})) (MG - (NoExtField) + (FromSource) (L (SrcSpanAnn (EpAnnNotUsed) { Test20297.ppr.hs:9:7-24 }) [(L @@ -671,11 +667,11 @@ (NoExtField) (NoExtField)))])))))] (EmptyLocalBinds - (NoExtField)))))]) - (FromSource)) + (NoExtField)))))])) []))]} - [])))))]) - (FromSource)) + [])))))])) [])))] (Nothing) (Nothing))) + + -- cgit v1.2.1