[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 4 commits: testsuite: Rename isCross() predicate to needsTargetWrapper()

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Thu Apr 18 19:44:16 UTC 2024



Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
38e721fb by Matthew Pickering at 2024-04-18T15:43:49-04:00
testsuite: Rename isCross() predicate to needsTargetWrapper()

isCross() was a misnamed because it assumed that all cross targets would
provide a target wrapper, but the two most common cross targets
(javascript, wasm) don't need a target wrapper.

Therefore we rename this predicate to `needsTargetWrapper()` so
situations in the testsuite where we can check whether running
executables requires a target wrapper or not.

- - - - -
d6298789 by Alan Zimmerman at 2024-04-18T15:43:50-04:00
EPA: Fix comments in mkListSyntaxTy0

Also extend the test to confirm.

Addresses #24669, 1 of 4

- - - - -
380f08ab by Serge S. Gulin at 2024-04-18T15:43:55-04:00
JS: set image `x86_64-linux-deb11-emsdk-closure` for build

- - - - -
92a14a49 by Alan Zimmerman at 2024-04-18T15:43:55-04:00
EPA: Provide correct span for PatBind

And remove unused parameter in checkPatBind

Contributes to #24669

- - - - -


13 changed files:

- .gitlab-ci.yml
- .gitlab/generate-ci/gen_ci.hs
- .gitlab/jobs.yaml
- compiler/GHC/Hs/Binds.hs
- compiler/GHC/Parser.y
- compiler/GHC/Parser/PostProcess.hs
- compiler/GHC/ThToHs.hs
- testsuite/driver/testglobals.py
- testsuite/driver/testlib.py
- testsuite/tests/linear/should_fail/LinearLet6.stderr
- testsuite/tests/linear/should_fail/LinearLet7.stderr
- testsuite/tests/printer/AnnotationNoListTuplePuns.hs
- + testsuite/tests/printer/AnnotationNoListTuplePuns.stdout


Changes:

=====================================
.gitlab-ci.yml
=====================================
@@ -2,7 +2,7 @@ variables:
   GIT_SSL_NO_VERIFY: "1"
 
   # Commit of ghc/ci-images repository from which to pull Docker images
-  DOCKER_REV: a9297a370025101b479cfd4977f8f910814e03ab
+  DOCKER_REV: 064e90c26dffe5709bd5b87dbd211b9a8b21fc5b
 
   # Sequential version number of all cached things.
   # Bump to invalidate GitLab CI cache.


=====================================
.gitlab/generate-ci/gen_ci.hs
=====================================
@@ -107,6 +107,7 @@ data Opsys
 data LinuxDistro
   = Debian12
   | Debian11
+  | Debian11Js
   | Debian10
   | Debian9
   | Fedora33
@@ -285,12 +286,13 @@ tags arch opsys _bc = [runnerTag arch opsys] -- Tag for which runners we can use
 -- These names are used to find the docker image so they have to match what is
 -- in the docker registry.
 distroName :: LinuxDistro -> String
-distroName Debian12  = "deb12"
-distroName Debian11  = "deb11"
+distroName Debian12   = "deb12"
+distroName Debian11   = "deb11"
+distroName Debian11Js = "deb11-emsdk-closure"
 distroName Debian10   = "deb10"
-distroName Debian9   = "deb9"
-distroName Fedora33  = "fedora33"
-distroName Fedora38  = "fedora38"
+distroName Debian9    = "deb9"
+distroName Fedora33   = "fedora33"
+distroName Fedora38   = "fedora38"
 distroName Ubuntu1804 = "ubuntu18_04"
 distroName Ubuntu2004 = "ubuntu20_04"
 distroName Centos7    = "centos7"
@@ -1009,7 +1011,7 @@ job_groups =
      , fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine312) staticNativeInt)))
      , validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing)
 
-     , addValidateRule JSBackend (validateBuilds Amd64 (Linux Debian11) javascriptConfig)
+     , addValidateRule JSBackend (validateBuilds Amd64 (Linux Debian11Js) javascriptConfig)
 
      , make_wasm_jobs wasm_build_config
      , modifyValidateJobs manual $


=====================================
.gitlab/jobs.yaml
=====================================
@@ -1706,7 +1706,7 @@
       "XZ_OPT": "-9"
     }
   },
-  "nightly-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate": {
+  "nightly-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
       ".gitlab/ci.sh save_test_output",
@@ -1717,7 +1717,7 @@
     "artifacts": {
       "expire_in": "8 weeks",
       "paths": [
-        "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
+        "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
         "junit.xml",
         "unexpected-test-output.tar.gz"
       ],
@@ -1727,14 +1727,14 @@
       "when": "always"
     },
     "cache": {
-      "key": "x86_64-linux-deb11-$CACHE_REV",
+      "key": "x86_64-linux-deb11-emsdk-closure-$CACHE_REV",
       "paths": [
         "cabal-cache",
         "toolchain"
       ]
     },
     "dependencies": [],
-    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11-emsdk-closure:$DOCKER_REV",
     "needs": [
       {
         "artifacts": false,
@@ -1760,14 +1760,14 @@
     ],
     "variables": {
       "BIGNUM_BACKEND": "native",
-      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
       "BUILD_FLAVOUR": "validate",
       "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CONFIGURE_WRAPPER": "emconfigure",
       "CROSS_EMULATOR": "js-emulator",
       "CROSS_TARGET": "javascript-unknown-ghcjs",
       "RUNTEST_ARGS": "",
-      "TEST_ENV": "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate",
+      "TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
       "XZ_OPT": "-9"
     }
   },
@@ -5087,7 +5087,7 @@
       "TEST_ENV": "x86_64-linux-deb11-cross_aarch64-linux-gnu-validate"
     }
   },
-  "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate": {
+  "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate": {
     "after_script": [
       ".gitlab/ci.sh save_cache",
       ".gitlab/ci.sh save_test_output",
@@ -5098,7 +5098,7 @@
     "artifacts": {
       "expire_in": "2 weeks",
       "paths": [
-        "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
+        "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate.tar.xz",
         "junit.xml",
         "unexpected-test-output.tar.gz"
       ],
@@ -5108,14 +5108,14 @@
       "when": "always"
     },
     "cache": {
-      "key": "x86_64-linux-deb11-$CACHE_REV",
+      "key": "x86_64-linux-deb11-emsdk-closure-$CACHE_REV",
       "paths": [
         "cabal-cache",
         "toolchain"
       ]
     },
     "dependencies": [],
-    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
+    "image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11-emsdk-closure:$DOCKER_REV",
     "needs": [
       {
         "artifacts": false,
@@ -5141,14 +5141,14 @@
     ],
     "variables": {
       "BIGNUM_BACKEND": "native",
-      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate",
+      "BIN_DIST_NAME": "ghc-x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate",
       "BUILD_FLAVOUR": "validate",
       "CONFIGURE_ARGS": "--with-intree-gmp --enable-strict-ghc-toolchain-check",
       "CONFIGURE_WRAPPER": "emconfigure",
       "CROSS_EMULATOR": "js-emulator",
       "CROSS_TARGET": "javascript-unknown-ghcjs",
       "RUNTEST_ARGS": "",
-      "TEST_ENV": "x86_64-linux-deb11-int_native-cross_javascript-unknown-ghcjs-validate"
+      "TEST_ENV": "x86_64-linux-deb11-emsdk-closure-int_native-cross_javascript-unknown-ghcjs-validate"
     }
   },
   "x86_64-linux-deb11-validate+boot_nonmoving_gc": {


=====================================
compiler/GHC/Hs/Binds.hs
=====================================
@@ -116,7 +116,7 @@ type instance XFunBind    (GhcPass pL) GhcTc = (HsWrapper, [CoreTickish])
 -- type         Int -> forall a'. a' -> a'
 -- Notice that the coercion captures the free a'.
 
-type instance XPatBind    GhcPs (GhcPass pR) = [AddEpAnn]
+type instance XPatBind    GhcPs (GhcPass pR) = NoExtField
 type instance XPatBind    GhcRn (GhcPass pR) = NameSet -- See Note [Bind free vars]
 type instance XPatBind    GhcTc (GhcPass pR) =
     ( Type                  -- Type of the GRHSs


=====================================
compiler/GHC/Parser.y
=====================================
@@ -2585,7 +2585,7 @@ decl_no_th :: { LHsDecl GhcPs }
                                           ; !cs <- getCommentsFor l
                                           ; return $! (sL (commentsA l cs) $ ValD noExtField r) } }
         | PREFIX_PERCENT atype infixexp     opt_sig rhs  {% runPV (unECP $3) >>= \ $3 ->
-                                       do { let { l = comb2 $3 $> }
+                                       do { let { l = comb2 $1 $> }
                                           ; r <- checkValDef l $3 (mkMultAnn (epTok $1) $2, $4) $5;
                                         -- parses bindings of the form %p x or
                                         -- %p x :: sig


=====================================
compiler/GHC/Parser/PostProcess.hs
=====================================
@@ -1322,7 +1322,7 @@ checkValDef loc lhs (mult, Just (sigAnn, sig)) grhss
         -- x :: ty = rhs  parses as a *pattern* binding
   = do lhs' <- runPV $ mkHsTySigPV (combineLocsA lhs sig) lhs sig [sigAnn]
                         >>= checkLPat
-       checkPatBind loc [] lhs' grhss mult
+       checkPatBind loc lhs' grhss mult
 
 checkValDef loc lhs (mult_ann, Nothing) grhss
   | HsNoMultAnn{} <- mult_ann
@@ -1333,12 +1333,12 @@ checkValDef loc lhs (mult_ann, Nothing) grhss
                            fun is_infix pats grhss
             Nothing -> do
               lhs' <- checkPattern lhs
-              checkPatBind loc [] lhs' grhss mult_ann }
+              checkPatBind loc lhs' grhss mult_ann }
 
 checkValDef loc lhs (mult_ann, Nothing) ghrss
         -- %p x = rhs  parses as a *pattern* binding
   = do lhs' <- checkPattern lhs
-       checkPatBind loc [] lhs' ghrss mult_ann
+       checkPatBind loc lhs' ghrss mult_ann
 
 checkFunBind :: SrcStrictness
              -> SrcSpan
@@ -1376,15 +1376,14 @@ makeFunBind fn ms
 
 -- See Note [FunBind vs PatBind]
 checkPatBind :: SrcSpan
-             -> [AddEpAnn]
              -> LPat GhcPs
              -> Located (GRHSs GhcPs (LHsExpr GhcPs))
              -> HsMultAnn GhcPs
              -> P (HsBind GhcPs)
-checkPatBind loc annsIn (L _ (BangPat ans (L _ (VarPat _ v))))
+checkPatBind loc (L _ (BangPat ans (L _ (VarPat _ v))))
                         (L _match_span grhss) (HsNoMultAnn _)
       = return (makeFunBind v (L (noAnnSrcSpan loc)
-                [L (noAnnSrcSpan loc) (m (ans++annsIn) v)]))
+                [L (noAnnSrcSpan loc) (m ans v)]))
   where
     m a v = Match { m_ext = a
                   , m_ctxt = FunRhs { mc_fun    = v
@@ -1393,8 +1392,8 @@ checkPatBind loc annsIn (L _ (BangPat ans (L _ (VarPat _ v))))
                   , m_pats = []
                  , m_grhss = grhss }
 
-checkPatBind _loc annsIn lhs (L _ grhss) mult = do
-  return (PatBind annsIn lhs mult grhss)
+checkPatBind _loc lhs (L _ grhss) mult = do
+  return (PatBind noExtField lhs mult grhss)
 
 
 checkValSigLhs :: LHsExpr GhcPs -> P (LocatedN RdrName)
@@ -3317,12 +3316,12 @@ withCombinedComments ::
   HasLoc l2 =>
   l1 ->
   l2 ->
-  (SrcSpan -> EpAnnComments -> P a) ->
+  (SrcSpan -> P a) ->
   P (LocatedA a)
 withCombinedComments start end use = do
   cs <- getCommentsFor fullSpan
-  a <- use fullSpan cs
-  pure (L (noAnnSrcSpan fullSpan) a)
+  a <- use fullSpan
+  pure (L (EpAnn (spanAsAnchor fullSpan) noAnn cs) a)
   where
     fullSpan = combineSrcSpans (getHasLoc start) (getHasLoc end)
 
@@ -3362,15 +3361,14 @@ mkTupleSyntaxTycon boxity n =
 mkListSyntaxTy0 :: EpaLocation
                 -> EpaLocation
                 -> SrcSpan
-                -> EpAnnComments
                 -> P (HsType GhcPs)
-mkListSyntaxTy0 brkOpen brkClose span comments =
+mkListSyntaxTy0 brkOpen brkClose span =
   punsIfElse enabled disabled
   where
     enabled = HsTyVar noAnn NotPromoted rn
 
     -- attach the comments only to the RdrName since it's the innermost AST node
-    rn = L (EpAnn fullLoc rdrNameAnn comments) listTyCon_RDR
+    rn = L (EpAnn fullLoc rdrNameAnn emptyComments) listTyCon_RDR
 
     disabled =
       HsExplicitListTy annsKeyword NotPromoted []


=====================================
compiler/GHC/ThToHs.hs
=====================================
@@ -218,7 +218,7 @@ cvtDec (TH.ValD pat body ds)
         ; returnJustLA $ Hs.ValD noExtField $
           PatBind { pat_lhs = pat'
                   , pat_rhs = GRHSs emptyComments body' ds'
-                  , pat_ext = noAnn
+                  , pat_ext = noExtField
                   , pat_mult = HsNoMultAnn noExtField
                   } }
 


=====================================
testsuite/driver/testglobals.py
=====================================
@@ -182,8 +182,6 @@ class TestConfig:
         self.threads = 1
 
         # An optional executable used to wrap target code execution
-        # When set tests which aren't marked with TestConfig.cross_okay
-        # are skipped.
         self.target_wrapper = None
 
         # tests which should be considered to be broken during this testsuite
@@ -460,12 +458,6 @@ class TestOptions:
        # Should we copy the files of symlink the files for the test?
        self.copy_files = False
 
-       # Should the test be run in a cross-compiled tree?
-       #   None:  infer from test function
-       #   True:  run when --target-wrapper is set
-       #   False: do not run in cross-compiled trees
-       self.cross_okay = None # type: Optional[bool]
-
        # The extra hadrian dependencies we need for this particular test
        self.hadrian_deps = set(["test:ghc"]) # type: Set[str]
 


=====================================
testsuite/driver/testlib.py
=====================================
@@ -91,8 +91,8 @@ def setLocalTestOpts(opts: TestOptions) -> None:
     global testopts_ctx_var
     testopts_ctx_var.set(opts)
 
-def isCross() -> bool:
-    """ Are we testing a cross-compiler? """
+def needsTargetWrapper() -> bool:
+    """ Do we need to use a target wrapper? """
     return config.target_wrapper is not None
 
 def isCompilerStatsTest() -> bool:
@@ -240,7 +240,7 @@ def req_dynamic_hs( name, opts ):
         opts.expect = 'fail'
 
 def req_interp( name, opts ):
-    if not config.have_interp or isCross():
+    if not config.have_interp or needsTargetWrapper():
         opts.expect = 'fail'
     # skip on wasm32, otherwise they show up as unexpected passes
     if arch('wasm32'):
@@ -346,11 +346,10 @@ def req_host_target_ghc( name, opts ):
     """
     When testing a cross GHC, some test cases require a host GHC as well (e.g.
     for compiling custom Setup.hs). This is not supported yet (#23236), so for
-    the time being we skip them when testing cross GHCs. However, this is not
-    the case for the JS backend. The JS backend is a cross-compiler that
-    produces code that the host can run.
+    the time being we skip them when testing cross GHCs. However, for cross targets
+    which don't need a target wrapper (e.g. javascript), we can still run these testcases.
     """
-    if isCross() and not js_arch():
+    if needsTargetWrapper():
         opts.skip = True
 
 has_ls_files = None
@@ -1290,21 +1289,18 @@ async def test_common_work(name: TestName, opts,
                 all_ways = [WayName('ghci'), WayName('ghci-opt')]
             else:
                 all_ways = []
-            if isCross():
-                opts.cross_okay = False
+            if needsTargetWrapper():
+                opts.skip = True
         elif func in [makefile_test, run_command]:
             # makefile tests aren't necessarily runtime or compile-time
             # specific. Assume we can run them in all ways. See #16042 for what
             # happened previously.
             all_ways = config.compile_ways + config.run_ways
-            if isCross():
-                opts.cross_okay = False
+            if needsTargetWrapper():
+                opts.skip = True
         else:
             all_ways = [WayName('normal')]
 
-        if isCross() and opts.cross_okay is False:
-            opts.skip = True
-
         # A test itself can request extra ways by setting opts.extra_ways
         all_ways = list(OrderedDict.fromkeys(all_ways + [way for way in opts.extra_ways if way not in all_ways]))
 


=====================================
testsuite/tests/linear/should_fail/LinearLet6.stderr
=====================================
@@ -13,7 +13,7 @@ LinearLet6.hs:10:3: error: [GHC-18872]
             where
                 (Just y) = x
 
-LinearLet6.hs:15:14: error: [GHC-18872]
+LinearLet6.hs:15:11: error: [GHC-18872]
     • Couldn't match type ‘Many’ with ‘One’
         arising from a non-linear pattern ‘Just y’
           (non-variable lazy pattern aren't linear)


=====================================
testsuite/tests/linear/should_fail/LinearLet7.stderr
=====================================
@@ -1,14 +1,14 @@
 
-LinearLet7.hs:6:14: error: [GHC-18872]
+LinearLet7.hs:6:11: error: [GHC-18872]
     • Couldn't match type ‘Many’ with ‘One’
-        arising from multiplicity of ‘g’
-    • In a pattern binding: g = \ y -> g y
-      In the expression: let %1 g = \ y -> ... in g x
+        arising from a non-linear pattern ‘_’
+          (non-variable pattern bindings that have been generalised aren't linear)
+    • In the expression: let %1 g = \ y -> ... in g x
       In an equation for ‘f’: f x = let %1 g = ... in g x
 
 LinearLet7.hs:6:14: error: [GHC-18872]
     • Couldn't match type ‘Many’ with ‘One’
-        arising from a non-linear pattern ‘_’
-          (non-variable pattern bindings that have been generalised aren't linear)
-    • In the expression: let %1 g = \ y -> ... in g x
+        arising from multiplicity of ‘g’
+    • In a pattern binding: g = \ y -> g y
+      In the expression: let %1 g = \ y -> ... in g x
       In an equation for ‘f’: f x = let %1 g = ... in g x


=====================================
testsuite/tests/printer/AnnotationNoListTuplePuns.hs
=====================================
@@ -1,17 +1,18 @@
 {-# language NoListTuplePuns #-}
+{-# OPTIONS -ddump-parsed-ast #-}
 module AnnotationNoListTuplePuns where
 
 type A =
-  -- comment pre
+  -- comment pre A
   [
-    -- comment inside
+    -- comment inside A
   ]
-  -- comment post
+  -- comment post A
 
 type B =
-  -- comment pre
+  -- comment pre B
   [
-    -- comment inside
+    -- comment inside B
     Bool
   ]
-  -- comment post
+  -- comment post B


=====================================
testsuite/tests/printer/AnnotationNoListTuplePuns.stdout
=====================================
@@ -0,0 +1,323 @@
+
+==================== Parser AST ====================
+
+(L
+ { AnnotationNoListTuplePuns.hs:1:1 }
+ (HsModule
+  (XModulePs
+   (EpAnn
+    (EpaSpan { AnnotationNoListTuplePuns.hs:1:1 })
+    (AnnsModule
+     [(AddEpAnn AnnModule (EpaSpan { AnnotationNoListTuplePuns.hs:3:1-6 }))
+     ,(AddEpAnn AnnWhere (EpaSpan { AnnotationNoListTuplePuns.hs:3:34-38 }))]
+     []
+     []
+     (Just
+      ((,)
+       { AnnotationNoListTuplePuns.hs:19:1 }
+       { AnnotationNoListTuplePuns.hs:18:3-19 })))
+    (EpaCommentsBalanced
+     [(L
+       (EpaSpan
+        { AnnotationNoListTuplePuns.hs:1:1-32 })
+       (EpaComment
+        (EpaBlockComment
+         "{-# language NoListTuplePuns #-}")
+        { AnnotationNoListTuplePuns.hs:1:1 }))
+     ,(L
+       (EpaSpan
+        { AnnotationNoListTuplePuns.hs:2:1-33 })
+       (EpaComment
+        (EpaBlockComment
+         "{-# OPTIONS -ddump-parsed-ast #-}")
+        { AnnotationNoListTuplePuns.hs:1:1-32 }))]
+     [(L
+       (EpaSpan
+        { AnnotationNoListTuplePuns.hs:18:3-19 })
+       (EpaComment
+        (EpaLineComment
+         "-- comment post B")
+        { AnnotationNoListTuplePuns.hs:17:3 }))]))
+   (EpVirtualBraces
+    (1))
+   (Nothing)
+   (Nothing))
+  (Just
+   (L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.hs:3:8-32 })
+     (AnnListItem
+      [])
+     (EpaComments
+      []))
+    {ModuleName: AnnotationNoListTuplePuns}))
+  (Nothing)
+  []
+  [(L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.hs:(5,1)-(9,3) })
+     (AnnListItem
+      [])
+     (EpaComments
+      [(L
+        (EpaSpan
+         { AnnotationNoListTuplePuns.hs:6:3-18 })
+        (EpaComment
+         (EpaLineComment
+          "-- comment pre A")
+         { AnnotationNoListTuplePuns.hs:5:8 }))]))
+    (TyClD
+     (NoExtField)
+     (SynDecl
+      [(AddEpAnn AnnType (EpaSpan { AnnotationNoListTuplePuns.hs:5:1-4 }))
+      ,(AddEpAnn AnnEqual (EpaSpan { AnnotationNoListTuplePuns.hs:5:8 }))]
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.hs:5:6 })
+        (NameAnnTrailing
+         [])
+        (EpaComments
+         []))
+       (Unqual
+        {OccName: A}))
+      (HsQTvs
+       (NoExtField)
+       [])
+      (Prefix)
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.hs:(7,3)-(9,3) })
+        (AnnListItem
+         [])
+        (EpaComments
+         [(L
+           (EpaSpan
+            { AnnotationNoListTuplePuns.hs:8:5-23 })
+           (EpaComment
+            (EpaLineComment
+             "-- comment inside A")
+            { AnnotationNoListTuplePuns.hs:7:3 }))]))
+       (HsExplicitListTy
+        [(AddEpAnn AnnOpenS (EpaSpan { AnnotationNoListTuplePuns.hs:7:3 }))
+        ,(AddEpAnn AnnCloseS (EpaSpan { AnnotationNoListTuplePuns.hs:9:3 }))]
+        (NotPromoted)
+        [])))))
+  ,(L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.hs:(12,1)-(17,3) })
+     (AnnListItem
+      [])
+     (EpaComments
+      [(L
+        (EpaSpan
+         { AnnotationNoListTuplePuns.hs:10:3-19 })
+        (EpaComment
+         (EpaLineComment
+          "-- comment post A")
+         { AnnotationNoListTuplePuns.hs:9:3 }))
+      ,(L
+        (EpaSpan
+         { AnnotationNoListTuplePuns.hs:13:3-18 })
+        (EpaComment
+         (EpaLineComment
+          "-- comment pre B")
+         { AnnotationNoListTuplePuns.hs:12:8 }))]))
+    (TyClD
+     (NoExtField)
+     (SynDecl
+      [(AddEpAnn AnnType (EpaSpan { AnnotationNoListTuplePuns.hs:12:1-4 }))
+      ,(AddEpAnn AnnEqual (EpaSpan { AnnotationNoListTuplePuns.hs:12:8 }))]
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.hs:12:6 })
+        (NameAnnTrailing
+         [])
+        (EpaComments
+         []))
+       (Unqual
+        {OccName: B}))
+      (HsQTvs
+       (NoExtField)
+       [])
+      (Prefix)
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.hs:(14,3)-(17,3) })
+        (AnnListItem
+         [])
+        (EpaComments
+         [(L
+           (EpaSpan
+            { AnnotationNoListTuplePuns.hs:15:5-23 })
+           (EpaComment
+            (EpaLineComment
+             "-- comment inside B")
+            { AnnotationNoListTuplePuns.hs:14:3 }))]))
+       (HsExplicitListTy
+        [(AddEpAnn AnnOpenS (EpaSpan { AnnotationNoListTuplePuns.hs:14:3 }))
+        ,(AddEpAnn AnnCloseS (EpaSpan { AnnotationNoListTuplePuns.hs:17:3 }))]
+        (NotPromoted)
+        [(L
+          (EpAnn
+           (EpaSpan { AnnotationNoListTuplePuns.hs:16:5-8 })
+           (AnnListItem
+            [])
+           (EpaComments
+            []))
+          (HsTyVar
+           []
+           (NotPromoted)
+           (L
+            (EpAnn
+             (EpaSpan { AnnotationNoListTuplePuns.hs:16:5-8 })
+             (NameAnnTrailing
+              [])
+             (EpaComments
+              []))
+            (Unqual
+             {OccName: Bool}))))])))))]))
+
+
+
+==================== Parser AST ====================
+
+(L
+ { AnnotationNoListTuplePuns.ppr.hs:1:1 }
+ (HsModule
+  (XModulePs
+   (EpAnn
+    (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:1:1 })
+    (AnnsModule
+     [(AddEpAnn AnnModule (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:3:1-6 }))
+     ,(AddEpAnn AnnWhere (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:3:34-38 }))]
+     []
+     []
+     (Just
+      ((,)
+       { AnnotationNoListTuplePuns.ppr.hs:5:16 }
+       { AnnotationNoListTuplePuns.ppr.hs:5:15 })))
+    (EpaCommentsBalanced
+     [(L
+       (EpaSpan
+        { AnnotationNoListTuplePuns.ppr.hs:1:1-32 })
+       (EpaComment
+        (EpaBlockComment
+         "{-# language NoListTuplePuns #-}")
+        { AnnotationNoListTuplePuns.ppr.hs:1:1 }))
+     ,(L
+       (EpaSpan
+        { AnnotationNoListTuplePuns.ppr.hs:2:1-33 })
+       (EpaComment
+        (EpaBlockComment
+         "{-# OPTIONS -ddump-parsed-ast #-}")
+        { AnnotationNoListTuplePuns.ppr.hs:1:1-32 }))]
+     []))
+   (EpVirtualBraces
+    (1))
+   (Nothing)
+   (Nothing))
+  (Just
+   (L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:3:8-32 })
+     (AnnListItem
+      [])
+     (EpaComments
+      []))
+    {ModuleName: AnnotationNoListTuplePuns}))
+  (Nothing)
+  []
+  [(L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:1-11 })
+     (AnnListItem
+      [])
+     (EpaComments
+      []))
+    (TyClD
+     (NoExtField)
+     (SynDecl
+      [(AddEpAnn AnnType (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:1-4 }))
+      ,(AddEpAnn AnnEqual (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:8 }))]
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:6 })
+        (NameAnnTrailing
+         [])
+        (EpaComments
+         []))
+       (Unqual
+        {OccName: A}))
+      (HsQTvs
+       (NoExtField)
+       [])
+      (Prefix)
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:10-11 })
+        (AnnListItem
+         [])
+        (EpaComments
+         []))
+       (HsExplicitListTy
+        [(AddEpAnn AnnOpenS (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:10 }))
+        ,(AddEpAnn AnnCloseS (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:4:11 }))]
+        (NotPromoted)
+        [])))))
+  ,(L
+    (EpAnn
+     (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:1-15 })
+     (AnnListItem
+      [])
+     (EpaComments
+      []))
+    (TyClD
+     (NoExtField)
+     (SynDecl
+      [(AddEpAnn AnnType (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:1-4 }))
+      ,(AddEpAnn AnnEqual (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:8 }))]
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:6 })
+        (NameAnnTrailing
+         [])
+        (EpaComments
+         []))
+       (Unqual
+        {OccName: B}))
+      (HsQTvs
+       (NoExtField)
+       [])
+      (Prefix)
+      (L
+       (EpAnn
+        (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:10-15 })
+        (AnnListItem
+         [])
+        (EpaComments
+         []))
+       (HsExplicitListTy
+        [(AddEpAnn AnnOpenS (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:10 }))
+        ,(AddEpAnn AnnCloseS (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:15 }))]
+        (NotPromoted)
+        [(L
+          (EpAnn
+           (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:11-14 })
+           (AnnListItem
+            [])
+           (EpaComments
+            []))
+          (HsTyVar
+           []
+           (NotPromoted)
+           (L
+            (EpAnn
+             (EpaSpan { AnnotationNoListTuplePuns.ppr.hs:5:11-14 })
+             (NameAnnTrailing
+              [])
+             (EpaComments
+              []))
+            (Unqual
+             {OccName: Bool}))))])))))]))
+
+



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/442955cae72c5e1b4985621ee2d2792868e3198f...92a14a49f94a0d6838617dd97668597b372653d6

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/442955cae72c5e1b4985621ee2d2792868e3198f...92a14a49f94a0d6838617dd97668597b372653d6
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/20240418/f5287307/attachment-0001.html>


More information about the ghc-commits mailing list