[Git][ghc/ghc][master] EPA: Add additional comments field to AnnsModule

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Wed Apr 17 00:13:14 UTC 2024



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


Commits:
9a53cd3f by Alan Zimmerman at 2024-04-16T20:10:15-04:00
EPA: Add additional comments field to AnnsModule

This is used in exact printing to store comments coming after the
`where` keyword but before any comments allocated to imports or decls.

It is used in ghc-exactprint, see
https://github.com/alanz/ghc-exactprint/commit/44bbed311fd8f0d053053fef195bf47c17d34fa7

- - - - -


23 changed files:

- compiler/GHC/Hs.hs
- compiler/GHC/Parser.y
- testsuite/tests/ghc-api/exactprint/T22919.stderr
- testsuite/tests/ghc-api/exactprint/Test20239.stderr
- testsuite/tests/ghc-api/exactprint/ZeroWidthSemi.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
- testsuite/tests/haddock/should_compile_flag_haddock/T24221.stderr
- testsuite/tests/module/mod185.stderr
- testsuite/tests/parser/should_compile/DumpParsedAst.stderr
- testsuite/tests/parser/should_compile/DumpParsedAstComments.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/T20718.stderr
- testsuite/tests/parser/should_compile/T20718b.stderr
- testsuite/tests/parser/should_compile/T20846.stderr
- testsuite/tests/parser/should_compile/T23315/T23315.stderr
- testsuite/tests/printer/T18791.stderr
- testsuite/tests/printer/Test20297.stdout
- testsuite/tests/printer/Test24533.stdout
- utils/check-exact/ExactPrint.hs


Changes:

=====================================
compiler/GHC/Hs.hs
=====================================
@@ -101,12 +101,14 @@ deriving instance Data (HsModule GhcPs)
 data AnnsModule
   = AnnsModule {
     am_main :: [AddEpAnn],
-    am_decls :: [TrailingAnn],
-    am_eof :: Maybe (RealSrcSpan, RealSrcSpan) -- End of file and end of prior token
+    am_decls :: [TrailingAnn],                 -- ^ Semis before the start of top decls
+    am_cs :: [LEpaComment],                    -- ^ Comments before start of top decl,
+                                               --   used in exact printing only
+    am_eof :: Maybe (RealSrcSpan, RealSrcSpan) -- ^ End of file and end of prior token
     } deriving (Data, Eq)
 
 instance NoAnn AnnsModule where
-  noAnn = AnnsModule [] [] Nothing
+  noAnn = AnnsModule [] [] [] Nothing
 
 instance Outputable (HsModule GhcPs) where
     ppr (HsModule { hsmodExt = XModulePs { hsmodHaddockModHeader = mbDoc }


=====================================
compiler/GHC/Parser.y
=====================================
@@ -881,7 +881,7 @@ signature :: { Located (HsModule GhcPs) }
        : 'signature' modid maybe_warning_pragma maybeexports 'where' body
              {% fileSrcSpan >>= \ loc ->
                 acs loc (\loc cs-> (L loc (HsModule (XModulePs
-                                               (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnSignature $1, mj AnnWhere $5] (fstOf3 $6) Nothing) cs)
+                                               (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnSignature $1, mj AnnWhere $5] (fstOf3 $6) [] Nothing) cs)
                                                (thdOf3 $6) $3 Nothing)
                                             (Just $2) $4 (fst $ sndOf3 $6)
                                             (snd $ sndOf3 $6)))
@@ -891,7 +891,7 @@ module :: { Located (HsModule GhcPs) }
        : 'module' modid maybe_warning_pragma maybeexports 'where' body
              {% fileSrcSpan >>= \ loc ->
                 acsFinal (\cs eof -> (L loc (HsModule (XModulePs
-                                                     (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1, mj AnnWhere $5] (fstOf3 $6) eof) cs)
+                                                     (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1, mj AnnWhere $5] (fstOf3 $6) [] eof) cs)
                                                      (thdOf3 $6) $3 Nothing)
                                                   (Just $2) $4 (fst $ sndOf3 $6)
                                                   (snd $ sndOf3 $6))
@@ -899,7 +899,7 @@ module :: { Located (HsModule GhcPs) }
         | body2
                 {% fileSrcSpan >>= \ loc ->
                    acsFinal (\cs eof -> (L loc (HsModule (XModulePs
-                                                        (EpAnn (spanAsAnchor loc) (AnnsModule [] (fstOf3 $1) eof) cs)
+                                                        (EpAnn (spanAsAnchor loc) (AnnsModule [] (fstOf3 $1) [] eof) cs)
                                                         (thdOf3 $1) Nothing Nothing)
                                                      Nothing Nothing
                                                      (fst $ sndOf3 $1) (snd $ sndOf3 $1)))) }
@@ -939,14 +939,14 @@ header  :: { Located (HsModule GhcPs) }
         : 'module' modid maybe_warning_pragma maybeexports 'where' header_body
                 {% fileSrcSpan >>= \ loc ->
                    acs loc (\loc cs -> (L loc (HsModule (XModulePs
-                                                   (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1,mj AnnWhere $5] [] Nothing) cs)
+                                                   (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1,mj AnnWhere $5] [] [] Nothing) cs)
                                                    EpNoLayout $3 Nothing)
                                                 (Just $2) $4 $6 []
                           ))) }
         | 'signature' modid maybe_warning_pragma maybeexports 'where' header_body
                 {% fileSrcSpan >>= \ loc ->
                    acs loc (\loc cs -> (L loc (HsModule (XModulePs
-                                                   (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1,mj AnnWhere $5] [] Nothing) cs)
+                                                   (EpAnn (spanAsAnchor loc) (AnnsModule [mj AnnModule $1,mj AnnWhere $5] [] [] Nothing) cs)
                                                    EpNoLayout $3 Nothing)
                                                 (Just $2) $4 $6 []
                           ))) }


=====================================
testsuite/tests/ghc-api/exactprint/T22919.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T22919.hs:1:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T22919.hs:1:29-33 }))]
      []
+     []
      (Just
       ((,)
        { T22919.hs:3:1 }


=====================================
testsuite/tests/ghc-api/exactprint/Test20239.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { Test20239.hs:1:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { Test20239.hs:1:18-22 }))]
      []
+     []
      (Just
       ((,)
        { Test20239.hs:9:1 }
@@ -200,7 +201,10 @@
                   (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 })
@@ -269,7 +273,10 @@
                         (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 })
@@ -334,7 +341,10 @@
                             (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/ghc-api/exactprint/ZeroWidthSemi.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { ZeroWidthSemi.hs:1:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { ZeroWidthSemi.hs:1:22-26 }))]
      []
+     []
      (Just
       ((,)
        { ZeroWidthSemi.hs:9:1 }


=====================================
testsuite/tests/haddock/should_compile_flag_haddock/T17544.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T17544.hs:3:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T17544.hs:3:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T17544.hs:57:1 }


=====================================
testsuite/tests/haddock/should_compile_flag_haddock/T17544_kw.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T17544_kw.hs:11:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T17544_kw.hs:13:13-17 }))]
      []
+     []
      (Just
       ((,)
        { T17544_kw.hs:25:1 }
@@ -227,7 +228,10 @@
                (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/haddock/should_compile_flag_haddock/T24221.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T24221.hs:1:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T24221.hs:1:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T24221.hs:43:4 }


=====================================
testsuite/tests/module/mod185.stderr
=====================================
@@ -8,6 +8,7 @@
    (EpAnn
     (EpaSpan { mod185.hs:1:1 })
     (AnnsModule
+     []
      []
      []
      (Just


=====================================
testsuite/tests/parser/should_compile/DumpParsedAst.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { DumpParsedAst.hs:4:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { DumpParsedAst.hs:4:22-26 }))]
      []
+     []
      (Just
       ((,)
        { DumpParsedAst.hs:26:1 }
@@ -228,7 +229,10 @@
             (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 })
@@ -315,7 +319,10 @@
                 (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 })
@@ -410,7 +417,10 @@
                 (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 })
@@ -555,7 +565,10 @@
              (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 })
@@ -732,7 +745,10 @@
                 (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 })
@@ -867,7 +883,10 @@
               (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 })
@@ -1460,7 +1479,10 @@
             (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 })
@@ -1567,7 +1589,10 @@
               (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 })
@@ -1688,7 +1713,10 @@
                  (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
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { DumpParsedAstComments.hs:5:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { DumpParsedAstComments.hs:5:30-34 }))]
      []
+     []
      (Just
       ((,)
        { DumpParsedAstComments.hs:20:1 }


=====================================
testsuite/tests/parser/should_compile/DumpSemis.stderr
=====================================
@@ -22,6 +22,7 @@
        (EpaSpan { DumpSemis.hs:4:7 }))
      ,(AddSemiAnn
        (EpaSpan { DumpSemis.hs:4:8 }))]
+     []
      (Just
       ((,)
        { DumpSemis.hs:46:1 }


=====================================
testsuite/tests/parser/should_compile/KindSigs.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { KindSigs.hs:6:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { KindSigs.hs:6:17-21 }))]
      []
+     []
      (Just
       ((,)
        { KindSigs.hs:36:1 }


=====================================
testsuite/tests/parser/should_compile/T15323.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T15323.hs:3:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T15323.hs:3:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T15323.hs:7:1 }
@@ -163,7 +164,10 @@
                 (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
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T20452.hs:3:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T20452.hs:3:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T20452.hs:10:1 }
@@ -376,7 +377,10 @@
             (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 })
@@ -385,7 +389,10 @@
               (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
@@ -585,7 +592,10 @@
             (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 })
@@ -594,7 +604,10 @@
               (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/T20718.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T20718.hs:3:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T20718.hs:3:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T20718.hs:12:1 }


=====================================
testsuite/tests/parser/should_compile/T20718b.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T20718b.hs:4:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T20718b.hs:4:16-20 }))]
      []
+     []
      (Just
       ((,)
        { T20718b.hs:8:1 }


=====================================
testsuite/tests/parser/should_compile/T20846.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T20846.hs:1:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T20846.hs:1:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T20846.hs:5:1 }


=====================================
testsuite/tests/parser/should_compile/T23315/T23315.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnSignature (EpaSpan { T23315.hsig:1:1-9 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T23315.hsig:1:18-22 }))]
      []
+     []
      (Nothing))
     (EpaComments
      []))
@@ -94,7 +95,10 @@
            (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


=====================================
testsuite/tests/printer/T18791.stderr
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { T18791.hs:2:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { T18791.hs:2:15-19 }))]
      []
+     []
      (Just
       ((,)
        { T18791.hs:6:1 }


=====================================
testsuite/tests/printer/Test20297.stdout
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { Test20297.hs:2:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { Test20297.hs:2:18-22 }))]
      []
+     []
      (Just
       ((,)
        { Test20297.hs:12:1 }
@@ -418,6 +419,7 @@
      [(AddEpAnn AnnModule (EpaSpan { Test20297.ppr.hs:2:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { Test20297.ppr.hs:2:18-22 }))]
      []
+     []
      (Just
       ((,)
        { Test20297.ppr.hs:9:25 }


=====================================
testsuite/tests/printer/Test24533.stdout
=====================================
@@ -11,6 +11,7 @@
      [(AddEpAnn AnnModule (EpaSpan { Test24533.hs:2:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { Test24533.hs:2:18-22 }))]
      []
+     []
      (Just
       ((,)
        { Test24533.hs:17:1 }
@@ -643,6 +644,7 @@
      [(AddEpAnn AnnModule (EpaSpan { Test24533.ppr.hs:2:1-6 }))
      ,(AddEpAnn AnnWhere (EpaSpan { Test24533.ppr.hs:2:18-22 }))]
      []
+     []
      (Just
       ((,)
        { Test24533.ppr.hs:6:20 }


=====================================
utils/check-exact/ExactPrint.hs
=====================================
@@ -965,8 +965,10 @@ lepa k epAnn = fmap (\newAnns -> epAnn { anns = newAnns })
 
 -- data AnnsModule
 --   = AnnsModule {
---     am_main :: [AddEpAnn],
---     am_decls :: AnnList
+--     am_main  :: [AddEpAnn],
+--     am_decls :: [TrailingAnn],
+--     am_cs    :: [LEpaComment],
+--     am_eof   :: Maybe (RealSrcSpan, RealSrcSpan)
 --     } deriving (Data, Eq)
 
 lam_main :: Lens AnnsModule [AddEpAnn]



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/9a53cd3fde89fb10599604e8d5c9127077eb0572
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/20240416/93f00ec7/attachment-0001.html>


More information about the ghc-commits mailing list