[Git][ghc/ghc][wip/sand-witch/tysyn-info-ppr] Update GHCi :info type synonym and type family printing (24459)

Andrei Borzenkov (@sand-witch) gitlab at gitlab.haskell.org
Mon Sep 2 14:59:58 UTC 2024



Andrei Borzenkov pushed to branch wip/sand-witch/tysyn-info-ppr at Glasgow Haskell Compiler / GHC


Commits:
2bbf0329 by Andrei Borzenkov at 2024-09-02T18:57:24+04:00
Update GHCi :info type synonym and type family printing (24459)

- Do not print result's kind since we have full kind
  in SAKS and we display invisible arity using @-binders

- Do not suppress significant invisible binders

An invisible binder is considered significant when it meets at least
one of the following three criteria:
  - It visibly occurs in the RHS type
  - It is not followed by a visible binder, so it
    affects the arity of a type synonym
  - It is followed by a significant binder,
    so it affects positioning

- - - - -


23 changed files:

- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Type.hs
- testsuite/tests/backpack/should_fail/T19244a.stderr
- testsuite/tests/backpack/should_fail/T19244b.stderr
- testsuite/tests/backpack/should_fail/bkpfail46.stderr
- testsuite/tests/ghci/T18060/T18060.stdout
- testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
- testsuite/tests/ghci/scripts/T15941.stdout
- testsuite/tests/ghci/scripts/T19310.stdout
- testsuite/tests/ghci/scripts/T21294a.stdout
- + testsuite/tests/ghci/scripts/T24459.script
- + testsuite/tests/ghci/scripts/T24459.stdout
- testsuite/tests/ghci/scripts/T8535.stdout
- testsuite/tests/ghci/scripts/T9181.stdout
- testsuite/tests/ghci/scripts/all.T
- testsuite/tests/ghci/scripts/ghci020.stdout
- testsuite/tests/ghci/should_run/T10145.stdout
- testsuite/tests/ghci/should_run/T18594.stdout
- testsuite/tests/interface-stability/base-exports.stdout
- testsuite/tests/interface-stability/ghc-experimental-exports.stdout
- testsuite/tests/interface-stability/template-haskell-exports.stdout
- testsuite/tests/rep-poly/RepPolyBackpack3.stderr


Changes:

=====================================
compiler/GHC/Core/TyCon.hs
=====================================
@@ -25,7 +25,8 @@ module GHC.Core.TyCon(
         mkRequiredTyConBinder,
         mkAnonTyConBinder, mkAnonTyConBinders,
         tyConBinderForAllTyFlag, tyConBndrVisForAllTyFlag, isNamedTyConBinder,
-        isVisibleTyConBinder, isInvisibleTyConBinder,
+        isVisibleTyConBinder, isInvisSpecTyConBinder, isInvisibleTyConBinder,
+        isInferredTyConBinder,
         isVisibleTcbVis, isInvisSpecTcbVis,
 
         -- ** Field labels
@@ -488,7 +489,7 @@ mkRequiredTyConBinder dep_set tv
   | tv `elemVarSet` dep_set = mkNamedTyConBinder Required tv
   | otherwise               = mkAnonTyConBinder tv
 
-tyConBinderForAllTyFlag :: TyConBinder -> ForAllTyFlag
+tyConBinderForAllTyFlag :: VarBndr a TyConBndrVis -> ForAllTyFlag
 tyConBinderForAllTyFlag (Bndr _ vis) = tyConBndrVisForAllTyFlag vis
 
 tyConBndrVisForAllTyFlag :: TyConBndrVis -> ForAllTyFlag
@@ -514,10 +515,22 @@ isInvisSpecTcbVis :: TyConBndrVis -> Bool
 isInvisSpecTcbVis (NamedTCB Specified) = True
 isInvisSpecTcbVis _                    = False
 
+isInvisInferTcbVis :: TyConBndrVis -> Bool
+isInvisInferTcbVis (NamedTCB Inferred) = True
+isInvisInferTcbVis _                   = False
+
+isInvisSpecTyConBinder :: VarBndr tv TyConBndrVis -> Bool
+-- Works for IfaceTyConBinder too
+isInvisSpecTyConBinder (Bndr _ tcb_vis) = isInvisSpecTcbVis tcb_vis
+
 isInvisibleTyConBinder :: VarBndr tv TyConBndrVis -> Bool
 -- Works for IfaceTyConBinder too
 isInvisibleTyConBinder tcb = not (isVisibleTyConBinder tcb)
 
+isInferredTyConBinder :: VarBndr var TyConBndrVis -> Bool
+-- Works for IfaceTyConBinder too
+isInferredTyConBinder (Bndr _ tcb_vis) = isInvisInferTcbVis tcb_vis
+
 -- Build the 'tyConKind' from the binders and the result kind.
 -- Keep in sync with 'mkTyConKind' in GHC.Iface.Type.
 mkTyConKind :: [TyConBinder] -> Kind -> Kind


=====================================
compiler/GHC/Iface/Syntax.hs
=====================================
@@ -98,6 +98,7 @@ import Control.Monad
 import System.IO.Unsafe
 import Control.DeepSeq
 import Data.Proxy
+import qualified Data.Set as Set
 
 infixl 3 &&&
 
@@ -1051,17 +1052,18 @@ pprIfaceDecl ss (IfaceClass { ifName  = clas
 
 pprIfaceDecl ss (IfaceSynonym { ifName    = tc
                               , ifBinders = binders
-                              , ifSynRhs  = mono_ty
+                              , ifSynRhs  = poly_ty
                               , ifResKind = res_kind})
   = vcat [ pprStandaloneKindSig name_doc (mkIfaceTyConKind binders res_kind)
-         , hang (text "type" <+> pprIfaceDeclHead suppress_bndr_sig [] ss tc binders <+> equals)
-           2 (sep [ pprIfaceForAll tvs, pprIfaceContextArr theta, ppr_tau
-                  , ppUnless (isIfaceLiftedTypeKind res_kind) (dcolon <+> ppr res_kind) ])
+         , hang (text "type" <+> decl_head <+> equals)
+           2 (sep [ pprIfaceForAll tvs, pprIfaceContextArr theta, ppr_tau ])
          ]
   where
-    (tvs, theta, tau) = splitIfaceSigmaTy mono_ty
+    (tvs, theta, tau) = splitIfaceSigmaTy poly_ty
     name_doc = pprPrefixIfDeclBndr (ss_how_much ss) (occName tc)
 
+    decl_head = pprIfaceDeclHeadWith invisibles_suppressor suppress_bndr_sig [] ss tc binders
+
     -- See Note [Printing type abbreviations] in GHC.Iface.Type
     ppr_tau | tc `hasKey` liftedTypeKindTyConKey ||
               tc `hasKey` unrestrictedFunTyConKey ||
@@ -1072,6 +1074,10 @@ pprIfaceDecl ss (IfaceSynonym { ifName    = tc
     -- See Note [Suppressing binder signatures] in GHC.Iface.Type
     suppress_bndr_sig = SuppressBndrSig True
 
+    invisibles_suppressor =
+      suppressIfaceInsignificantInvisibles
+        (\var -> ifTyConBinderName var `ifTypeVarVisiblyOccurs` tau)
+
 pprIfaceDecl ss (IfaceFamily { ifName = tycon
                              , ifFamFlav = rhs, ifBinders = binders
                              , ifResKind = res_kind
@@ -1083,9 +1089,7 @@ pprIfaceDecl ss (IfaceFamily { ifName = tycon
 
   | otherwise
   = vcat [ pprStandaloneKindSig name_doc (mkIfaceTyConKind binders res_kind)
-         , hang (text "type family"
-                   <+> pprIfaceDeclHead suppress_bndr_sig [] ss tycon binders
-                   <+> pp_inj res_var inj
+         , hang (text "type family" <+> decl_head <+> pp_inj res_var inj
                    <+> ppShowRhs ss (pp_where rhs))
               2 (ppShowRhs ss (pp_rhs rhs))
            $$
@@ -1094,6 +1098,8 @@ pprIfaceDecl ss (IfaceFamily { ifName = tycon
   where
     name_doc = pprPrefixIfDeclBndr (ss_how_much ss) (occName tycon)
 
+    decl_head = pprIfaceDeclHeadWith invisibles_suppressor suppress_bndr_sig [] ss tycon binders
+
     pp_where (IfaceClosedSynFamilyTyCon {}) = text "where"
     pp_where _                              = empty
 
@@ -1130,6 +1136,16 @@ pprIfaceDecl ss (IfaceFamily { ifName = tycon
     -- See Note [Suppressing binder signatures] in GHC.Iface.Type
     suppress_bndr_sig = SuppressBndrSig True
 
+    invisibles_suppressor =
+      suppressIfaceInsignificantInvisibles
+        (\var -> ifTyConBinderName var `Set.member` mentioned_vars)
+
+    mentioned_vars
+      | Just{} <- res_var
+      , Injective injectivity <- inj
+      = Set.fromList . map (ifTyConBinderName . snd) . filter fst $ zip injectivity binders
+      | otherwise = mempty
+
 pprIfaceDecl _ (IfacePatSyn { ifName = name,
                               ifPatUnivBndrs = univ_bndrs, ifPatExBndrs = ex_bndrs,
                               ifPatProvCtxt = prov_ctxt, ifPatReqCtxt = req_ctxt,
@@ -1239,16 +1255,26 @@ pprIfaceTyConParent IfNoParent
 pprIfaceTyConParent (IfDataInstance _ tc tys)
   = pprIfaceTypeApp topPrec tc tys
 
+
+-- The most common use case of `pprIfaceDeclHeadWith`
 pprIfaceDeclHead :: SuppressBndrSig
                  -> IfaceContext -> ShowSub -> Name
                  -> [IfaceTyConBinder]   -- of the tycon, for invisible-suppression
                  -> SDoc
-pprIfaceDeclHead suppress_sig context ss tc_occ bndrs
+pprIfaceDeclHead
+  = pprIfaceDeclHeadWith (\pk bndrs -> suppressIfaceInvisibles pk bndrs bndrs)
+
+pprIfaceDeclHeadWith :: (PrintExplicitKinds -> [IfaceTyConBinder] -> [IfaceTyConBinder])
+                     -> SuppressBndrSig
+                     -> IfaceContext -> ShowSub -> Name
+                     -> [IfaceTyConBinder]   -- of the tycon, for invisible-suppression
+                     -> SDoc
+pprIfaceDeclHeadWith suppress_invisibles suppress_sig context ss tc_occ bndrs
   = sdocOption sdocPrintExplicitKinds $ \print_kinds ->
     sep [ pprIfaceContextArr context
         , pprPrefixIfDeclBndr (ss_how_much ss) (occName tc_occ)
           <+> pprIfaceTyConBinders suppress_sig
-                (suppressIfaceInvisibles (PrintExplicitKinds print_kinds) bndrs bndrs) ]
+                (suppress_invisibles (PrintExplicitKinds print_kinds) bndrs) ]
 
 pprIfaceConDecl :: ShowSub -> Bool
                 -> IfaceTopBndr


=====================================
compiler/GHC/Iface/Type.hs
=====================================
@@ -56,7 +56,8 @@ module GHC.Iface.Type (
         pprIfaceCoTcApp, pprTyTcApp, pprIfacePrefixApp,
         isIfaceRhoType,
 
-        suppressIfaceInvisibles,
+        suppressIfaceInvisibles, suppressIfaceInsignificantInvisibles,
+        ifTypeVarVisiblyOccurs,
         stripIfaceInvisVars,
         stripInvisArgs,
 
@@ -99,6 +100,8 @@ import Data.Word (Word8)
 import Control.Arrow (first)
 import Control.DeepSeq
 import Control.Monad ((<$!>))
+import Data.List (dropWhileEnd)
+import qualified Data.List.NonEmpty as NonEmpty
 
 {-
 ************************************************************************
@@ -623,6 +626,42 @@ suppressIfaceInvisibles (PrintExplicitKinds False) tys xs = suppress tys xs
         | isInvisibleTyConBinder k =     suppress ks xs
         | otherwise                = x : suppress ks xs
 
+-- An invisible binder is considered significant when it meets at least
+-- one of the following three criteria:
+--   - It visibly occurs in the RHS type
+--   - It is not followed by a visible binder, so it
+--     affects the arity of a type synonym
+--   - It is followed by a significant binder,
+--     so it affects positioning
+suppressIfaceInsignificantInvisibles :: (IfaceTyConBinder -> Bool)
+                                     -> PrintExplicitKinds
+                                     -> [IfaceTyConBinder]
+                                     -> [IfaceTyConBinder]
+suppressIfaceInsignificantInvisibles _             (PrintExplicitKinds True)  tys = tys
+suppressIfaceInsignificantInvisibles mentioned_var (PrintExplicitKinds False) tys = suppress tys
+    where
+      -- Consider this example:
+      --   type T :: forall k1 k2. Type
+      --   type T @a @b = b
+      -- `@a` is not mentioned on the RHS however we can't just
+      -- drop it because implicit argument positioning matters.
+      --
+      -- Hence just drop the end
+      mentioned_vars = dropWhileEnd (not . mentioned_var)
+
+      suppress_invisible_groups [] = []
+      suppress_invisible_groups [group] = NonEmpty.toList group -- the last group affects arity
+      suppress_invisible_groups (group : groups)
+        = applyWhen invis_group mentioned_vars bndrs ++ suppress_invisible_groups groups
+        where
+          bndrs       = NonEmpty.toList group
+          invis_group = isInvisibleTyConBinder (NonEmpty.head group)
+
+      suppress
+        = suppress_invisible_groups                 -- Filter out insignificant invisible binders
+        . NonEmpty.groupWith isInvisibleTyConBinder -- Find chunks of @-binders
+        . filterOut          isInferredTyConBinder  -- We don't want to display @{binders}
+
 stripIfaceInvisVars :: PrintExplicitKinds -> [IfaceTyConBinder] -> [IfaceTyConBinder]
 stripIfaceInvisVars (PrintExplicitKinds True)  tyvars = tyvars
 stripIfaceInvisVars (PrintExplicitKinds False) tyvars
@@ -663,6 +702,27 @@ ifTypeIsVarFree ty = go ty
     go_args IA_Nil = True
     go_args (IA_Arg arg _ args) = go arg && go_args args
 
+ifTypeVarVisiblyOccurs :: IfLclName -> IfaceType -> Bool
+-- Returns True if the type contains this name. Doesn't count
+-- invisible application
+-- Just used to control pretty printing
+ifTypeVarVisiblyOccurs name ty = go ty
+  where
+    go (IfaceTyVar var)         = var == name
+    go (IfaceFreeTyVar {})      = False
+    go (IfaceAppTy fun args)    = go fun || go_args args
+    go (IfaceFunTy _ w arg res) = go w || go arg || go res
+    go (IfaceForAllTy bndr ty)  = go (ifaceBndrType (binderVar bndr)) || go ty
+    go (IfaceTyConApp _ args)  = go_args args
+    go (IfaceTupleTy _ _ args) = go_args args
+    go (IfaceLitTy _)          = False
+    go (IfaceCastTy {})        = False -- Safe
+    go (IfaceCoercionTy {})    = False -- Safe
+
+    go_args IA_Nil = False
+    go_args (IA_Arg arg Required args) = go arg || go_args args
+    go_args (IA_Arg _arg _ args) = go_args args
+
 {- Note [Substitution on IfaceType]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Substitutions on IfaceType are done only during pretty-printing to


=====================================
testsuite/tests/backpack/should_fail/T19244a.stderr
=====================================
@@ -17,7 +17,7 @@ T19244a.bkp:22:9: error: [GHC-15843]
     • Type constructor ‘Key’ has conflicting definitions in the module
       and its hsig file.
       Main module: type Key :: * -> Constraint
-                   type Key = GHC.Classes.Ord :: * -> Constraint
+                   type Key = GHC.Classes.Ord
         Hsig file: type Key :: forall {k}. k -> Constraint
                    class Key k1
       The types have different kinds.


=====================================
testsuite/tests/backpack/should_fail/T19244b.stderr
=====================================
@@ -1,20 +1,20 @@
 [1 of 3] Processing user
-  [1 of 2] Compiling Map[sig]         ( user\Map.hsig, nothing )
-  [2 of 2] Compiling User             ( user\User.hs, nothing )
+  [1 of 2] Compiling Map[sig]         ( user/Map.hsig, nothing )
+  [2 of 2] Compiling User             ( user/User.hs, nothing )
 [2 of 3] Processing ordmap
   Instantiating ordmap
-  [1 of 1] Compiling Map              ( ordmap\Map.hs, T19244b.out\ordmap\Map.o )
+  [1 of 1] Compiling Map              ( ordmap/Map.hs, T19244b.out/ordmap/Map.o )
 [3 of 3] Processing main
   Instantiating main
   [1 of 1] Including user[Map=ordmap:Map]
     Instantiating user[Map=ordmap:Map]
-    [1 of 2] Compiling Map[sig]         ( user\Map.hsig, T19244b.out\user\user-GzloW2NeDdA2M0V8qzN4g2\Map.o )
+    [1 of 2] Compiling Map[sig]         ( user/Map.hsig, T19244b.out/user/user-GzloW2NeDdA2M0V8qzN4g2/Map.o )
 
 T19244b.bkp:11:27: error: [GHC-15843]
     • Type constructor ‘Key’ has conflicting definitions in the module
       and its hsig file.
       Main module: type Key :: * -> Constraint
-                   type Key = GHC.Classes.Ord :: * -> Constraint
+                   type Key = GHC.Classes.Ord
         Hsig file: type Key :: forall {k}. k -> Constraint
                    class Key k1
       The types have different kinds.


=====================================
testsuite/tests/backpack/should_fail/bkpfail46.stderr
=====================================
@@ -1,20 +1,20 @@
 [1 of 3] Processing p
-  [1 of 2] Compiling A[sig]           ( p\A.hsig, nothing )
-  [2 of 2] Compiling M                ( p\M.hs, nothing )
+  [1 of 2] Compiling A[sig]           ( p/A.hsig, nothing )
+  [2 of 2] Compiling M                ( p/M.hs, nothing )
 [2 of 3] Processing q
   Instantiating q
-  [1 of 1] Compiling A                ( q\A.hs, bkpfail46.out\q\A.o )
+  [1 of 1] Compiling A                ( q/A.hs, bkpfail46.out/q/A.o )
 [3 of 3] Processing r
   Instantiating r
   [1 of 1] Including p[A=q:A]
     Instantiating p[A=q:A]
-    [1 of 2] Compiling A[sig]           ( p\A.hsig, bkpfail46.out\p\p-HVmFlcYSefiK5n1aDP1v7x\A.o )
+    [1 of 2] Compiling A[sig]           ( p/A.hsig, bkpfail46.out/p/p-HVmFlcYSefiK5n1aDP1v7x/A.o )
 
 bkpfail46.bkp:16:9: error: [GHC-15843]
     • Type constructor ‘K’ has conflicting definitions in the module
       and its hsig file.
       Main module: type K :: * -> Constraint
-                   type K a = GHC.Classes.Eq a :: Constraint
+                   type K a = GHC.Classes.Eq a
         Hsig file: type K :: * -> Constraint
                    class K a
       Illegal parameterized type synonym in implementation of abstract data.


=====================================
testsuite/tests/ghci/T18060/T18060.stdout
=====================================
@@ -1,5 +1,5 @@
 type (->) :: * -> * -> *
-type (->) = FUN Many :: * -> * -> *
+type (->) = FUN Many
   	-- Defined in ‘GHC.Types’
 infixr -1 ->
 instance Monoid b => Monoid (a -> b)


=====================================
testsuite/tests/ghci/scripts/ListTuplePunsPpr.stdout
=====================================
@@ -74,13 +74,13 @@ data Tuple2# a b = (#,#) a b
 (#  ,  #) :: a -> b -> Tuple2# a b
 (Int, Int) :: Tuple2 (*) (*)
 type T :: Tuple2 (*) (*)
-type T = (Int, Int) :: Tuple2 (*) (*)
+type T = (Int, Int)
   	-- Defined at <interactive>:19:1
 type S :: Solo (*)
-type S = MkSolo Int :: Solo (*)
+type S = MkSolo Int
   	-- Defined at <interactive>:20:1
 type L :: List (*)
-type L = [Int] :: List (*)
+type L = [Int]
   	-- Defined at <interactive>:21:1
 f :: Int -> Tuple2 Int Int -> Int
 (\ (_, _) -> ()) :: Tuple2 a b -> Unit


=====================================
testsuite/tests/ghci/scripts/T15941.stdout
=====================================
@@ -1,4 +1,3 @@
 type T :: * -> * -> *
-type T =
-  (->) @{GHC.Types.LiftedRep} @{GHC.Types.LiftedRep} :: * -> * -> *
+type T = (->) @{GHC.Types.LiftedRep} @{GHC.Types.LiftedRep}
   	-- Defined at <interactive>:2:1


=====================================
testsuite/tests/ghci/scripts/T19310.stdout
=====================================
@@ -1,3 +1,3 @@
 type T :: * -> * -> *
-type T = (->) @{LiftedRep} @{LiftedRep} :: * -> * -> *
+type T = (->) @{LiftedRep} @{LiftedRep}
   	-- Defined at <interactive>:3:1


=====================================
testsuite/tests/ghci/scripts/T21294a.stdout
=====================================
@@ -1,5 +1,5 @@
 type L0 :: * -> *
-type L0 = [] :: * -> *
+type L0 = []
   	-- Defined at <interactive>:1:1
 type L1 :: * -> *
 type L1 a = [a]


=====================================
testsuite/tests/ghci/scripts/T24459.script
=====================================
@@ -0,0 +1,50 @@
+:set -XTypeAbstractions
+
+:{
+import Data.Kind
+import Data.Data
+
+type T7 :: forall a b c. b -> forall d. Type
+type T7 @a @b @c f @d = b
+
+type T6 :: forall k. Type -> Type
+type T6 _a = ()
+
+type T5 :: forall a. Type -> Type
+type T5 @a _b = Proxy _b
+
+type T4 :: forall a. Type -> Type
+type T4 @a _b = Proxy a
+
+type T3 :: forall k. k -> Type
+type T3 a = Proxy a
+
+type T2 :: forall k. k -> Type
+type T2 @k = Proxy
+
+type T1 :: forall k. k -> Type
+type T1 = Proxy
+
+type T0 :: forall k. k -> Type
+type T0 = Proxy :: forall k. k -> Type
+:}
+
+:i T0
+:i T1
+:i T2
+:i T3
+:i T4
+:i T5
+:i T6
+:i T7
+
+:set -fprint-explicit-kinds
+
+:i T0
+:i T1
+:i T2
+:i T3
+:i T4
+:i T5
+:i T6
+:i T7


=====================================
testsuite/tests/ghci/scripts/T24459.stdout
=====================================
@@ -0,0 +1,50 @@
+type T0 :: forall k. k -> *
+type T0 = Proxy
+  	-- Defined at <interactive>:29:1
+type T1 :: forall k. k -> *
+type T1 = Proxy
+  	-- Defined at <interactive>:26:1
+type T2 :: forall k. k -> *
+type T2 @k = Proxy
+  	-- Defined at <interactive>:23:1
+type T3 :: forall k. k -> *
+type T3 a = Proxy a
+  	-- Defined at <interactive>:20:1
+type T4 :: forall {k} (a :: k). * -> *
+type T4 @a _b = Proxy a
+  	-- Defined at <interactive>:17:1
+type T5 :: forall {k} (a :: k). * -> *
+type T5 _b = Proxy _b
+  	-- Defined at <interactive>:14:1
+type T6 :: forall {k} (k1 :: k). * -> *
+type T6 _a = ()
+  	-- Defined at <interactive>:11:1
+type T7 :: forall {k} {k1} {k2} (a :: k) b (c :: k1).
+           b -> forall (d :: k2). *
+type T7 @a @b f @d = b
+  	-- Defined at <interactive>:8:1
+type T0 :: forall k. k -> *
+type T0 = Proxy
+  	-- Defined at <interactive>:29:1
+type T1 :: forall k. k -> *
+type T1 = Proxy
+  	-- Defined at <interactive>:26:1
+type T2 :: forall k. k -> *
+type T2 @k = Proxy @{k}
+  	-- Defined at <interactive>:23:1
+type T3 :: forall k. k -> *
+type T3 @k a = Proxy @{k} a
+  	-- Defined at <interactive>:20:1
+type T4 :: forall {k} (a :: k). * -> *
+type T4 @{k} @a _b = Proxy @{k} a
+  	-- Defined at <interactive>:17:1
+type T5 :: forall {k} (a :: k). * -> *
+type T5 @{k} @a _b = Proxy @{*} _b
+  	-- Defined at <interactive>:14:1
+type T6 :: forall {k} (k1 :: k). * -> *
+type T6 @{k} @k1 _a = ()
+  	-- Defined at <interactive>:11:1
+type T7 :: forall {k} {k1} {k2} (a :: k) b (c :: k1).
+           b -> forall (d :: k2). *
+type T7 @{k} @{k1} @{k2} @a @b @c f @d = b
+  	-- Defined at <interactive>:8:1


=====================================
testsuite/tests/ghci/scripts/T8535.stdout
=====================================
@@ -1,5 +1,5 @@
 type (->) :: * -> * -> *
-type (->) = FUN Many :: * -> * -> *
+type (->) = FUN Many
   	-- Defined in ‘GHC.Types’
 infixr -1 ->
 instance Monoid b => Monoid (a -> b)


=====================================
testsuite/tests/ghci/scripts/T9181.stdout
=====================================
@@ -13,12 +13,10 @@ type (GHC.Internal.Data.Type.Ord.<=) x y =
   GHC.Internal.TypeError.Assert
     (x GHC.Internal.Data.Type.Ord.<=? y)
     (GHC.Internal.Data.Type.Ord.LeErrMsg x y)
-  :: Constraint
 type (GHC.Internal.Data.Type.Ord.<=?) :: forall k. k -> k -> Bool
 type (GHC.Internal.Data.Type.Ord.<=?) m n =
   GHC.Internal.Data.Type.Ord.OrdCond
     (GHC.Internal.Data.Type.Ord.Compare m n) True True False
-  :: Bool
 type GHC.Internal.TypeLits.AppendSymbol :: GHC.Types.Symbol
                                            -> GHC.Types.Symbol -> GHC.Types.Symbol
 type family GHC.Internal.TypeLits.AppendSymbol a b


=====================================
testsuite/tests/ghci/scripts/all.T
=====================================
@@ -384,3 +384,4 @@ test('T23686', normal, ghci_script, ['T23686.script'])
 test('T13869', extra_files(['T13869a.hs', 'T13869b.hs']), ghci_script, ['T13869.script'])
 test('ListTuplePunsPpr', normal, ghci_script, ['ListTuplePunsPpr.script'])
 test('ListTuplePunsPprNoAbbrevTuple', [expect_broken(23135), limit_stdout_lines(13)], ghci_script, ['ListTuplePunsPprNoAbbrevTuple.script'])
+test('T24459', normal, ghci_script, ['T24459.script'])


=====================================
testsuite/tests/ghci/scripts/ghci020.stdout
=====================================
@@ -1,5 +1,5 @@
 type (->) :: * -> * -> *
-type (->) = FUN Many :: * -> * -> *
+type (->) = FUN Many
   	-- Defined in ‘GHC.Types’
 infixr -1 ->
 instance Monoid b => Monoid (a -> b)


=====================================
testsuite/tests/ghci/should_run/T10145.stdout
=====================================
@@ -1,5 +1,5 @@
 type (->) :: * -> * -> *
-type (->) = FUN Many :: * -> * -> *
+type (->) = FUN Many
   	-- Defined in ‘GHC.Types’
 infixr -1 ->
 instance Monoid b => Monoid (a -> b)


=====================================
testsuite/tests/ghci/should_run/T18594.stdout
=====================================
@@ -1,5 +1,5 @@
 type (->) :: * -> * -> *
-type (->) = FUN Many :: * -> * -> *
+type (->) = FUN Many
   	-- Defined in ‘GHC.Types’
 infixr -1 ->
 instance Monoid b => Monoid (a -> b)


=====================================
testsuite/tests/interface-stability/base-exports.stdout
=====================================
@@ -1766,27 +1766,27 @@ module Data.Type.Equality where
 module Data.Type.Ord where
   -- Safety: Safe
   type (<) :: forall {t}. t -> t -> Constraint
-  type (<) x y = GHC.Internal.TypeError.Assert (x <? y) (GHC.Internal.Data.Type.Ord.LtErrMsg x y) :: Constraint
+  type (<) x y = GHC.Internal.TypeError.Assert (x <? y) (GHC.Internal.Data.Type.Ord.LtErrMsg x y)
   type (<=) :: forall {t}. t -> t -> Constraint
-  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y) :: Constraint
+  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y)
   type (<=?) :: forall k. k -> k -> GHC.Types.Bool
-  type (<=?) m n = OrdCond (Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False :: GHC.Types.Bool
+  type (<=?) m n = OrdCond (Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False
   type (<?) :: forall k. k -> k -> GHC.Types.Bool
-  type (<?) m n = OrdCond (Compare m n) GHC.Types.True GHC.Types.False GHC.Types.False :: GHC.Types.Bool
+  type (<?) m n = OrdCond (Compare m n) GHC.Types.True GHC.Types.False GHC.Types.False
   type (>) :: forall {t}. t -> t -> Constraint
-  type (>) x y = GHC.Internal.TypeError.Assert (x >? y) (GHC.Internal.Data.Type.Ord.GtErrMsg x y) :: Constraint
+  type (>) x y = GHC.Internal.TypeError.Assert (x >? y) (GHC.Internal.Data.Type.Ord.GtErrMsg x y)
   type (>=) :: forall {t}. t -> t -> Constraint
-  type (>=) x y = GHC.Internal.TypeError.Assert (x >=? y) (GHC.Internal.Data.Type.Ord.GeErrMsg x y) :: Constraint
+  type (>=) x y = GHC.Internal.TypeError.Assert (x >=? y) (GHC.Internal.Data.Type.Ord.GeErrMsg x y)
   type (>=?) :: forall k. k -> k -> GHC.Types.Bool
-  type (>=?) m n = OrdCond (Compare m n) GHC.Types.False GHC.Types.True GHC.Types.True :: GHC.Types.Bool
+  type (>=?) m n = OrdCond (Compare m n) GHC.Types.False GHC.Types.True GHC.Types.True
   type (>?) :: forall k. k -> k -> GHC.Types.Bool
-  type (>?) m n = OrdCond (Compare m n) GHC.Types.False GHC.Types.False GHC.Types.True :: GHC.Types.Bool
+  type (>?) m n = OrdCond (Compare m n) GHC.Types.False GHC.Types.False GHC.Types.True
   type Compare :: forall k. k -> k -> GHC.Types.Ordering
   type family Compare a b
   type Max :: forall k. k -> k -> k
-  type Max m n = OrdCond (Compare m n) n n m :: k
+  type Max m n = OrdCond (Compare m n) n n m
   type Min :: forall k. k -> k -> k
-  type Min m n = OrdCond (Compare m n) m m n :: k
+  type Min m n = OrdCond (Compare m n) m m n
   type OrdCond :: forall k. GHC.Types.Ordering -> k -> k -> k -> k
   type family OrdCond o lt eq gt where
     forall k (lt :: k) (eq :: k) (gt :: k). OrdCond GHC.Types.LT lt eq gt = lt
@@ -3321,7 +3321,7 @@ module GHC.Base where
   type Levity :: *
   data Levity = Lifted | Unlifted
   type LiftedRep :: RuntimeRep
-  type LiftedRep = BoxedRep Lifted :: RuntimeRep
+  type LiftedRep = BoxedRep Lifted
   type List :: * -> *
   data List a = ...
   type role MVar# nominal representational
@@ -3434,7 +3434,7 @@ module GHC.Base where
   type TypeLitSort :: *
   data TypeLitSort = TypeLitSymbol | TypeLitNat | TypeLitChar
   type UnliftedRep :: RuntimeRep
-  type UnliftedRep = BoxedRep Unlifted :: RuntimeRep
+  type UnliftedRep = BoxedRep Unlifted
   type UnliftedType :: *
   type UnliftedType = TYPE UnliftedRep
   type VecCount :: *
@@ -3444,7 +3444,7 @@ module GHC.Base where
   type Void :: *
   data Void
   type Void# :: ZeroBitType
-  type Void# = (# #) :: ZeroBitType
+  type Void# = (# #)
   type Weak# :: forall {l :: Levity}. TYPE (BoxedRep l) -> UnliftedType
   data Weak# a
   type WithDict :: Constraint -> * -> Constraint
@@ -3490,7 +3490,7 @@ module GHC.Base where
   type WordBox :: TYPE WordRep -> *
   data WordBox a = MkWordBox a
   type ZeroBitRep :: RuntimeRep
-  type ZeroBitRep = TupleRep '[] :: RuntimeRep
+  type ZeroBitRep = TupleRep '[]
   type ZeroBitType :: *
   type ZeroBitType = TYPE ZeroBitRep
   absentErr :: forall a. a
@@ -5519,7 +5519,7 @@ module GHC.Exts where
   type Levity :: *
   data Levity = Lifted | Unlifted
   type LiftedRep :: RuntimeRep
-  type LiftedRep = BoxedRep Lifted :: RuntimeRep
+  type LiftedRep = BoxedRep Lifted
   type List :: * -> *
   data List a = ...
   type role MVar# nominal representational
@@ -5594,7 +5594,7 @@ module GHC.Exts where
   TypeLitNat :: GHC.Types.TypeLitSort
   TypeLitSymbol :: GHC.Types.TypeLitSort
   type UnliftedRep :: RuntimeRep
-  type UnliftedRep = BoxedRep Unlifted :: RuntimeRep
+  type UnliftedRep = BoxedRep Unlifted
   type UnliftedType :: *
   type UnliftedType = TYPE UnliftedRep
   type VecCount :: *
@@ -5602,7 +5602,7 @@ module GHC.Exts where
   type VecElem :: *
   data VecElem = Int8ElemRep | Int16ElemRep | Int32ElemRep | Int64ElemRep | Word8ElemRep | Word16ElemRep | Word32ElemRep | Word64ElemRep | FloatElemRep | DoubleElemRep
   type Void# :: ZeroBitType
-  type Void# = (# #) :: ZeroBitType
+  type Void# = (# #)
   type Weak# :: forall {l :: Levity}. TYPE (BoxedRep l) -> UnliftedType
   data Weak# a
   type WithDict :: Constraint -> * -> Constraint
@@ -5648,7 +5648,7 @@ module GHC.Exts where
   type WordBox :: TYPE WordRep -> *
   data WordBox a = MkWordBox a
   type ZeroBitRep :: RuntimeRep
-  type ZeroBitRep = TupleRep '[] :: RuntimeRep
+  type ZeroBitRep = TupleRep '[]
   type ZeroBitType :: *
   type ZeroBitType = TYPE ZeroBitRep
   acosDouble# :: Double# -> Double#
@@ -7383,7 +7383,7 @@ module GHC.Generics where
   type C :: *
   data C
   type C1 :: forall {k}. Meta -> (k -> *) -> k -> *
-  type C1 = M1 C :: Meta -> (k -> *) -> k -> *
+  type C1 = M1 C
   type Constructor :: forall {k}. k -> Constraint
   class Constructor c where
     conName :: forall k1 (t :: k -> (k1 -> *) -> k1 -> *) (f :: k1 -> *) (a :: k1). t c f a -> [GHC.Types.Char]
@@ -7393,7 +7393,7 @@ module GHC.Generics where
   type D :: *
   data D
   type D1 :: forall {k}. Meta -> (k -> *) -> k -> *
-  type D1 = M1 D :: Meta -> (k -> *) -> k -> *
+  type D1 = M1 D
   type Datatype :: forall {k}. k -> Constraint
   class Datatype d where
     datatypeName :: forall k1 (t :: k -> (k1 -> *) -> k1 -> *) (f :: k1 -> *) (a :: k1). t d f a -> [GHC.Types.Char]
@@ -7440,14 +7440,14 @@ module GHC.Generics where
   type R :: *
   data R
   type Rec0 :: forall {k}. * -> k -> *
-  type Rec0 = K1 R :: * -> k -> *
+  type Rec0 = K1 R
   type role Rec1 representational nominal
   type Rec1 :: forall k. (k -> *) -> k -> *
   newtype Rec1 f p = Rec1 {unRec1 :: f p}
   type S :: *
   data S
   type S1 :: forall {k}. Meta -> (k -> *) -> k -> *
-  type S1 = M1 S :: Meta -> (k -> *) -> k -> *
+  type S1 = M1 S
   type Selector :: forall {k}. k -> Constraint
   class Selector s where
     selName :: forall k1 (t :: k -> (k1 -> *) -> k1 -> *) (f :: k1 -> *) (a :: k1). t s f a -> [GHC.Types.Char]
@@ -7464,24 +7464,24 @@ module GHC.Generics where
   data U1 p = U1
   UAddr :: forall k (p :: k). GHC.Prim.Addr# -> URec (GHC.Internal.Ptr.Ptr ()) p
   type UAddr :: forall {k}. k -> *
-  type UAddr = URec (GHC.Internal.Ptr.Ptr ()) :: k -> *
+  type UAddr = URec (GHC.Internal.Ptr.Ptr ())
   UChar :: forall k (p :: k). GHC.Prim.Char# -> URec GHC.Types.Char p
   type UChar :: forall {k}. k -> *
-  type UChar = URec GHC.Types.Char :: k -> *
+  type UChar = URec GHC.Types.Char
   UDouble :: forall k (p :: k). GHC.Prim.Double# -> URec GHC.Types.Double p
   type UDouble :: forall {k}. k -> *
-  type UDouble = URec GHC.Types.Double :: k -> *
+  type UDouble = URec GHC.Types.Double
   UFloat :: forall k (p :: k). GHC.Prim.Float# -> URec GHC.Types.Float p
   type UFloat :: forall {k}. k -> *
-  type UFloat = URec GHC.Types.Float :: k -> *
+  type UFloat = URec GHC.Types.Float
   UInt :: forall k (p :: k). GHC.Prim.Int# -> URec GHC.Types.Int p
   type UInt :: forall {k}. k -> *
-  type UInt = URec GHC.Types.Int :: k -> *
+  type UInt = URec GHC.Types.Int
   type URec :: forall k. * -> k -> *
   data family URec a p
   UWord :: forall k (p :: k). GHC.Prim.Word# -> URec GHC.Types.Word p
   type UWord :: forall {k}. k -> *
-  type UWord = URec GHC.Types.Word :: k -> *
+  type UWord = URec GHC.Types.Word
   type role V1 phantom
   type V1 :: forall k. k -> *
   data V1 p
@@ -8569,7 +8569,7 @@ module GHC.Num.BigNat where
   type BigNat :: *
   data BigNat = BN# {unBigNat :: BigNat#}
   type BigNat# :: GHC.Types.UnliftedType
-  type BigNat# = GHC.Num.WordArray.WordArray# :: GHC.Types.UnliftedType
+  type BigNat# = GHC.Num.WordArray.WordArray#
   bigNatAdd :: BigNat# -> BigNat# -> BigNat#
   bigNatAddWord :: BigNat# -> GHC.Types.Word -> BigNat#
   bigNatAddWord# :: BigNat# -> GHC.Prim.Word# -> BigNat#
@@ -9343,7 +9343,7 @@ module GHC.Stack where
   type CostCentreStack :: *
   data CostCentreStack
   type HasCallStack :: Constraint
-  type HasCallStack = ?callStack::CallStack :: Constraint
+  type HasCallStack = ?callStack::CallStack
   type SrcLoc :: *
   data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int}
   callStack :: HasCallStack => CallStack
@@ -9404,7 +9404,7 @@ module GHC.Stack.Types where
   type CallStack :: *
   data CallStack = EmptyCallStack | PushCallStack [GHC.Types.Char] SrcLoc CallStack | FreezeCallStack CallStack
   type HasCallStack :: Constraint
-  type HasCallStack = ?callStack::CallStack :: Constraint
+  type HasCallStack = ?callStack::CallStack
   type SrcLoc :: *
   data SrcLoc = SrcLoc {srcLocPackage :: [GHC.Types.Char], srcLocModule :: [GHC.Types.Char], srcLocFile :: [GHC.Types.Char], srcLocStartLine :: GHC.Types.Int, srcLocStartCol :: GHC.Types.Int, srcLocEndLine :: GHC.Types.Int, srcLocEndCol :: GHC.Types.Int}
   emptyCallStack :: CallStack
@@ -9559,9 +9559,9 @@ module GHC.TypeLits where
   type (-) :: Natural -> Natural -> Natural
   type family (-) a b
   type (<=) :: forall {t}. t -> t -> Constraint
-  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y) :: Constraint
+  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y)
   type (<=?) :: forall k. k -> k -> GHC.Types.Bool
-  type (<=?) m n = GHC.Internal.Data.Type.Ord.OrdCond (GHC.Internal.Data.Type.Ord.Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False :: GHC.Types.Bool
+  type (<=?) m n = GHC.Internal.Data.Type.Ord.OrdCond (GHC.Internal.Data.Type.Ord.Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False
   type AppendSymbol :: Symbol -> Symbol -> Symbol
   type family AppendSymbol a b
   type CharToNat :: GHC.Types.Char -> Natural
@@ -9678,9 +9678,9 @@ module GHC.TypeNats where
   type (-) :: Natural -> Natural -> Natural
   type family (-) a b
   type (<=) :: forall {t}. t -> t -> Constraint
-  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y) :: Constraint
+  type (<=) x y = GHC.Internal.TypeError.Assert (x <=? y) (GHC.Internal.Data.Type.Ord.LeErrMsg x y)
   type (<=?) :: forall k. k -> k -> GHC.Types.Bool
-  type (<=?) m n = GHC.Internal.Data.Type.Ord.OrdCond (GHC.Internal.Data.Type.Ord.Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False :: GHC.Types.Bool
+  type (<=?) m n = GHC.Internal.Data.Type.Ord.OrdCond (GHC.Internal.Data.Type.Ord.Compare m n) GHC.Types.True GHC.Types.True GHC.Types.False
   type CmpNat :: Natural -> Natural -> GHC.Types.Ordering
   type family CmpNat a b
   type Div :: Natural -> Natural -> Natural


=====================================
testsuite/tests/interface-stability/ghc-experimental-exports.stdout
=====================================
@@ -1480,9 +1480,9 @@ module Data.Tuple.Experimental where
   class a => CSolo a
     {-# MINIMAL #-}
   type CTuple0 :: Constraint
-  type CTuple0 = () :: Constraint :: Constraint
+  type CTuple0 = () :: Constraint
   type CTuple1 :: Constraint -> Constraint
-  type CTuple1 = CSolo :: Constraint -> Constraint
+  type CTuple1 = CSolo
   type CTuple10 :: Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint
   class (a, b, c, d, e, f, g, h, i, j) => CTuple10 a b c d e f g h i j
     {-# MINIMAL #-}
@@ -2637,11 +2637,11 @@ module Data.Tuple.Experimental where
   type Tuple0 :: *
   type Tuple0 = ()
   type Tuple0# :: GHC.Types.ZeroBitType
-  type Tuple0# = (# #) :: GHC.Types.ZeroBitType
+  type Tuple0# = (# #)
   type Tuple1 :: * -> *
-  type Tuple1 = Solo :: * -> *
+  type Tuple1 = Solo
   type Tuple1# :: * -> TYPE (GHC.Types.TupleRep '[GHC.Types.LiftedRep])
-  type Tuple1# = Solo# :: * -> TYPE (GHC.Types.TupleRep '[GHC.Types.LiftedRep])
+  type Tuple1# = Solo#
   type Tuple10 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
   data Tuple10 a b c d e f g h i j = ...
   type Tuple10# :: forall (k0 :: GHC.Types.RuntimeRep) (k1 :: GHC.Types.RuntimeRep) (k2 :: GHC.Types.RuntimeRep) (k3 :: GHC.Types.RuntimeRep) (k4 :: GHC.Types.RuntimeRep) (k5 :: GHC.Types.RuntimeRep) (k6 :: GHC.Types.RuntimeRep) (k7 :: GHC.Types.RuntimeRep) (k8 :: GHC.Types.RuntimeRep) (k9 :: GHC.Types.RuntimeRep). TYPE k0 -> TYPE k1 -> TYPE k2 -> TYPE k3 -> TYPE k4 -> TYPE k5 -> TYPE k6 -> TYPE k7 -> TYPE k8 -> TYPE k9 -> TYPE (GHC.Types.TupleRep [k0, k1, k2, k3, k4, k5, k6, k7, k8, k9])
@@ -4345,9 +4345,9 @@ module Prelude.Experimental where
   class a => CSolo a
     {-# MINIMAL #-}
   type CTuple0 :: Constraint
-  type CTuple0 = () :: Constraint :: Constraint
+  type CTuple0 = () :: Constraint
   type CTuple1 :: Constraint -> Constraint
-  type CTuple1 = CSolo :: Constraint -> Constraint
+  type CTuple1 = CSolo
   type CTuple10 :: Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint -> Constraint
   class (a, b, c, d, e, f, g, h, i, j) => CTuple10 a b c d e f g h i j
     {-# MINIMAL #-}
@@ -6976,11 +6976,11 @@ module Prelude.Experimental where
   type Tuple0 :: *
   type Tuple0 = ()
   type Tuple0# :: GHC.Types.ZeroBitType
-  type Tuple0# = (# #) :: GHC.Types.ZeroBitType
+  type Tuple0# = (# #)
   type Tuple1 :: * -> *
-  type Tuple1 = Solo :: * -> *
+  type Tuple1 = Solo
   type Tuple1# :: * -> TYPE (GHC.Types.TupleRep '[GHC.Types.LiftedRep])
-  type Tuple1# = Solo# :: * -> TYPE (GHC.Types.TupleRep '[GHC.Types.LiftedRep])
+  type Tuple1# = Solo#
   type Tuple10 :: * -> * -> * -> * -> * -> * -> * -> * -> * -> * -> *
   data Tuple10 a b c d e f g h i j = ...
   type Tuple10# :: forall (k0 :: GHC.Types.RuntimeRep) (k1 :: GHC.Types.RuntimeRep) (k2 :: GHC.Types.RuntimeRep) (k3 :: GHC.Types.RuntimeRep) (k4 :: GHC.Types.RuntimeRep) (k5 :: GHC.Types.RuntimeRep) (k6 :: GHC.Types.RuntimeRep) (k7 :: GHC.Types.RuntimeRep) (k8 :: GHC.Types.RuntimeRep) (k9 :: GHC.Types.RuntimeRep). TYPE k0 -> TYPE k1 -> TYPE k2 -> TYPE k3 -> TYPE k4 -> TYPE k5 -> TYPE k6 -> TYPE k7 -> TYPE k8 -> TYPE k9 -> TYPE (GHC.Types.TupleRep [k0, k1, k2, k3, k4, k5, k6, k7, k8, k9])


=====================================
testsuite/tests/interface-stability/template-haskell-exports.stdout
=====================================
@@ -31,7 +31,7 @@ module Language.Haskell.TH where
   type Code :: (* -> *) -> forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
   newtype Code m a = Code {examineCode :: m (TExp a)}
   type CodeQ :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
-  type CodeQ = Code Q :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
+  type CodeQ = Code Q
   type Con :: *
   data Con = NormalC Name [BangType] | RecC Name [VarBangType] | InfixC BangType Name BangType | ForallC [TyVarBndr Specificity] Cxt Con | GadtC [Name] [BangType] Type | RecGadtC [Name] [VarBangType] Type
   type ConQ :: *
@@ -881,7 +881,7 @@ module Language.Haskell.TH.Lib where
   type ClauseQ :: *
   type ClauseQ = GHC.Internal.TH.Syntax.Q GHC.Internal.TH.Syntax.Clause
   type CodeQ :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
-  type CodeQ = GHC.Internal.TH.Syntax.Code GHC.Internal.TH.Syntax.Q :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
+  type CodeQ = GHC.Internal.TH.Syntax.Code GHC.Internal.TH.Syntax.Q
   type ConQ :: *
   type ConQ = GHC.Internal.TH.Syntax.Q GHC.Internal.TH.Syntax.Con
   type CxtQ :: *
@@ -1220,7 +1220,7 @@ module Language.Haskell.TH.Lib.Internal where
   type ClauseQ :: *
   type ClauseQ = GHC.Internal.TH.Syntax.Q GHC.Internal.TH.Syntax.Clause
   type CodeQ :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
-  type CodeQ = GHC.Internal.TH.Syntax.Code GHC.Internal.TH.Syntax.Q :: forall (r :: GHC.Types.RuntimeRep). TYPE r -> *
+  type CodeQ = GHC.Internal.TH.Syntax.Code GHC.Internal.TH.Syntax.Q
   type ConQ :: *
   type ConQ = GHC.Internal.TH.Syntax.Q GHC.Internal.TH.Syntax.Con
   type CxtQ :: *
@@ -2052,8 +2052,8 @@ module Language.Haskell.TH.Syntax where
     qAddForeignFilePath :: ForeignSrcLang -> GHC.Internal.Base.String -> m ()
     qAddModFinalizer :: Q () -> m ()
     qAddCorePlugin :: GHC.Internal.Base.String -> m ()
-    qGetQ :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => m (GHC.Internal.Maybe.Maybe a)
-    qPutQ :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => a -> m ()
+    qGetQ :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => m (GHC.Internal.Maybe.Maybe a)
+    qPutQ :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => a -> m ()
     qIsExtEnabled :: Extension -> m GHC.Types.Bool
     qExtsEnabled :: m [Extension]
     qPutDoc :: DocLoc -> GHC.Internal.Base.String -> m ()
@@ -2135,7 +2135,7 @@ module Language.Haskell.TH.Syntax where
   falseName :: Name
   getDoc :: DocLoc -> Q (GHC.Internal.Maybe.Maybe GHC.Internal.Base.String)
   getPackageRoot :: Q GHC.Internal.IO.FilePath
-  getQ :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => Q (GHC.Internal.Maybe.Maybe a)
+  getQ :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => Q (GHC.Internal.Maybe.Maybe a)
   get_cons_names :: Con -> [Name]
   hoistCode :: forall (m :: * -> *) (n :: * -> *) (r :: GHC.Types.RuntimeRep) (a :: TYPE r). GHC.Internal.Base.Monad m => (forall x. m x -> n x) -> Code m a -> Code n a
   isExtEnabled :: Extension -> Q GHC.Types.Bool
@@ -2181,7 +2181,7 @@ module Language.Haskell.TH.Syntax where
   oneName :: Name
   pkgString :: PkgName -> GHC.Internal.Base.String
   putDoc :: DocLoc -> GHC.Internal.Base.String -> Q ()
-  putQ :: forall a. ghc-internal-9.1001.0:GHC.Internal.Data.Typeable.Internal.Typeable a => a -> Q ()
+  putQ :: forall a. ghc-internal-9.1100.0:GHC.Internal.Data.Typeable.Internal.Typeable a => a -> Q ()
   recover :: forall a. Q a -> Q a -> Q a
   reify :: Name -> Q Info
   reifyAnnotations :: forall a. GHC.Internal.Data.Data.Data a => AnnLookup -> Q [a]


=====================================
testsuite/tests/rep-poly/RepPolyBackpack3.stderr
=====================================
@@ -1,19 +1,19 @@
 [1 of 3] Processing sig
-  [1 of 1] Compiling Sig[sig]         ( sig\Sig.hsig, nothing )
+  [1 of 1] Compiling Sig[sig]         ( sig/Sig.hsig, nothing )
 [2 of 3] Processing impl
   Instantiating impl
-  [1 of 1] Compiling Impl             ( impl\Impl.hs, RepPolyBackpack3.out\impl\Impl.o )
+  [1 of 1] Compiling Impl             ( impl/Impl.hs, RepPolyBackpack3.out/impl/Impl.o )
 [3 of 3] Processing main
   Instantiating main
   [1 of 1] Including sig[Sig=impl:Impl]
     Instantiating sig[Sig=impl:Impl]
-    [1 of 1] Compiling Sig[sig]         ( sig\Sig.hsig, RepPolyBackpack3.out\sig\sig-Absk5cIXTXe6UYhGMYGber\Sig.o )
+    [1 of 1] Compiling Sig[sig]         ( sig/Sig.hsig, RepPolyBackpack3.out/sig/sig-Absk5cIXTXe6UYhGMYGber/Sig.o )
 
 RepPolyBackpack3.bkp:17:5: error: [GHC-15843]
     • Type constructor ‘Rep’ has conflicting definitions in the module
       and its hsig file.
       Main module: type Rep :: GHC.Types.RuntimeRep
-                   type Rep = T :: GHC.Types.RuntimeRep
+                   type Rep = T
         Hsig file: type Rep :: GHC.Types.RuntimeRep
                    data Rep
       Illegal implementation of abstract data: Invalid type family ‘T’.



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

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/2bbf032989a145ddba354339fca5a1ccf96ae639
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/20240902/7308d0d5/attachment-0001.html>


More information about the ghc-commits mailing list