[Git][ghc/ghc][wip/tyconapp-opts] 8 commits: Notes from call

Ben Gamari gitlab at gitlab.haskell.org
Sat May 30 01:19:12 UTC 2020



Ben Gamari pushed to branch wip/tyconapp-opts at Glasgow Haskell Compiler / GHC


Commits:
fe0dbf42 by Ben Gamari at 2020-05-29T21:19:01-04:00
Notes from call

- - - - -
1e2408ff by Ben Gamari at 2020-05-29T21:19:03-04:00
Shortcut mkTvSubstPrs on empty list

Surprisingly enough this reduces compilation time on Cabal by
nearly 1%.

- - - - -
927e0134 by Ben Gamari at 2020-05-29T21:19:03-04:00
Shortcut coreView

- - - - -
caddb71f by Ben Gamari at 2020-05-29T21:19:03-04:00
expandSynTyCon_maybe: Special-case nullary tycons

This avoids both allocation and some instructions.

- - - - -
84e8b819 by Ben Gamari at 2020-05-29T21:19:03-04:00
Optimise tcView

- - - - -
bc717022 by Ben Gamari at 2020-05-29T21:19:03-04:00
Inline expandSynTyCon_maybe

This is necessary to avoid some needless allocation since we currently
lack nested CPR on sums.

Metric Decrease:
   T12227
   T12545
   T12707
   T14683
   T3064
   T5631
   T5642
   T9020
   T9872a

- - - - -
a442c3e5 by Ben Gamari at 2020-05-29T21:19:03-04:00
Some cleanup

- - - - -
7951df0d by Ben Gamari at 2020-05-29T21:19:03-04:00
hi

Metric Decrease:
    T13035
    haddock.Cabal
    haddock.base
Metric Increase:
    T9872c

- - - - -


19 changed files:

- compiler/GHC/Builtin/Types.hs
- compiler/GHC/Builtin/Types/Prim.hs
- compiler/GHC/Core/TyCo/Subst.hs
- compiler/GHC/Core/TyCon.hs
- compiler/GHC/Core/Type.hs
- compiler/GHC/Core/Unify.hs
- compiler/GHC/Tc/Solver/Canonical.hs
- compiler/GHC/Tc/Utils/TcType.hs
- testsuite/tests/deSugar/should_compile/T2431.stderr
- testsuite/tests/deriving/should_compile/T14578.stderr
- testsuite/tests/plugins/plugins09.stdout
- testsuite/tests/plugins/plugins10.stdout
- testsuite/tests/plugins/plugins11.stdout
- testsuite/tests/plugins/static-plugins.stdout
- testsuite/tests/printer/T18052a.stderr
- testsuite/tests/simplCore/should_compile/T13143.stderr
- testsuite/tests/simplCore/should_compile/T18013.stderr
- testsuite/tests/simplCore/should_compile/T7360.stderr
- testsuite/tests/typecheck/should_compile/T13032.stderr


Changes:

=====================================
compiler/GHC/Builtin/Types.hs
=====================================
@@ -145,6 +145,7 @@ import GHC.Types.Id
 import GHC.Settings.Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE, mAX_SUM_SIZE )
 import GHC.Unit.Module        ( Module )
 import GHC.Core.Type
+import qualified GHC.Core.TyCo.Rep as TyCoRep (Type(TyConApp))
 import GHC.Types.RepType
 import GHC.Core.DataCon
 import {-# SOURCE #-} GHC.Core.ConLike
@@ -647,7 +648,7 @@ constraintKindTyCon :: TyCon
 constraintKindTyCon = pcTyCon constraintKindTyConName Nothing [] []
 
 liftedTypeKind, typeToTypeKind, constraintKind :: Kind
-liftedTypeKind   = tYPE liftedRepTy
+liftedTypeKind   = TyCoRep.TyConApp liftedTypeKindTyCon []
 typeToTypeKind   = liftedTypeKind `mkVisFunTy` liftedTypeKind
 constraintKind   = mkTyConApp constraintKindTyCon []
 
@@ -1215,8 +1216,8 @@ runtimeRepTy = mkTyConTy runtimeRepTyCon
 -- type Type = tYPE 'LiftedRep
 liftedTypeKindTyCon :: TyCon
 liftedTypeKindTyCon   = buildSynTyCon liftedTypeKindTyConName
-                                       [] liftedTypeKind []
-                                       (tYPE liftedRepTy)
+                                       [] liftedTypeKind [] rhs
+  where rhs = TyCoRep.TyConApp tYPETyCon [liftedRepTy]
 
 runtimeRepTyCon :: TyCon
 runtimeRepTyCon = pcTyCon runtimeRepTyConName Nothing []


=====================================
compiler/GHC/Builtin/Types/Prim.hs
=====================================
@@ -541,8 +541,35 @@ mkPrimTcName built_in_syntax occ key tycon
 -- | Given a RuntimeRep, applies TYPE to it.
 -- see Note [TYPE and RuntimeRep]
 tYPE :: Type -> Type
+tYPE (TyConApp tc [])
+  | tc `hasKey` liftedRepDataConKey = liftedTypeKind  -- TYPE 'LiftedPtrRep
 tYPE rr = TyConApp tYPETyCon [rr]
 
+-- Note [Prefer Type over TYPE 'LiftedPtrRep]
+-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+--
+-- The Core of nearly any program will have numerous occurrences of
+-- @TYPE 'LiftedPtrRep@ floating about. Consequently, we try hard to ensure
+-- that operations on such types are efficient:
+--
+--   * Instead of representing the lifted kind as
+--     @TyConApp tYPETyCon [liftedRepDataCon]@ we rather prefer to
+--     use the 'GHC.Types.Type' type synonym (available in GHC as
+--     'TysPrim.liftedTypeKind'). Note only is this a smaller AST but it also
+--     guarantees sharing on the heap.
+--
+--   * To avoid allocating 'TyConApp' constructors 'TysPrim.tYPE'
+--     catches the lifted case and uses `liftedTypeKind` instead of building an
+--     application.
+--
+--   * Similarly, 'Type.mkTyConApp' catches applications of TYPE and
+--     handles them using 'TysPrim.tYPE', ensuring that it benefits from the
+--     optimisation described above.
+--
+--   * Since 'liftedTypeKind' is a nullary type synonym application,
+--     it benefits from the optimisation described in Note [Comparing nullary
+--     type synonyms] in "GHC.Core.Type".
+
 {-
 ************************************************************************
 *                                                                      *


=====================================
compiler/GHC/Core/TyCo/Subst.hs
=====================================
@@ -423,6 +423,7 @@ zipTCvSubst tcvs tys
 -- | Generates the in-scope set for the 'TCvSubst' from the types in the
 -- incoming environment. No CoVars, please!
 mkTvSubstPrs :: [(TyVar, Type)] -> TCvSubst
+mkTvSubstPrs []  = emptyTCvSubst
 mkTvSubstPrs prs =
     ASSERT2( onlyTyVarsAndNoCoercionTy, text "prs" <+> ppr prs )
     mkTvSubst in_scope tenv


=====================================
compiler/GHC/Core/TyCon.hs
=====================================
@@ -2302,10 +2302,12 @@ expandSynTyCon_maybe
 -- ^ Expand a type synonym application, if any
 expandSynTyCon_maybe tc tys
   | SynonymTyCon { tyConTyVars = tvs, synTcRhs = rhs, tyConArity = arity } <- tc
-  = case tys `listLengthCmp` arity of
-        GT -> Just (tvs `zip` tys, rhs, drop arity tys)
-        EQ -> Just (tvs `zip` tys, rhs, [])
-        LT -> Nothing
+  = case tys of
+      [] -> Just ([], rhs, []) -- Avoid a bit of work in the case of nullary synonyms
+      _  -> case tys `listLengthCmp` arity of
+              GT -> Just (tvs `zip` tys, rhs, drop arity tys)
+              EQ -> Just (tvs `zip` tys, rhs, [])
+              LT -> Nothing
    | otherwise
    = Nothing
 


=====================================
compiler/GHC/Core/Type.hs
=====================================
@@ -353,15 +353,16 @@ See also #11715, which tracks removing this inconsistency.
 -}
 
 -- | Gives the typechecker view of a type. This unwraps synonyms but
--- leaves 'Constraint' alone. c.f. coreView, which turns Constraint into
--- TYPE LiftedRep. Returns Nothing if no unwrapping happens.
+-- leaves 'Constraint' alone. c.f. 'coreView', which turns 'Constraint' into
+-- @TYPE LiftedRep at . Returns 'Nothing' if no unwrapping happens.
 -- See also Note [coreView vs tcView]
 {-# INLINE tcView #-}
 tcView :: Type -> Maybe Type
-tcView (TyConApp tc tys) | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys
-  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')
+tcView (TyConApp tc tys)
+  | res@(Just _) <- expandSynTyConApp_maybe tc tys
+  = res
                -- The free vars of 'rhs' should all be bound by 'tenv', so it's
-               -- ok to use 'substTy' here.
+               -- ok to use 'substTy' here (which is what expandSynTyConApp_maybe does).
                -- See also Note [The substitution invariant] in GHC.Core.TyCo.Subst.
                -- Its important to use mkAppTys, rather than (foldl AppTy),
                -- because the function part might well return a
@@ -370,17 +371,16 @@ tcView _ = Nothing
 
 {-# INLINE coreView #-}
 coreView :: Type -> Maybe Type
--- ^ This function Strips off the /top layer only/ of a type synonym
+-- ^ This function strips off the /top layer only/ of a type synonym
 -- application (if any) its underlying representation type.
--- Returns Nothing if there is nothing to look through.
+-- Returns 'Nothing' if there is nothing to look through.
 -- This function considers 'Constraint' to be a synonym of @TYPE LiftedRep at .
 --
 -- By being non-recursive and inlined, this case analysis gets efficiently
 -- joined onto the case analysis that the caller is already doing
 coreView ty@(TyConApp tc tys)
-  | Just (tenv, rhs, tys') <- expandSynTyCon_maybe tc tys
-  = Just (mkAppTys (substTy (mkTvSubstPrs tenv) rhs) tys')
-    -- This equation is exactly like tcView
+  | res@(Just _) <- expandSynTyConApp_maybe tc tys
+  = res
 
   -- At the Core level, Constraint = Type
   -- See Note [coreView vs tcView]
@@ -391,6 +391,21 @@ coreView ty@(TyConApp tc tys)
 coreView _ = Nothing
 
 -----------------------------------------------
+expandSynTyConApp_maybe :: TyCon -> [Type] -> Maybe Type
+expandSynTyConApp_maybe tc tys
+  | Just (tvs, rhs) <- synTyConDefn_maybe tc
+  = case tys of
+      [] -> Just (mkAppTys rhs tys)
+      _  -> case tys `listLengthCmp` arity of
+              GT -> Just (mkAppTys rhs' (drop arity tys))
+              EQ -> Just rhs'
+              LT -> Nothing
+        where
+          arity = tyConArity tc
+          rhs' = substTy (mkTvSubstPrs (tvs `zip` tys)) rhs
+  | otherwise
+  = Nothing
+
 expandTypeSynonyms :: Type -> Type
 -- ^ Expand out all type synonyms.  Actually, it'd suffice to expand out
 -- just the ones that discard type variables (e.g.  type Funny a = Int)
@@ -1222,8 +1237,10 @@ TyConApp constructors were all duplicates of `Type` applied to no arguments.
 
 Therefore in `mkTyConApp` we have a special case for `Type` to ensure that
 only one `TyConApp 'Type []` closure is allocated during the course of
-compilation. In order to avoid a potentially expensive series of checks in
-`mkTyConApp` only this egregious case is special cased at the moment.
+compilation.
+
+We also have a similar special-case for applications of TYPE; see
+Note [Prefer Type over TYPE 'LiftedPtrRep] for details.
 
 
 ---------------------------------------------------------------------
@@ -1243,6 +1260,10 @@ mkTyConApp tycon tys
   | tycon == liftedTypeKindTyCon
   = ASSERT2( null tys, ppr tycon $$ ppr tys )
     liftedTypeKindTyConApp
+  -- Note [Prefer Type over TYPE 'LiftedPtrRep]
+  | tycon == tYPETyCon
+  , [rep] <- tys
+  = tYPE rep
   | otherwise
   = TyConApp tycon tys
 
@@ -2200,6 +2221,36 @@ But the left is an AppTy while the right is a TyConApp. The solution is
 to use repSplitAppTy_maybe to break up the TyConApp into its pieces and
 then continue. Easy to do, but also easy to forget to do.
 
+
+Note [Comparing nullary type synonyms]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+Consider the task of testing equality between two 'Type's of the form
+
+  TyConApp tc []
+
+where @tc@ is a type synonym. A naive way to perform this comparison these
+would first expand the synonym and then compare the resulting expansions.
+
+However, this is obviously wasteful and the RHS of @tc@ may be large; it is
+much better to rather compare the TyCons directly. Consequently, before
+expanding type synonyms in type comparisons we first look for a nullary
+TyConApp and simply compare the TyCons if we find one. Of course, if we find
+that the TyCons are *not* equal then we still need to perform the expansion as
+their RHSs may still be equal.
+
+We perform this optimisation in a number of places:
+
+ * GHC.Core.Types.eqType
+ * GHC.Core.Types.nonDetCmpType
+ * GHC.Core.Unify.unify_ty
+ * TcCanonical.can_eq_nc'
+ * TcUnify.uType
+
+This optimisation is especially helpful for the ubiquitous GHC.Types.Type,
+since GHC prefers to use the type synonym over @TYPE 'LiftedPtr@ applications
+whenever possible. See [Prefer Type over TYPE 'LiftedPtrRep] in TysPrim for
+details.
+
 -}
 
 eqType :: Type -> Type -> Bool
@@ -2308,6 +2359,10 @@ nonDetCmpTypeX env orig_t1 orig_t2 =
     -- Returns both the resulting ordering relation between the two types
     -- and whether either contains a cast.
     go :: RnEnv2 -> Type -> Type -> TypeOrdering
+    -- See Note [Comparing nullary type synonyms].
+    go _   (TyConApp tc1 []) (TyConApp tc2 [])
+      | tc1 == tc2
+      = TEQ
     go env t1 t2
       | Just t1' <- coreView t1 = go env t1' t2
       | Just t2' <- coreView t2 = go env t1 t2'


=====================================
compiler/GHC/Core/Unify.hs
=====================================
@@ -956,6 +956,11 @@ unify_ty :: UMEnv
 -- Respects newtypes, PredTypes
 
 unify_ty env ty1 ty2 kco
+  -- See Note [Comparing nullary type synonyms] in GHC.Core.Type.
+  | TyConApp tc1 [] <- ty1
+  , TyConApp tc2 [] <- ty2
+  , tc1 == tc2                = return ()
+
     -- TODO: More commentary needed here
   | Just ty1' <- tcView ty1   = unify_ty env ty1' ty2 kco
   | Just ty2' <- tcView ty2   = unify_ty env ty1 ty2' kco


=====================================
compiler/GHC/Tc/Solver/Canonical.hs
=====================================
@@ -953,6 +953,11 @@ can_eq_nc'
    -> Type -> Type    -- RHS, after and before type-synonym expansion, resp
    -> TcS (StopOrContinue Ct)
 
+-- See Note [Comparing nullary type synonyms] in GHC.Core.Type.
+can_eq_nc' _flat _rdr_env _envs ev eq_rel ty1@(TyConApp tc1 []) _ps_ty1 (TyConApp tc2 []) _ps_ty2
+  | tc1 == tc2
+  = canEqReflexive ev eq_rel ty1
+
 -- Expand synonyms first; see Note [Type synonyms and canonicalization]
 can_eq_nc' flat rdr_env envs ev eq_rel ty1 ps_ty1 ty2 ps_ty2
   | Just ty1' <- tcView ty1 = can_eq_nc' flat rdr_env envs ev eq_rel ty1' ps_ty1 ty2  ps_ty2


=====================================
compiler/GHC/Tc/Utils/TcType.hs
=====================================
@@ -1528,6 +1528,11 @@ tc_eq_type keep_syns vis_only orig_ty1 orig_ty2
   = go orig_env orig_ty1 orig_ty2
   where
     go :: RnEnv2 -> Type -> Type -> Bool
+    -- See Note [Comparing nullary type synonyms] in GHC.Core.Type.
+    go _   (TyConApp tc1 []) (TyConApp tc2 [])
+      | tc1 == tc2
+      = True
+
     go env t1 t2 | not keep_syns, Just t1' <- tcView t1 = go env t1' t2
     go env t1 t2 | not keep_syns, Just t2' <- tcView t2 = go env t1 t2'
 


=====================================
testsuite/tests/deSugar/should_compile/T2431.stderr
=====================================
@@ -1,9 +1,9 @@
 
 ==================== Tidy Core ====================
 Result size of Tidy Core
-  = {terms: 63, types: 43, coercions: 1, joins: 0/0}
+  = {terms: 63, types: 39, coercions: 1, joins: 0/0}
 
--- RHS size: {terms: 2, types: 4, coercions: 1, joins: 0/0}
+-- RHS size: {terms: 2, types: 3, coercions: 1, joins: 0/0}
 T2431.$WRefl [InlPrag=INLINE[0] CONLIKE] :: forall a. a :~: a
 [GblId[DataConWrapper],
  Caf=NoCafRefs,
@@ -15,7 +15,7 @@ T2431.$WRefl [InlPrag=INLINE[0] CONLIKE] :: forall a. a :~: a
 T2431.$WRefl
   = \ (@a) -> T2431.Refl @a @a @~(<a>_N :: a GHC.Prim.~# a)
 
--- RHS size: {terms: 4, types: 8, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 4, types: 7, coercions: 0, joins: 0/0}
 absurd :: forall a. (Int :~: Bool) -> a
 [GblId, Arity=1, Str=<L,U>b, Cpr=b, Unf=OtherCon []]
 absurd = \ (@a) (x :: Int :~: Bool) -> case x of { }
@@ -110,6 +110,3 @@ T2431.$tc'Refl
       $tc'Refl2
       1#
       $krep3
-
-
-


=====================================
testsuite/tests/deriving/should_compile/T14578.stderr
=====================================
@@ -9,40 +9,39 @@ Derived class instances:
     GHC.Base.sconcat ::
       GHC.Base.NonEmpty (T14578.Wat f g a) -> T14578.Wat f g a
     GHC.Base.stimes ::
-      forall (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (b :: GHC.Types.Type).
       GHC.Real.Integral b => b -> T14578.Wat f g a -> T14578.Wat f g a
     (GHC.Base.<>)
       = GHC.Prim.coerce
-          @(T14578.App (Data.Functor.Compose.Compose f g) a
-            -> T14578.App (Data.Functor.Compose.Compose f g) a
-               -> T14578.App (Data.Functor.Compose.Compose f g) a)
+          @(T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a
+            -> T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a
+               -> T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a)
           @(T14578.Wat f g a -> T14578.Wat f g a -> T14578.Wat f g a)
-          ((GHC.Base.<>) @(T14578.App (Data.Functor.Compose.Compose f g) a))
+          ((GHC.Base.<>)
+             @(T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a))
     GHC.Base.sconcat
       = GHC.Prim.coerce
-          @(GHC.Base.NonEmpty (T14578.App (Data.Functor.Compose.Compose f g) a)
-            -> T14578.App (Data.Functor.Compose.Compose f g) a)
+          @(GHC.Base.NonEmpty (T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a)
+            -> T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a)
           @(GHC.Base.NonEmpty (T14578.Wat f g a) -> T14578.Wat f g a)
           (GHC.Base.sconcat
-             @(T14578.App (Data.Functor.Compose.Compose f g) a))
+             @(T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a))
     GHC.Base.stimes
       = GHC.Prim.coerce
           @(b
-            -> T14578.App (Data.Functor.Compose.Compose f g) a
-               -> T14578.App (Data.Functor.Compose.Compose f g) a)
+            -> T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a
+               -> T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a)
           @(b -> T14578.Wat f g a -> T14578.Wat f g a)
           (GHC.Base.stimes
-             @(T14578.App (Data.Functor.Compose.Compose f g) a))
+             @(T14578.App (Data.Functor.Compose.Compose @GHC.Types.Type @GHC.Types.Type f g) a))
   
   instance GHC.Base.Functor f =>
            GHC.Base.Functor (T14578.App f) where
     GHC.Base.fmap ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type) (b :: GHC.Types.Type).
       (a -> b) -> T14578.App f a -> T14578.App f b
     (GHC.Base.<$) ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type) (b :: GHC.Types.Type).
       a -> T14578.App f b -> T14578.App f a
     GHC.Base.fmap
       = GHC.Prim.coerce
@@ -55,24 +54,20 @@ Derived class instances:
   
   instance GHC.Base.Applicative f =>
            GHC.Base.Applicative (T14578.App f) where
-    GHC.Base.pure ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep). a -> T14578.App f a
+    GHC.Base.pure :: forall (a :: GHC.Types.Type). a -> T14578.App f a
     (GHC.Base.<*>) ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type) (b :: GHC.Types.Type).
       T14578.App f (a -> b) -> T14578.App f a -> T14578.App f b
     GHC.Base.liftA2 ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep)
-             (c :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type)
+             (b :: GHC.Types.Type)
+             (c :: GHC.Types.Type).
       (a -> b -> c) -> T14578.App f a -> T14578.App f b -> T14578.App f c
     (GHC.Base.*>) ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type) (b :: GHC.Types.Type).
       T14578.App f a -> T14578.App f b -> T14578.App f b
     (GHC.Base.<*) ::
-      forall (a :: TYPE 'GHC.Types.LiftedRep)
-             (b :: TYPE 'GHC.Types.LiftedRep).
+      forall (a :: GHC.Types.Type) (b :: GHC.Types.Type).
       T14578.App f a -> T14578.App f b -> T14578.App f a
     GHC.Base.pure
       = GHC.Prim.coerce


=====================================
testsuite/tests/plugins/plugins09.stdout
=====================================
@@ -3,7 +3,6 @@ interfacePlugin: Prelude
 interfacePlugin: GHC.Float
 interfacePlugin: GHC.Base
 typeCheckPlugin (rn)
-interfacePlugin: GHC.Types
 typeCheckPlugin (tc)
 interfacePlugin: GHC.Integer.Type
 interfacePlugin: GHC.Natural


=====================================
testsuite/tests/plugins/plugins10.stdout
=====================================
@@ -6,7 +6,6 @@ interfacePlugin: GHC.Float
 interfacePlugin: GHC.Base
 interfacePlugin: Language.Haskell.TH.Syntax
 typeCheckPlugin (rn)
-interfacePlugin: GHC.Types
 typeCheckPlugin (tc)
 interfacePlugin: GHC.Integer.Type
 interfacePlugin: GHC.Natural


=====================================
testsuite/tests/plugins/plugins11.stdout
=====================================
@@ -3,7 +3,6 @@ interfacePlugin: Prelude
 interfacePlugin: GHC.Float
 interfacePlugin: GHC.Base
 typeCheckPlugin (rn)
-interfacePlugin: GHC.Types
 typeCheckPlugin (tc)
 interfacePlugin: GHC.Integer.Type
 interfacePlugin: GHC.Natural


=====================================
testsuite/tests/plugins/static-plugins.stdout
=====================================
@@ -5,11 +5,11 @@ interfacePlugin: GHC.Float
 interfacePlugin: GHC.Base
 interfacePlugin: System.IO
 typeCheckPlugin (rn)
-interfacePlugin: GHC.Prim
-interfacePlugin: GHC.Show
 interfacePlugin: GHC.Types
+interfacePlugin: GHC.Show
 interfacePlugin: GHC.TopHandler
 typeCheckPlugin (tc)
+interfacePlugin: GHC.Prim
 interfacePlugin: GHC.CString
 interfacePlugin: GHC.Integer.Type
 interfacePlugin: GHC.Natural


=====================================
testsuite/tests/printer/T18052a.stderr
=====================================
@@ -11,7 +11,7 @@ Dependent packages: [base-4.14.0.0, ghc-prim-0.6.1,
 
 ==================== Tidy Core ====================
 Result size of Tidy Core
-  = {terms: 18, types: 53, coercions: 0, joins: 0/0}
+  = {terms: 18, types: 46, coercions: 0, joins: 0/0}
 
 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
 T18052a.$b:||: :: forall {a} {b}. a -> b -> (a, b)
@@ -23,7 +23,7 @@ T18052a.$b:||: = GHC.Tuple.(,)
 [GblId]
 (+++) = (++)
 
--- RHS size: {terms: 13, types: 20, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 13, types: 18, coercions: 0, joins: 0/0}
 T18052a.$m:||:
   :: forall {rep :: GHC.Types.RuntimeRep} {r :: TYPE rep} {a} {b}.
      (a, b) -> (a -> b -> r) -> (GHC.Prim.Void# -> r) -> r


=====================================
testsuite/tests/simplCore/should_compile/T13143.stderr
=====================================
@@ -1,17 +1,17 @@
 
 ==================== Tidy Core ====================
 Result size of Tidy Core
-  = {terms: 71, types: 44, coercions: 0, joins: 0/0}
+  = {terms: 71, types: 40, coercions: 0, joins: 0/0}
 
 Rec {
--- RHS size: {terms: 4, types: 4, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 4, types: 3, coercions: 0, joins: 0/0}
 T13143.$wf [InlPrag=NOINLINE, Occ=LoopBreaker]
   :: forall {a}. GHC.Prim.Void# -> a
 [GblId, Arity=1, Str=<B,A>b, Cpr=b, Unf=OtherCon []]
 T13143.$wf = \ (@a) _ [Occ=Dead] -> T13143.$wf @a GHC.Prim.void#
 end Rec }
 
--- RHS size: {terms: 4, types: 4, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 4, types: 3, coercions: 0, joins: 0/0}
 f [InlPrag=NOUSERINLINE[0]] :: forall a. Int -> a
 [GblId,
  Arity=1,


=====================================
testsuite/tests/simplCore/should_compile/T18013.stderr
=====================================
@@ -129,9 +129,9 @@ Rule fired: Class op fmap (BUILTIN)
 
 ==================== Tidy Core ====================
 Result size of Tidy Core
-  = {terms: 52, types: 106, coercions: 15, joins: 0/1}
+  = {terms: 52, types: 101, coercions: 15, joins: 0/1}
 
--- RHS size: {terms: 37, types: 87, coercions: 15, joins: 0/1}
+-- RHS size: {terms: 37, types: 84, coercions: 15, joins: 0/1}
 mapMaybeRule
   :: forall a b. Rule IO a b -> Rule IO (Maybe a) (Maybe b)
 [GblId,


=====================================
testsuite/tests/simplCore/should_compile/T7360.stderr
=====================================
@@ -1,7 +1,7 @@
 
 ==================== Tidy Core ====================
 Result size of Tidy Core
-  = {terms: 106, types: 47, coercions: 0, joins: 0/0}
+  = {terms: 106, types: 45, coercions: 0, joins: 0/0}
 
 -- RHS size: {terms: 6, types: 3, coercions: 0, joins: 0/0}
 T7360.$WFoo3 [InlPrag=INLINE[0] CONLIKE] :: Int -> Foo
@@ -31,7 +31,7 @@ T7360.fun4 :: ()
          WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 20 0}]
 T7360.fun4 = fun1 T7360.Foo1
 
--- RHS size: {terms: 11, types: 8, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 11, types: 7, coercions: 0, joins: 0/0}
 fun2 :: forall {a}. [a] -> ((), Int)
 [GblId,
  Arity=1,


=====================================
testsuite/tests/typecheck/should_compile/T13032.stderr
=====================================
@@ -1,9 +1,9 @@
 
 ==================== Desugar (after optimization) ====================
 Result size of Desugar (after optimization)
-  = {terms: 13, types: 24, coercions: 0, joins: 0/0}
+  = {terms: 13, types: 18, coercions: 0, joins: 0/0}
 
--- RHS size: {terms: 6, types: 11, coercions: 0, joins: 0/0}
+-- RHS size: {terms: 6, types: 8, coercions: 0, joins: 0/0}
 f :: forall a b. (a ~ b) => a -> b -> Bool
 [LclIdX,
  Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a5a182b0117a9786d4c0f30280126570ee2fbea5...7951df0db45713b316de80b12509babaea73d9af

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/a5a182b0117a9786d4c0f30280126570ee2fbea5...7951df0db45713b316de80b12509babaea73d9af
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/20200529/59efc1bb/attachment-0001.html>


More information about the ghc-commits mailing list