[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 8 commits: Update documentation for `<**>`

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Sun Jun 18 04:30:33 UTC 2023



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


Commits:
640ea90e by Diego Diverio at 2023-06-16T23:07:55-04:00
Update documentation for `<**>`

- - - - -
2469a813 by Diego Diverio at 2023-06-16T23:07:55-04:00
Update text

- - - - -
1f515bbb by Diego Diverio at 2023-06-16T23:07:55-04:00
Update examples

- - - - -
7af99a0d by Diego Diverio at 2023-06-16T23:07:55-04:00
Update documentation to actually display code correctly

- - - - -
800aad7e by Andrei Borzenkov at 2023-06-16T23:08:32-04:00
Type/data instances: require that variables on the RHS are mentioned on the LHS (#23512)

GHC Proposal #425 "Invisible binders in type declarations" restricts the
scope of type and data family instances as follows:

  In type family and data family instances, require that every variable
  mentioned on the RHS must also occur on the LHS.

For example, here are three equivalent type instance definitions accepted before this patch:

  type family F1 a :: k
  type instance F1 Int = Any :: j -> j

  type family F2 a :: k
  type instance F2 @(j -> j) Int = Any :: j -> j

  type family F3 a :: k
  type instance forall j. F3 Int = Any :: j -> j

- In F1, j is implicitly quantified and it occurs only on the RHS;
- In F2, j is implicitly quantified and it occurs both on the LHS and the RHS;
- In F3, j is explicitly quantified.

Now F1 is rejected with an out-of-scope error, while F2 and F3 continue to be accepted.

- - - - -
9b6d0547 by Sylvain Henry at 2023-06-18T00:30:20-04:00
JS: testsuite: use correct ticket numbers

- - - - -
03df2716 by Sylvain Henry at 2023-06-18T00:30:20-04:00
JS: don't dump eventlog to stderr by default

Fix T16707

Bump stm submodule

- - - - -
3759b785 by Ryan Hendrickson at 2023-06-18T00:30:23-04:00
Fix TH name lookup for symbolic tycons (#23525)

- - - - -


25 changed files:

- compiler/GHC/Rename/HsType.hs
- compiler/GHC/Rename/Module.hs
- compiler/GHC/ThToHs.hs
- docs/users_guide/9.8.1-notes.rst
- libraries/base/GHC/Base.hs
- libraries/stm
- rts/js/environment.js
- + rts/js/eventlog.js
- rts/rts.cabal.in
- testsuite/tests/cabal/t22333/all.T
- testsuite/tests/indexed-types/should_compile/T14131.hs
- testsuite/tests/indexed-types/should_compile/T15852.hs
- testsuite/tests/indexed-types/should_compile/T15852.stderr
- testsuite/tests/indexed-types/should_fail/T14230.hs
- testsuite/tests/indexed-types/should_fail/T7938.hs
- testsuite/tests/indexed-types/should_fail/T7938.stderr
- + testsuite/tests/rename/should_compile/T23512b.hs
- testsuite/tests/rename/should_compile/all.T
- + testsuite/tests/rename/should_fail/T23512a.hs
- + testsuite/tests/rename/should_fail/T23512a.stderr
- testsuite/tests/rename/should_fail/all.T
- testsuite/tests/safeHaskell/check/pkg01/all.T
- + testsuite/tests/th/T23525.hs
- testsuite/tests/th/all.T
- testsuite/tests/typecheck/should_fail/T15797.hs


Changes:

=====================================
compiler/GHC/Rename/HsType.hs
=====================================
@@ -1799,8 +1799,7 @@ one exists:
     a free variable 'a', which we implicitly quantify over. That is why we can
     also use it to the left of the double colon: 'Left a
 
-The logic resides in extractHsTyRdrTyVarsKindVars. We use it both for type
-synonyms and type family instances.
+The logic resides in extractHsTyRdrTyVarsKindVars.
 
 This was a stopgap solution until we could explicitly bind invisible
 type/kind variables:


=====================================
compiler/GHC/Rename/Module.hs
=====================================
@@ -634,14 +634,10 @@ rnClsInstDecl (ClsInstDecl { cid_poly_ty = inst_ty, cid_binds = mbinds
 
 rnFamEqn :: HsDocContext
          -> AssocTyFamInfo
-         -> FreeKiTyVars
-         -- ^ Additional kind variables to implicitly bind if there is no
-         --   explicit forall. (See the comments on @all_imp_vars@ below for a
-         --   more detailed explanation.)
          -> FamEqn GhcPs rhs
          -> (HsDocContext -> rhs -> RnM (rhs', FreeVars))
          -> RnM (FamEqn GhcRn rhs', FreeVars)
-rnFamEqn doc atfi extra_kvars
+rnFamEqn doc atfi
     (FamEqn { feqn_tycon  = tycon
             , feqn_bndrs  = outer_bndrs
             , feqn_pats   = pats
@@ -652,19 +648,8 @@ rnFamEqn doc atfi extra_kvars
          -- all_imp_vars represent the implicitly bound type variables. This is
          -- empty if we have an explicit `forall` (see
          -- Note [forall-or-nothing rule] in GHC.Hs.Type), which means
-         -- ignoring:
-         --
-         -- - pat_kity_vars, the free variables mentioned in the type patterns
-         --   on the LHS of the equation, and
-         -- - extra_kvars, which is one of the following:
-         --   * For type family instances, extra_kvars are the free kind
-         --     variables mentioned in an outermost kind signature on the RHS
-         --     of the equation.
-         --     (See Note [Implicit quantification in type synonyms] in
-         --     GHC.Rename.HsType.)
-         --   * For data family instances, extra_kvars are the free kind
-         --     variables mentioned in the explicit return kind, if one is
-         --     provided. (e.g., the `k` in `data instance T :: k -> Type`).
+         -- ignoring pat_kity_vars, the free variables mentioned in the type patterns
+         -- on the LHS of the equation
          --
          -- Some examples:
          --
@@ -678,8 +663,6 @@ rnFamEqn doc atfi extra_kvars
          -- type family G :: Maybe a
          -- type instance forall a. G = (Nothing :: Maybe a)
          --   -- all_imp_vars = []
-         -- type instance G = (Nothing :: Maybe a)
-         --   -- all_imp_vars = [a]
          --
          -- data family H :: k -> Type
          -- data instance forall k. H :: k -> Type where ...
@@ -690,7 +673,7 @@ rnFamEqn doc atfi extra_kvars
          --
          -- For associated type family instances, exclude the type variables
          -- bound by the instance head with filterInScopeM (#19649).
-       ; all_imp_vars <- filterInScopeM $ pat_kity_vars ++ extra_kvars
+       ; all_imp_vars <- filterInScopeM $ pat_kity_vars
 
        ; bindHsOuterTyVarBndrs doc mb_cls all_imp_vars outer_bndrs $ \rn_outer_bndrs ->
     do { (pats', pat_fvs) <- rnLHsTypeArgs (FamPatCtx tycon) pats
@@ -727,21 +710,12 @@ rnFamEqn doc atfi extra_kvars
          -- associated family instance but not bound on the LHS, then reject
          -- that type variable as being out of scope.
          -- See Note [Renaming associated types].
-         -- Per that Note, the LHS type variables consist of:
-         --
-         -- - The variables mentioned in the instance's type patterns
-         --   (pat_fvs), and
-         --
-         -- - The variables mentioned in an outermost kind signature on the
-         --   RHS. This is a subset of `rhs_fvs`. To compute it, we look up
-         --   each RdrName in `extra_kvars` to find its corresponding Name in
-         --   the LocalRdrEnv.
-       ; extra_kvar_nms <- mapMaybeM (lookupLocalOccRn_maybe . unLoc) extra_kvars
-       ; let lhs_bound_vars = pat_fvs `extendNameSetList` extra_kvar_nms
-             improperly_scoped cls_tkv =
+         -- Per that Note, the LHS type variables consist of the variables
+         -- mentioned in the instance's type patterns (pat_fvs)
+       ; let improperly_scoped cls_tkv =
                   cls_tkv `elemNameSet` rhs_fvs
                     -- Mentioned on the RHS...
-               && not (cls_tkv `elemNameSet` lhs_bound_vars)
+               && not (cls_tkv `elemNameSet` pat_fvs)
                     -- ...but not bound on the LHS.
              bad_tvs = filter improperly_scoped inst_head_tvs
        ; unless (null bad_tvs) (addErr (TcRnBadAssocRhs bad_tvs))
@@ -786,7 +760,7 @@ rnFamEqn doc atfi extra_kvars
     --
     --   type instance F a b c = Either a b
     --                   ^^^^^
-    lhs_loc = case map lhsTypeArgSrcSpan pats ++ map getLocA extra_kvars of
+    lhs_loc = case map lhsTypeArgSrcSpan pats of
       []         -> panic "rnFamEqn.lhs_loc"
       [loc]      -> loc
       (loc:locs) -> loc `combineSrcSpans` last locs
@@ -845,10 +819,9 @@ data ClosedTyFamInfo
 rnTyFamInstEqn :: AssocTyFamInfo
                -> TyFamInstEqn GhcPs
                -> RnM (TyFamInstEqn GhcRn, FreeVars)
-rnTyFamInstEqn atfi eqn@(FamEqn { feqn_tycon = tycon, feqn_rhs = rhs })
-  = rnFamEqn (TySynCtx tycon) atfi extra_kvs eqn rnTySyn
-  where
-    extra_kvs = extractHsTyRdrTyVarsKindVars rhs
+rnTyFamInstEqn atfi eqn@(FamEqn { feqn_tycon = tycon })
+  = rnFamEqn (TySynCtx tycon) atfi eqn rnTySyn
+
 
 rnTyFamDefltDecl :: Name
                  -> TyFamDefltDecl GhcPs
@@ -859,11 +832,9 @@ rnDataFamInstDecl :: AssocTyFamInfo
                   -> DataFamInstDecl GhcPs
                   -> RnM (DataFamInstDecl GhcRn, FreeVars)
 rnDataFamInstDecl atfi (DataFamInstDecl { dfid_eqn =
-                    eqn@(FamEqn { feqn_tycon = tycon
-                                , feqn_rhs   = rhs })})
-  = do { let extra_kvs = extractDataDefnKindVars rhs
-       ; (eqn', fvs) <-
-           rnFamEqn (TyDataCtx tycon) atfi extra_kvs eqn rnDataDefn
+                    eqn@(FamEqn { feqn_tycon = tycon })})
+  = do { (eqn', fvs) <-
+           rnFamEqn (TyDataCtx tycon) atfi eqn rnDataDefn
        ; return (DataFamInstDecl { dfid_eqn = eqn' }, fvs) }
 
 -- Renaming of the associated types in instances.
@@ -949,10 +920,7 @@ a class, we must check that all of the type variables mentioned on the RHS are
 properly scoped. Specifically, the rule is this:
 
   Every variable mentioned on the RHS of a type instance declaration
-  (whether associated or not) must be either
-  * Mentioned on the LHS, or
-  * Mentioned in an outermost kind signature on the RHS
-    (see Note [Implicit quantification in type synonyms])
+  (whether associated or not) must be mentioned on the LHS
 
 Here is a simple example of something we should reject:
 
@@ -962,8 +930,7 @@ Here is a simple example of something we should reject:
     type F Int x = z
 
 Here, `z` is mentioned on the RHS of the associated instance without being
-mentioned on the LHS, nor is `z` mentioned in an outermost kind signature. The
-renamer will reject `z` as being out of scope without much fuss.
+mentioned on the LHS. The renamer will reject `z` as being out of scope without much fuss.
 
 Things get slightly trickier when the instance header itself binds type
 variables. Consider this example (adapted from #5515):
@@ -1055,10 +1022,8 @@ Some additional wrinkles:
 
     Note that the `o` in the `Codomain 'KProxy` instance should be considered
     improperly scoped. It does not meet the criteria for being explicitly
-    quantified, as it is not mentioned by name on the LHS, nor does it meet the
-    criteria for being implicitly quantified, as it is used in a RHS kind
-    signature that is not outermost (see Note [Implicit quantification in type
-    synonyms]). However, `o` /is/ bound by the instance header, so if this
+    quantified, as it is not mentioned by name on the LHS.
+    However, `o` /is/ bound by the instance header, so if this
     program is not rejected by the renamer, the typechecker would treat it as
     though you had written this:
 
@@ -1070,6 +1035,12 @@ Some additional wrinkles:
     If the user really wants the latter, it is simple enough to communicate
     their intent by mentioning `o` on the LHS by name.
 
+* Historical note: Previously we had to add type variables from the outermost
+  kind signature on the RHS to the scope of associated type family instance,
+  i.e. GHC did implicit quantification over them. But now that we implement
+  GHC Proposal #425 "Invisible binders in type declarations"
+  we don't need to do this anymore.
+
 Note [Type family equations and occurrences]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 In most data/type family equations, the type family name used in the equation


=====================================
compiler/GHC/ThToHs.hs
=====================================
@@ -2177,9 +2177,11 @@ thRdrNameGuesses (TH.Name occ flavour)
   where
     -- guessed_ns are the name spaces guessed from looking at the TH name
     guessed_nss
-      | isLexCon (mkFastString occ_str) = [OccName.tcName,  OccName.dataName]
-      | otherwise                       = [OccName.varName, OccName.tvName]
+      | isLexCon occ_txt    = [OccName.tcName,  OccName.dataName]
+      | isLexVarSym occ_txt = [OccName.tcName,  OccName.varName] -- #23525
+      | otherwise           = [OccName.varName, OccName.tvName]
     occ_str = TH.occString occ
+    occ_txt = mkFastString occ_str
 
 -- The packing and unpacking is rather turgid :-(
 mk_occ :: OccName.NameSpace -> String -> OccName.OccName


=====================================
docs/users_guide/9.8.1-notes.rst
=====================================
@@ -19,6 +19,22 @@ Language
 
   This feature is guarded behind :extension:`TypeAbstractions`.
 
+- In accordance with GHC proposal `#425
+  <https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0425-decl-invis-binders.rst>`_
+  GHC no longer implicitly quantifies over type variables that appear only in the RHS of type and
+  data family instances. This code will no longer work: ::
+
+    type family F1 a :: k
+    type instance F1 Int = Any :: j -> j
+
+  Instead you should write::
+
+    type instance F1 @(j -> j) Int = Any :: j -> j
+
+  Or::
+
+    type instance forall j . F1 Int = Any :: j -> j
+
 Compiler
 ~~~~~~~~
 


=====================================
libraries/base/GHC/Base.hs
=====================================
@@ -806,11 +806,21 @@ class Functor f => Applicative f where
     (<*) :: f a -> f b -> f a
     (<*) = liftA2 const
 
--- | A variant of '<*>' with the arguments reversed.
+-- | A variant of '<*>' with the types of the arguments reversed. It differs from
+-- @`flip` `(<*>)`@ in that the effects are resolved in the order the arguments are
+-- presented.
 --
+-- ==== __Examples__
+-- >>> (<**>) (print 1) (id <$ print 2)
+-- 1
+-- 2
+--
+-- >>> flip (<*>) (print 1) (id <$ print 2)
+-- 2
+-- 1
+
 (<**>) :: Applicative f => f a -> f (a -> b) -> f b
 (<**>) = liftA2 (\a f -> f a)
--- Don't use $ here, see the note at the top of the page
 
 -- | Lift a function to actions.
 -- Equivalent to Functor's `fmap` but implemented using only `Applicative`'s methods:


=====================================
libraries/stm
=====================================
@@ -1 +1 @@
-Subproject commit cfb7e775c5f6df281b7052b7b4e4a51dafda10d2
+Subproject commit 86172e75bd4f5c400b3a6f0cd3945bdb7c03bcdd


=====================================
rts/js/environment.js
=====================================
@@ -411,14 +411,6 @@ function h$gettimeofday(tv_v,tv_o,tz_v,tz_o) {
   return 0;
 }
 
-function h$traceEvent(ev_v,ev_o) {
-  h$errorMsg(h$decodeUtf8z(ev_v, ev_o));
-}
-
-function h$traceMarker(ev_v,ev_o) {
-  h$errorMsg(h$decodeUtf8z(ev_v, ev_o));
-}
-
 var h$__hscore_gettimeofday = h$gettimeofday;
 
 var h$myTimeZone = h$encodeUtf8("UTC");


=====================================
rts/js/eventlog.js
=====================================
@@ -0,0 +1,18 @@
+// default eventlog writer: does nothing
+var h$event_log_writer = (a,o) => {return;}
+
+// redirect the eventlog to stderr
+function h$eventlogToStderr() {
+  h$event_log_writer = (a,o) => h$errorMsg(h$decodeUtf8z(a,o));
+}
+
+function h$traceEvent(ev_v,ev_o) {
+  h$event_log_writer(ev_v,ev_o);
+}
+
+function h$traceMarker(ev_v,ev_o) {
+  h$event_log_writer(ev_v,ev_o);
+}
+
+function h$flushEventlog(cap_a,cap_o) {
+}


=====================================
rts/rts.cabal.in
=====================================
@@ -94,6 +94,7 @@ library
         js/debug.js
         js/enum.js
         js/environment.js
+        js/eventlog.js
         js/gc.js
         js/goog.js
         js/hscore.js


=====================================
testsuite/tests/cabal/t22333/all.T
=====================================
@@ -1,4 +1,4 @@
 test('T22333',
-     [extra_files(['Setup.hs', 'my-exe', 'my-package-a', 'my-package-b' ]), js_broken(22573)],
+     [extra_files(['Setup.hs', 'my-exe', 'my-package-a', 'my-package-b' ]), js_broken(22349)],
      makefile_test,
      [])


=====================================
testsuite/tests/indexed-types/should_compile/T14131.hs
=====================================
@@ -9,21 +9,21 @@ import Data.Kind
 import Data.Proxy
 
 data family Nat :: k -> k -> Type
-newtype instance Nat :: (k -> Type) -> (k -> Type) -> Type where
+newtype instance Nat :: forall k . (k -> Type) -> (k -> Type) -> Type where
   Nat :: (forall xx. f xx -> g xx) -> Nat f g
 
 type family   F :: Maybe a
-type instance F = (Nothing :: Maybe a)
+type instance F @a = (Nothing :: Maybe a)
 
 class C k where
   data CD :: k -> k -> Type
   type CT :: k
 
 instance C (Maybe a) where
-  data CD :: Maybe a -> Maybe a -> Type where
+  data CD @(Maybe a) :: Maybe a -> Maybe a -> Type where
     CD :: forall a (m :: Maybe a) (n :: Maybe a). Proxy m -> Proxy n -> CD m n
-  type CT = (Nothing :: Maybe a)
+  type CT @(Maybe a) = (Nothing :: Maybe a)
 
 class Z k where
   type ZT :: Maybe k
-  type ZT = (Nothing :: Maybe k)
+  type ZT @k = (Nothing :: Maybe k)


=====================================
testsuite/tests/indexed-types/should_compile/T15852.hs
=====================================
@@ -7,4 +7,4 @@ import Data.Kind
 import Data.Proxy
 
 data family DF a (b :: k)
-data instance DF (Proxy c) :: Proxy j -> Type
+data instance DF @(Proxy j) (Proxy c) :: Proxy j -> Type


=====================================
testsuite/tests/indexed-types/should_compile/T15852.stderr
=====================================
@@ -3,10 +3,10 @@ TYPE CONSTRUCTORS
     roles nominal nominal nominal
 COERCION AXIOMS
   axiom T15852.D:R:DFProxyProxy0 ::
-    forall k1 k2 (c :: k1) (j :: k2).
-      DF (Proxy c) = T15852.R:DFProxyProxy k1 k2 c j
+    forall k1 k2 (j :: k1) (c :: k2).
+      DF (Proxy c) = T15852.R:DFProxyProxy k1 k2 j c
 FAMILY INSTANCES
-  data instance forall {k1} {k2} {c :: k1} {j :: k2}.
+  data instance forall {k1} {k2} {j :: k1} {c :: k2}.
                   DF (Proxy c) -- Defined at T15852.hs:10:15
 Dependent modules: []
-Dependent packages: [base-4.17.0.0]
+Dependent packages: [base-4.18.0.0]


=====================================
testsuite/tests/indexed-types/should_fail/T14230.hs
=====================================
@@ -8,4 +8,4 @@ class C k where
   data CD :: k -> k -> *
 
 instance C (Maybe a) where
-  data CD :: (k -> *) -> (k -> *) -> *
+  data forall k . CD :: (k -> *) -> (k -> *) -> *


=====================================
testsuite/tests/indexed-types/should_fail/T7938.hs
=====================================
@@ -9,4 +9,4 @@ class Foo (a :: k1) (b :: k2) where
   type Bar a
 
 instance Foo (a :: k1) (b :: k2) where
-  type Bar a = (KP :: KProxy k2)
+  type forall k2 . Bar a = (KP :: KProxy k2)


=====================================
testsuite/tests/indexed-types/should_fail/T7938.stderr
=====================================
@@ -1,5 +1,5 @@
 
-T7938.hs:12:17: error: [GHC-83865]
+T7938.hs:12:29: error: [GHC-83865]
     • Expected a type, but ‘KP :: KProxy k2’ has kind ‘KProxy k2’
     • In the type ‘(KP :: KProxy k2)’
       In the type instance declaration for ‘Bar’


=====================================
testsuite/tests/rename/should_compile/T23512b.hs
=====================================
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeFamilies, TypeAbstractions #-}
+module T23512b where
+import GHC.Types
+
+type family F2 a :: k
+type instance F2 @(j -> j) Int = Any :: j -> j
+
+type family F3 a :: k
+type instance forall j. F3 Int = Any :: j -> j


=====================================
testsuite/tests/rename/should_compile/all.T
=====================================
@@ -213,3 +213,4 @@ test('T23240', [req_th, extra_files(['T23240_aux.hs'])], multimod_compile, ['T23
 test('T23318', normal, compile, ['-Wduplicate-exports'])
 test('T23434', normal, compile, [''])
 test('T23510b', normal, compile, [''])
+test('T23512b', normal, compile, [''])


=====================================
testsuite/tests/rename/should_fail/T23512a.hs
=====================================
@@ -0,0 +1,9 @@
+{-# LANGUAGE  TypeFamilies #-}
+module T23512a where
+import GHC.Types
+
+type family F1 a :: k
+type instance F1 Int = Any :: j -> j
+
+data family D :: k -> Type
+data instance D :: k -> Type


=====================================
testsuite/tests/rename/should_fail/T23512a.stderr
=====================================
@@ -0,0 +1,6 @@
+
+T23512a.hs:6:31: error: [GHC-76037] Not in scope: type variable ‘j’
+
+T23512a.hs:6:36: error: [GHC-76037] Not in scope: type variable ‘j’
+
+T23512a.hs:9:20: error: [GHC-76037] Not in scope: type variable ‘k’


=====================================
testsuite/tests/rename/should_fail/all.T
=====================================
@@ -203,3 +203,4 @@ test('T23510a', normal, compile_fail, [''])
 test('T16635a', normal, compile_fail, [''])
 test('T16635b', normal, compile_fail, [''])
 test('T16635c', normal, compile_fail, [''])
+test('T23512a', normal, compile_fail, [''])


=====================================
testsuite/tests/safeHaskell/check/pkg01/all.T
=====================================
@@ -53,7 +53,7 @@ test('ImpSafe03',
 test('ImpSafe04', normalise_version('base'), compile_fail, ['-fpackage-trust -distrust base'])
 
 test('ImpSafeOnly01',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly01 ' + make_args)],
@@ -61,7 +61,7 @@ test('ImpSafeOnly01',
      ['-fpackage-trust -package-db pdb.ImpSafeOnly01/local.db -trust base'])
 
 test('ImpSafeOnly02',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly02 ' + make_args)],
@@ -70,7 +70,7 @@ test('ImpSafeOnly02',
 
 # Fail since we enable package trust (and still need safePkg01 trusted)
 test('ImpSafeOnly03',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly03 ' + make_args)],
@@ -79,7 +79,7 @@ test('ImpSafeOnly03',
 
 # Succeed since we don't enable package trust
 test('ImpSafeOnly04',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly04 ' + make_args)],
@@ -87,14 +87,14 @@ test('ImpSafeOnly04',
 
 # fail due to missing trust of safePkg01, next test succeeds.
 test('ImpSafeOnly05',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly05 ' + make_args)],
      compile_fail,
      ['-fpackage-trust -package-db pdb.ImpSafeOnly05/local.db -trust base'])
 test('ImpSafeOnly06',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly06 ' + make_args)],
@@ -103,7 +103,7 @@ test('ImpSafeOnly06',
 
 # fail due to missing trust
 test('ImpSafeOnly07',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly07 ' + make_args),
@@ -111,7 +111,7 @@ test('ImpSafeOnly07',
      compile_fail,
      ['-fpackage-trust -package-db pdb.ImpSafeOnly07/local.db -trust safePkg01 -distrust bytestring'])
 test('ImpSafeOnly08',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly08 ' + make_args),
@@ -119,7 +119,7 @@ test('ImpSafeOnly08',
      compile_fail,
      ['-fpackage-trust -package-db pdb.ImpSafeOnly08/local.db -trust safePkg01'])
 test('ImpSafeOnly09',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly09 ' + make_args),
@@ -129,7 +129,7 @@ test('ImpSafeOnly09',
 
 # finally succeed
 test('ImpSafeOnly10',
-     [js_broken(22350),
+     [js_broken(22349),
       req_host_target_ghc,
       extra_files(['M_SafePkg.hs', 'M_SafePkg2.hs', 'M_SafePkg3.hs', 'M_SafePkg4.hs', 'M_SafePkg5.hs', 'M_SafePkg6.hs', 'M_SafePkg7.hs', 'M_SafePkg8.hs', 'Setup.hs', 'p.cabal']),
       pre_cmd('$MAKE -s --no-print-directory mkPackageDatabase.ImpSafeOnly10 ' + make_args)],


=====================================
testsuite/tests/th/T23525.hs
=====================================
@@ -0,0 +1,6 @@
+{-# LANGUAGE TemplateHaskell #-}
+module T23525 where
+
+import Language.Haskell.TH
+
+$(sequence [withDecDoc "doc string" $ tySynD (mkName ">-:") [] [t| () |]])


=====================================
testsuite/tests/th/all.T
=====================================
@@ -576,3 +576,4 @@ test('T21050', normal, compile_fail, [''])
 test('T22559a', normal, compile_fail, [''])
 test('T22559b', normal, compile_fail, [''])
 test('T22559c', normal, compile_fail, [''])
+test('T23525', normal, compile, [''])


=====================================
testsuite/tests/typecheck/should_fail/T15797.hs
=====================================
@@ -13,7 +13,7 @@ import Data.Kind
 
 class Ríki (obj :: Type) where
   type Obj :: obj -> Constraint
-  type Obj = Bæ @k :: k -> Constraint
+  type forall k . Obj = Bæ @k :: k -> Constraint
 
 class    Bæ    (a :: k)
 instance Bæ @k (a :: k)



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/68bff0a947e1133d359c0b7eded5970a75c20113...3759b78512cb8c0f2f567e39d30b78b69d232b65

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/68bff0a947e1133d359c0b7eded5970a75c20113...3759b78512cb8c0f2f567e39d30b78b69d232b65
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/20230618/23d66c7d/attachment-0001.html>


More information about the ghc-commits mailing list