[Git][ghc/ghc][master] Update showAstData to honour blanking of AnnParen

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Mar 8 00:42:00 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
bfc09760 by Alan Zimmerman at 2024-03-07T19:41:22-05:00
Update showAstData to honour blanking of AnnParen

Also tweak rendering of SrcSpan to remove extra blank line.

- - - - -


12 changed files:

- compiler/GHC/Hs/Dump.hs
- compiler/GHC/Parser/Annotation.hs
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
- testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
- testsuite/tests/parser/should_compile/DumpSemis.stderr
- testsuite/tests/parser/should_compile/KindSigs.stderr
- testsuite/tests/parser/should_compile/T15323.stderr
- testsuite/tests/parser/should_compile/T20452.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr


Changes:

=====================================
compiler/GHC/Hs/Dump.hs
=====================================
@@ -71,6 +71,7 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
               `extQ` annotationEpaLocation
               `extQ` annotationNoEpAnns
               `extQ` addEpAnn
+              `extQ` annParen
               `extQ` lit `extQ` litr `extQ` litt
               `extQ` sourceText
               `extQ` deltaPos
@@ -173,27 +174,21 @@ showAstData bs ba a0 = blankLine $$ showAstData' a0
             srcSpan :: SrcSpan -> SDoc
             srcSpan ss = case bs of
              BlankSrcSpan -> text "{ ss }"
-             NoBlankSrcSpan -> braces $ char ' ' <>
-                             (hang (ppr ss) 1
-                                   -- TODO: show annotations here
-                                   (text ""))
-             BlankSrcSpanFile -> braces $ char ' ' <>
-                             (hang (pprUserSpan False ss) 1
-                                   -- TODO: show annotations here
-                                   (text ""))
+             NoBlankSrcSpan -> braces $ char ' ' <> (ppr ss) <> char ' '
+             BlankSrcSpanFile -> braces $ char ' ' <> (pprUserSpan False ss) <> char ' '
 
             realSrcSpan :: RealSrcSpan -> SDoc
             realSrcSpan ss = case bs of
              BlankSrcSpan -> text "{ ss }"
-             NoBlankSrcSpan -> braces $ char ' ' <>
-                             (hang (ppr ss) 1
-                                   -- TODO: show annotations here
-                                   (text ""))
-             BlankSrcSpanFile -> braces $ char ' ' <>
-                             (hang (pprUserRealSpan False ss) 1
-                                   -- TODO: show annotations here
-                                   (text ""))
+             NoBlankSrcSpan -> braces $ char ' ' <> (ppr ss) <> char ' '
+             BlankSrcSpanFile -> braces $ char ' ' <> (pprUserRealSpan False ss) <> char ' '
 
+            annParen :: AnnParen -> SDoc
+            annParen (AnnParen a o c) = case ba of
+             BlankEpAnnotations -> parens $ text "blanked:" <+> text "AnnParen"
+             NoBlankEpAnnotations ->
+              parens $ text "AnnParen"
+                        $$ vcat [ppr a, epaAnchor o, epaAnchor c]
 
             addEpAnn :: AddEpAnn -> SDoc
             addEpAnn (AddEpAnn a s) = case ba of


=====================================
compiler/GHC/Parser/Annotation.hs
=====================================
@@ -745,7 +745,7 @@ data ParenType
   = AnnParens       -- ^ '(', ')'
   | AnnParensHash   -- ^ '(#', '#)'
   | AnnParensSquare -- ^ '[', ']'
-  deriving (Eq, Ord, Data)
+  deriving (Eq, Ord, Data, Show)
 
 -- | Maps the 'ParenType' to the related opening and closing
 -- AnnKeywordId. Used when actually printing the item.
@@ -1452,6 +1452,8 @@ instance (Outputable a, OutputableBndr e)
   pprInfixOcc = pprInfixOcc . unLoc
   pprPrefixOcc = pprPrefixOcc . unLoc
 
+instance Outputable ParenType where
+  ppr t = text (show t)
 
 instance Outputable AnnListItem where
   ppr (AnnListItem ts) = text "AnnListItem" <+> ppr ts


=====================================
testsuite/tests/ghc-api/exactprint/Test20239.stderr
=====================================
@@ -200,10 +200,7 @@
                   (EpaComments
                    []))
                  (HsParTy
-                  (AnnParen
-                   (AnnParens)
-                   (EpaSpan { Test20239.hs:7:50 })
-                   (EpaSpan { Test20239.hs:7:86 }))
+                  (AnnParen AnnParens (EpaSpan { Test20239.hs:7:50 }) (EpaSpan { Test20239.hs:7:86 }))
                   (L
                    (EpAnn
                     (EpaSpan { Test20239.hs:7:51-85 })
@@ -272,10 +269,7 @@
                         (EpaComments
                          []))
                        (HsParTy
-                        (AnnParen
-                         (AnnParens)
-                         (EpaSpan { Test20239.hs:7:68 })
-                         (EpaSpan { Test20239.hs:7:85 }))
+                        (AnnParen AnnParens (EpaSpan { Test20239.hs:7:68 }) (EpaSpan { Test20239.hs:7:85 }))
                         (L
                          (EpAnn
                           (EpaSpan { Test20239.hs:7:69-84 })
@@ -340,10 +334,7 @@
                             (EpaComments
                              []))
                            (HsTupleTy
-                            (AnnParen
-                             (AnnParens)
-                             (EpaSpan { Test20239.hs:7:83 })
-                             (EpaSpan { Test20239.hs:7:84 }))
+                            (AnnParen AnnParens (EpaSpan { Test20239.hs:7:83 }) (EpaSpan { Test20239.hs:7:84 }))
                             (HsBoxedOrConstraintTuple)
                             [])))))))))))))])
              (Nothing)))])


=====================================
testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
=====================================
@@ -227,10 +227,7 @@
                (EpaComments
                 []))
               (HsTupleTy
-               (AnnParen
-                (AnnParens)
-                (EpaSpan { T17544_kw.hs:19:18 })
-                (EpaSpan { T17544_kw.hs:19:19 }))
+               (AnnParen AnnParens (EpaSpan { T17544_kw.hs:19:18 }) (EpaSpan { T17544_kw.hs:19:19 }))
                (HsBoxedOrConstraintTuple)
                [])))])
           (L


=====================================
testsuite/tests/parser/should_compile/DumpParsedAst.stderr
=====================================
@@ -228,10 +228,7 @@
             (EpaComments
              []))
            (HsListTy
-            (AnnParen
-             (AnnParensSquare)
-             (EpaSpan { DumpParsedAst.hs:9:16 })
-             (EpaSpan { DumpParsedAst.hs:9:18 }))
+            (AnnParen AnnParensSquare (EpaSpan { DumpParsedAst.hs:9:16 }) (EpaSpan { DumpParsedAst.hs:9:18 }))
             (L
              (EpAnn
               (EpaSpan { DumpParsedAst.hs:9:17 })
@@ -318,10 +315,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaSpan { DumpParsedAst.hs:11:10 })
-                 (EpaSpan { DumpParsedAst.hs:11:17 }))
+                (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:11:10 }) (EpaSpan { DumpParsedAst.hs:11:17 }))
                 (L
                  (EpAnn
                   (EpaSpan { DumpParsedAst.hs:11:11-16 })
@@ -416,10 +410,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaSpan { DumpParsedAst.hs:11:26 })
-                 (EpaSpan { DumpParsedAst.hs:11:36 }))
+                (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:11:26 }) (EpaSpan { DumpParsedAst.hs:11:36 }))
                 (L
                  (EpAnn
                   (EpaSpan { DumpParsedAst.hs:11:27-35 })
@@ -564,10 +555,7 @@
              (EpaComments
               []))
             (HsListTy
-             (AnnParen
-              (AnnParensSquare)
-              (EpaSpan { DumpParsedAst.hs:10:27 })
-              (EpaSpan { DumpParsedAst.hs:10:29 }))
+             (AnnParen AnnParensSquare (EpaSpan { DumpParsedAst.hs:10:27 }) (EpaSpan { DumpParsedAst.hs:10:29 }))
              (L
               (EpAnn
                (EpaSpan { DumpParsedAst.hs:10:28 })
@@ -744,10 +732,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaSpan { DumpParsedAst.hs:15:25 })
-                 (EpaSpan { DumpParsedAst.hs:15:29 }))
+                (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:15:25 }) (EpaSpan { DumpParsedAst.hs:15:29 }))
                 (L
                  (EpAnn
                   (EpaSpan { DumpParsedAst.hs:15:26-28 })
@@ -882,10 +867,7 @@
               (EpaComments
                []))
              (HsParTy
-              (AnnParen
-               (AnnParens)
-               (EpaSpan { DumpParsedAst.hs:17:17 })
-               (EpaSpan { DumpParsedAst.hs:17:27 }))
+              (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:17:17 }) (EpaSpan { DumpParsedAst.hs:17:27 }))
               (L
                (EpAnn
                 (EpaSpan { DumpParsedAst.hs:17:18-26 })
@@ -1478,10 +1460,7 @@
             (EpaComments
              []))
            (HsParTy
-            (AnnParen
-             (AnnParens)
-             (EpaSpan { DumpParsedAst.hs:22:22 })
-             (EpaSpan { DumpParsedAst.hs:22:37 }))
+            (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:22:22 }) (EpaSpan { DumpParsedAst.hs:22:37 }))
             (L
              (EpAnn
               (EpaSpan { DumpParsedAst.hs:22:23-36 })
@@ -1588,10 +1567,7 @@
               (EpaComments
                []))
              (HsParTy
-              (AnnParen
-               (AnnParens)
-               (EpaSpan { DumpParsedAst.hs:22:42 })
-               (EpaSpan { DumpParsedAst.hs:22:52 }))
+              (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:22:42 }) (EpaSpan { DumpParsedAst.hs:22:52 }))
               (L
                (EpAnn
                 (EpaSpan { DumpParsedAst.hs:22:43-51 })
@@ -1712,10 +1688,7 @@
                  (EpaComments
                   []))
                 (HsParTy
-                 (AnnParen
-                  (AnnParens)
-                  (EpaSpan { DumpParsedAst.hs:23:10 })
-                  (EpaSpan { DumpParsedAst.hs:23:34 }))
+                 (AnnParen AnnParens (EpaSpan { DumpParsedAst.hs:23:10 }) (EpaSpan { DumpParsedAst.hs:23:34 }))
                  (L
                   (EpAnn
                    (EpaSpan { DumpParsedAst.hs:23:11-33 })


=====================================
testsuite/tests/parser/should_compile/DumpParsedAstComments.stderr
=====================================
@@ -9,8 +9,7 @@
     (EpaSpan { DumpParsedAstComments.hs:1:1 })
     (AnnsModule
      [(AddEpAnn AnnModule (EpaSpan { DumpParsedAstComments.hs:5:1-6 }))
-     ,(AddEpAnn AnnWhere (EpaSpan { DumpParsedAstComments.hs:5:30-34
-                                     }))]
+     ,(AddEpAnn AnnWhere (EpaSpan { DumpParsedAstComments.hs:5:30-34 }))]
      []
      (Just
       ((,)


=====================================
testsuite/tests/parser/should_compile/DumpRenamedAst.stderr
=====================================
@@ -273,10 +273,7 @@
                   (EpaComments
                    []))
                  (HsParTy
-                  (AnnParen
-                   (AnnParens)
-                   (EpaDelta (SameLine 0) [])
-                   (EpaDelta (SameLine 0) []))
+                  (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                   (L
                    (EpAnn
                     (EpaSpan { DumpRenamedAst.hs:13:11-16 })
@@ -367,10 +364,7 @@
                   (EpaComments
                    []))
                  (HsParTy
-                  (AnnParen
-                   (AnnParens)
-                   (EpaDelta (SameLine 0) [])
-                   (EpaDelta (SameLine 0) []))
+                  (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                   (L
                    (EpAnn
                     (EpaSpan { DumpRenamedAst.hs:13:27-35 })
@@ -507,10 +501,7 @@
                (EpaComments
                 []))
               (HsListTy
-               (AnnParen
-                (AnnParensSquare)
-                (EpaSpan { DumpRenamedAst.hs:12:27 })
-                (EpaSpan { DumpRenamedAst.hs:12:29 }))
+               (AnnParen AnnParensSquare (EpaSpan { DumpRenamedAst.hs:12:27 }) (EpaSpan { DumpRenamedAst.hs:12:29 }))
                (L
                 (EpAnn
                  (EpaSpan { DumpRenamedAst.hs:12:28 })
@@ -605,10 +596,7 @@
               (EpaComments
                []))
              (HsListTy
-              (AnnParen
-               (AnnParensSquare)
-               (EpaSpan { DumpRenamedAst.hs:11:16 })
-               (EpaSpan { DumpRenamedAst.hs:11:18 }))
+              (AnnParen AnnParensSquare (EpaSpan { DumpRenamedAst.hs:11:16 }) (EpaSpan { DumpRenamedAst.hs:11:18 }))
               (L
                (EpAnn
                 (EpaSpan { DumpRenamedAst.hs:11:17 })
@@ -793,10 +781,7 @@
               (EpaComments
                []))
              (HsParTy
-              (AnnParen
-               (AnnParens)
-               (EpaDelta (SameLine 0) [])
-               (EpaDelta (SameLine 0) []))
+              (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
               (L
                (EpAnn
                 (EpaSpan { DumpRenamedAst.hs:19:23-36 })
@@ -896,10 +881,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaDelta (SameLine 0) [])
-                 (EpaDelta (SameLine 0) []))
+                (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                 (L
                  (EpAnn
                   (EpaSpan { DumpRenamedAst.hs:19:43-51 })
@@ -1009,10 +991,7 @@
                    (EpaComments
                     []))
                   (HsParTy
-                   (AnnParen
-                    (AnnParens)
-                    (EpaDelta (SameLine 0) [])
-                    (EpaDelta (SameLine 0) []))
+                   (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                    (L
                     (EpAnn
                      (EpaSpan { DumpRenamedAst.hs:20:11-33 })
@@ -1347,10 +1326,7 @@
                   (EpaComments
                    []))
                  (HsParTy
-                  (AnnParen
-                   (AnnParens)
-                   (EpaDelta (SameLine 0) [])
-                   (EpaDelta (SameLine 0) []))
+                  (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                   (L
                    (EpAnn
                     (EpaSpan { DumpRenamedAst.hs:22:26-28 })
@@ -1819,10 +1795,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaDelta (SameLine 0) [])
-                 (EpaDelta (SameLine 0) []))
+                (AnnParen AnnParens (EpaDelta (SameLine 0) []) (EpaDelta (SameLine 0) []))
                 (L
                  (EpAnn
                   (EpaSpan { DumpRenamedAst.hs:24:18-26 })
@@ -2066,10 +2039,7 @@
                (EpaComments
                 []))
               (HsListTy
-               (AnnParen
-                (AnnParensSquare)
-                (EpaSpan { DumpRenamedAst.hs:31:12 })
-                (EpaSpan { DumpRenamedAst.hs:31:14 }))
+               (AnnParen AnnParensSquare (EpaSpan { DumpRenamedAst.hs:31:12 }) (EpaSpan { DumpRenamedAst.hs:31:14 }))
                (L
                 (EpAnn
                  (EpaSpan { DumpRenamedAst.hs:31:13 })
@@ -2122,10 +2092,7 @@
                  (EpaComments
                   []))
                 (HsListTy
-                 (AnnParen
-                  (AnnParensSquare)
-                  (EpaSpan { DumpRenamedAst.hs:32:10 })
-                  (EpaSpan { DumpRenamedAst.hs:32:12 }))
+                 (AnnParen AnnParensSquare (EpaSpan { DumpRenamedAst.hs:32:10 }) (EpaSpan { DumpRenamedAst.hs:32:12 }))
                  (L
                   (EpAnn
                    (EpaSpan { DumpRenamedAst.hs:32:11 })


=====================================
testsuite/tests/parser/should_compile/DumpSemis.stderr
=====================================
@@ -212,10 +212,7 @@
              (EpaComments
               []))
             (HsTupleTy
-             (AnnParen
-              (AnnParens)
-              (EpaSpan { DumpSemis.hs:9:11 })
-              (EpaSpan { DumpSemis.hs:9:12 }))
+             (AnnParen AnnParens (EpaSpan { DumpSemis.hs:9:11 }) (EpaSpan { DumpSemis.hs:9:12 }))
              (HsBoxedOrConstraintTuple)
              []))))))))))
   ,(L
@@ -501,10 +498,7 @@
              (EpaComments
               []))
             (HsTupleTy
-             (AnnParen
-              (AnnParens)
-              (EpaSpan { DumpSemis.hs:14:11 })
-              (EpaSpan { DumpSemis.hs:14:12 }))
+             (AnnParen AnnParens (EpaSpan { DumpSemis.hs:14:11 }) (EpaSpan { DumpSemis.hs:14:12 }))
              (HsBoxedOrConstraintTuple)
              []))))))))))
   ,(L
@@ -753,10 +747,7 @@
              (EpaComments
               []))
             (HsTupleTy
-             (AnnParen
-              (AnnParens)
-              (EpaSpan { DumpSemis.hs:21:11 })
-              (EpaSpan { DumpSemis.hs:21:12 }))
+             (AnnParen AnnParens (EpaSpan { DumpSemis.hs:21:11 }) (EpaSpan { DumpSemis.hs:21:12 }))
              (HsBoxedOrConstraintTuple)
              []))))))))))
   ,(L


=====================================
testsuite/tests/parser/should_compile/KindSigs.stderr
=====================================
@@ -268,10 +268,7 @@
         (EpaComments
          []))
        (HsTupleTy
-        (AnnParen
-         (AnnParens)
-         (EpaSpan { KindSigs.hs:15:14 })
-         (EpaSpan { KindSigs.hs:15:51 }))
+        (AnnParen AnnParens (EpaSpan { KindSigs.hs:15:14 }) (EpaSpan { KindSigs.hs:15:51 }))
         (HsBoxedOrConstraintTuple)
         [(L
           (EpAnn
@@ -468,10 +465,7 @@
         (EpaComments
          []))
        (HsTupleTy
-        (AnnParen
-         (AnnParensHash)
-         (EpaSpan { KindSigs.hs:16:15-16 })
-         (EpaSpan { KindSigs.hs:16:53-54 }))
+        (AnnParen AnnParensHash (EpaSpan { KindSigs.hs:16:15-16 }) (EpaSpan { KindSigs.hs:16:53-54 }))
         (HsUnboxedTuple)
         [(L
           (EpAnn
@@ -649,10 +643,7 @@
         (EpaComments
          []))
        (HsListTy
-        (AnnParen
-         (AnnParensSquare)
-         (EpaSpan { KindSigs.hs:19:12 })
-         (EpaSpan { KindSigs.hs:19:26 }))
+        (AnnParen AnnParensSquare (EpaSpan { KindSigs.hs:19:12 }) (EpaSpan { KindSigs.hs:19:26 }))
         (L
          (EpAnn
           (EpaSpan { KindSigs.hs:19:14-24 })
@@ -756,10 +747,7 @@
              (EpaComments
               []))
             (HsParTy
-             (AnnParen
-              (AnnParens)
-              (EpaSpan { KindSigs.hs:22:8 })
-              (EpaSpan { KindSigs.hs:22:20 }))
+             (AnnParen AnnParens (EpaSpan { KindSigs.hs:22:8 }) (EpaSpan { KindSigs.hs:22:20 }))
              (L
               (EpAnn
                (EpaSpan { KindSigs.hs:22:9-19 })
@@ -847,10 +835,7 @@
                (EpaComments
                 []))
               (HsParTy
-               (AnnParen
-                (AnnParens)
-                (EpaSpan { KindSigs.hs:22:33 })
-                (EpaSpan { KindSigs.hs:22:44 }))
+               (AnnParen AnnParens (EpaSpan { KindSigs.hs:22:33 }) (EpaSpan { KindSigs.hs:22:44 }))
                (L
                 (EpAnn
                  (EpaSpan { KindSigs.hs:22:34-43 })
@@ -868,10 +853,7 @@
                    (EpaComments
                     []))
                   (HsTupleTy
-                   (AnnParen
-                    (AnnParens)
-                    (EpaSpan { KindSigs.hs:22:34 })
-                    (EpaSpan { KindSigs.hs:22:35 }))
+                   (AnnParen AnnParens (EpaSpan { KindSigs.hs:22:34 }) (EpaSpan { KindSigs.hs:22:35 }))
                    (HsBoxedOrConstraintTuple)
                    []))
                  (L
@@ -1362,10 +1344,7 @@
              (EpaComments
               []))
             (HsListTy
-             (AnnParen
-              (AnnParensSquare)
-              (EpaSpan { KindSigs.hs:28:34 })
-              (EpaSpan { KindSigs.hs:28:39 }))
+             (AnnParen AnnParensSquare (EpaSpan { KindSigs.hs:28:34 }) (EpaSpan { KindSigs.hs:28:39 }))
              (L
               (EpAnn
                (EpaSpan { KindSigs.hs:28:35-38 })
@@ -1519,10 +1498,7 @@
            (EpaComments
             []))
           (HsParTy
-           (AnnParen
-            (AnnParens)
-            (EpaSpan { KindSigs.hs:34:9 })
-            (EpaSpan { KindSigs.hs:34:22 }))
+           (AnnParen AnnParens (EpaSpan { KindSigs.hs:34:9 }) (EpaSpan { KindSigs.hs:34:22 }))
            (L
             (EpAnn
              (EpaSpan { KindSigs.hs:34:10-21 })


=====================================
testsuite/tests/parser/should_compile/T15323.stderr
=====================================
@@ -163,10 +163,7 @@
                 (EpaComments
                  []))
                (HsParTy
-                (AnnParen
-                 (AnnParens)
-                 (EpaSpan { T15323.hs:6:31 })
-                 (EpaSpan { T15323.hs:6:36 }))
+                (AnnParen AnnParens (EpaSpan { T15323.hs:6:31 }) (EpaSpan { T15323.hs:6:36 }))
                 (L
                  (EpAnn
                   (EpaSpan { T15323.hs:6:32-35 })


=====================================
testsuite/tests/parser/should_compile/T20452.stderr
=====================================
@@ -376,10 +376,7 @@
             (EpaComments
              []))
            (HsListTy
-            (AnnParen
-             (AnnParensSquare)
-             (EpaSpan { T20452.hs:8:57 })
-             (EpaSpan { T20452.hs:8:74 }))
+            (AnnParen AnnParensSquare (EpaSpan { T20452.hs:8:57 }) (EpaSpan { T20452.hs:8:74 }))
             (L
              (EpAnn
               (EpaSpan { T20452.hs:8:58-73 })
@@ -388,10 +385,7 @@
               (EpaComments
                []))
              (HsTupleTy
-              (AnnParen
-               (AnnParens)
-               (EpaSpan { T20452.hs:8:58 })
-               (EpaSpan { T20452.hs:8:73 }))
+              (AnnParen AnnParens (EpaSpan { T20452.hs:8:58 }) (EpaSpan { T20452.hs:8:73 }))
               (HsBoxedOrConstraintTuple)
               [(L
                 (EpAnn
@@ -591,10 +585,7 @@
             (EpaComments
              []))
            (HsListTy
-            (AnnParen
-             (AnnParensSquare)
-             (EpaSpan { T20452.hs:9:57 })
-             (EpaSpan { T20452.hs:9:74 }))
+            (AnnParen AnnParensSquare (EpaSpan { T20452.hs:9:57 }) (EpaSpan { T20452.hs:9:74 }))
             (L
              (EpAnn
               (EpaSpan { T20452.hs:9:58-73 })
@@ -603,10 +594,7 @@
               (EpaComments
                []))
              (HsTupleTy
-              (AnnParen
-               (AnnParens)
-               (EpaSpan { T20452.hs:9:58 })
-               (EpaSpan { T20452.hs:9:73 }))
+              (AnnParen AnnParens (EpaSpan { T20452.hs:9:58 }) (EpaSpan { T20452.hs:9:73 }))
               (HsBoxedOrConstraintTuple)
               [(L
                 (EpAnn


=====================================
testsuite/tests/parser/should_compile/T23315/T23315.stderr
=====================================
@@ -94,10 +94,7 @@
            (EpaComments
             []))
           (HsTupleTy
-           (AnnParen
-            (AnnParens)
-            (EpaSpan { T23315.hsig:3:6 })
-            (EpaSpan { T23315.hsig:3:7 }))
+           (AnnParen AnnParens (EpaSpan { T23315.hsig:3:6 }) (EpaSpan { T23315.hsig:3:7 }))
            (HsBoxedOrConstraintTuple)
            []))))))))
   ,(L



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bfc09760b995b696fee598861ab4de32ec27e516

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/bfc09760b995b696fee598861ab4de32ec27e516
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20240307/bc08e33e/attachment-0001.html>


More information about the ghc-commits mailing list