[Git][ghc/ghc][wip/refactor-demand] 5 commits: More ppr

Sebastian Graf gitlab at gitlab.haskell.org
Tue Nov 3 18:32:26 UTC 2020



Sebastian Graf pushed to branch wip/refactor-demand at Glasgow Haskell Compiler / GHC


Commits:
5e5f9c5f by Sebastian Graf at 2020-11-03T13:09:35+01:00
More ppr

- - - - -
d13e36f3 by Sebastian Graf at 2020-11-03T15:27:45+01:00
trailing whitespace

- - - - -
c56373ec by Sebastian Graf at 2020-11-03T18:28:29+01:00
Accept testsuite changes

- - - - -
7bdef557 by Sebastian Graf at 2020-11-03T18:28:49+01:00
Fix strictness signatures of `prefetchValue*#` primops

Their strictness signatures said the primops are strict in their first
argument, which is wrong: Handing it a thunk will prefetch the pointer
to the thunk, but not evaluate it. Hence not strict.

The regression test `T8256` actually tests for laziness in the first
argument, so GHC apparently never exploited the strictness signature.

See also https://gitlab.haskell.org/ghc/ghc/-/issues/8256#note_310867,
where this came up.

- - - - -
faaba016 by Sebastian Graf at 2020-11-03T19:32:14+01:00
Fix isStrictDmd, rename it to isStrUsedDmd

- - - - -


24 changed files:

- compiler/GHC/Builtin/primops.txt.pp
- compiler/GHC/Core/Opt/CprAnal.hs
- compiler/GHC/Core/Opt/DmdAnal.hs
- compiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/Core/Opt/Simplify.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/WorkWrap/Utils.hs
- compiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/Types/Demand.hs
- compiler/GHC/Types/Id.hs
- compiler/GHC/Types/Id/Info.hs
- testsuite/tests/arityanal/should_compile/Arity01.stderr
- testsuite/tests/arityanal/should_compile/Arity02.stderr
- testsuite/tests/arityanal/should_compile/Arity03.stderr
- testsuite/tests/arityanal/should_compile/Arity04.stderr
- testsuite/tests/arityanal/should_compile/Arity05.stderr
- testsuite/tests/arityanal/should_compile/Arity09.stderr
- testsuite/tests/arityanal/should_compile/Arity11.stderr
- testsuite/tests/arityanal/should_compile/Arity14.stderr
- testsuite/tests/arityanal/should_compile/Arity16.stderr
- testsuite/tests/arityanal/should_compile/T18793.stderr
- testsuite/tests/stranal/should_compile/T13031.stdout
- testsuite/tests/stranal/should_compile/T18903.stderr
- testsuite/tests/stranal/should_compile/all.T


Changes:

=====================================
compiler/GHC/Builtin/primops.txt.pp
=====================================
@@ -3450,8 +3450,7 @@ primop PrefetchAddrOp3 "prefetchAddr3#" GenPrimOp
 
 primop PrefetchValueOp3 "prefetchValue3#" GenPrimOp
    a -> State# s -> State# s
-   with strictness  = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
-        has_side_effects =  True
+   with has_side_effects =  True
 ----
 
 primop PrefetchByteArrayOp2 "prefetchByteArray2#" GenPrimOp
@@ -3468,8 +3467,7 @@ primop PrefetchAddrOp2 "prefetchAddr2#" GenPrimOp
 
 primop PrefetchValueOp2 "prefetchValue2#" GenPrimOp
    a ->  State# s -> State# s
-   with strictness  = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
-        has_side_effects =  True
+   with has_side_effects =  True
 ----
 
 primop PrefetchByteArrayOp1 "prefetchByteArray1#" GenPrimOp
@@ -3486,8 +3484,7 @@ primop PrefetchAddrOp1 "prefetchAddr1#" GenPrimOp
 
 primop PrefetchValueOp1 "prefetchValue1#" GenPrimOp
    a -> State# s -> State# s
-   with strictness  = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
-        has_side_effects =  True
+   with has_side_effects =  True
 ----
 
 primop PrefetchByteArrayOp0 "prefetchByteArray0#" GenPrimOp
@@ -3504,8 +3501,7 @@ primop PrefetchAddrOp0 "prefetchAddr0#" GenPrimOp
 
 primop PrefetchValueOp0 "prefetchValue0#" GenPrimOp
    a -> State# s -> State# s
-   with strictness  = { \ _arity -> mkClosedStrictSig [botDmd, topDmd] topDiv }
-        has_side_effects =  True
+   with has_side_effects =  True
 
 ------------------------------------------------------------------------
 ---                                                                  ---


=====================================
compiler/GHC/Core/Opt/CprAnal.hs
=====================================
@@ -319,7 +319,7 @@ cprAnalBind top_lvl env id rhs
     -- See Note [CPR for thunks]
     stays_thunk = is_thunk && not_strict
     is_thunk    = not (exprIsHNF rhs) && not (isJoinId id)
-    not_strict  = not (isStrictDmd (idDemandInfo id))
+    not_strict  = not (isStrUsedDmd (idDemandInfo id))
     -- See Note [CPR for sum types]
     (_, ret_ty) = splitPiTys (idType id)
     not_a_prod  = isNothing (deepSplitProductType_maybe (ae_fam_envs env) ret_ty)


=====================================
compiler/GHC/Core/Opt/DmdAnal.hs
=====================================
@@ -550,7 +550,8 @@ dmdAnalRhsLetDown
 -- to the Id, and augment the environment with the signature as well.
 -- See Note [NOINLINE and strictness]
 dmdAnalRhsLetDown rec_flag env let_dmd id rhs
-  = (lazy_fv, sig, rhs')
+  = -- pprTrace "dmdAnalRhsLetDown" (ppr id $$ ppr let_dmd $$ ppr sig $$ ppr lazy_fv) $
+    (lazy_fv, sig, rhs')
   where
     rhs_arity = idArity id
     rhs_dmd -- See Note [Demand analysis for join points]


=====================================
compiler/GHC/Core/Opt/SetLevels.hs
=====================================
@@ -103,7 +103,7 @@ import GHC.Types.Unique.Set   ( nonDetStrictFoldUniqSet )
 import GHC.Types.Unique.DSet  ( getUniqDSet )
 import GHC.Types.Var.Env
 import GHC.Types.Literal      ( litIsTrivial )
-import GHC.Types.Demand       ( StrictSig, Demand, isStrictDmd, splitStrictSig, prependArgsStrictSig )
+import GHC.Types.Demand       ( StrictSig, Demand, isStrUsedDmd, splitStrictSig, prependArgsStrictSig )
 import GHC.Types.Cpr          ( mkCprSig, botCpr )
 import GHC.Types.Name         ( getOccName, mkSystemVarName )
 import GHC.Types.Name.Occurrence ( occNameString )
@@ -469,7 +469,7 @@ lvlApp env orig_expr ((_,AnnVar fn), args)
     lvl_arg :: [Demand] -> CoreExprWithFVs -> LvlM ([Demand], LevelledExpr)
     lvl_arg strs arg | (str1 : strs') <- strs
                      , is_val_arg arg
-                     = do { arg' <- lvlMFE env (isStrictDmd str1) arg
+                     = do { arg' <- lvlMFE env (isStrUsedDmd str1) arg
                           ; return (strs', arg') }
                      | otherwise
                      = do { arg' <- lvlMFE env False arg


=====================================
compiler/GHC/Core/Opt/Simplify.hs
=====================================
@@ -41,7 +41,7 @@ import GHC.Core.Opt.Monad ( Tick(..), SimplMode(..) )
 import GHC.Core
 import GHC.Builtin.Types.Prim( realWorldStatePrimTy )
 import GHC.Builtin.Names( runRWKey )
-import GHC.Types.Demand ( StrictSig(..), Demand, dmdTypeDepth, isStrictDmd
+import GHC.Types.Demand ( StrictSig(..), Demand, dmdTypeDepth, isStrUsedDmd
                         , mkClosedStrictSig, topDmd, seqDmd, botDiv )
 import GHC.Types.Cpr    ( mkCprSig, botCpr )
 import GHC.Core.Ppr     ( pprCoreExpr )
@@ -2481,7 +2481,7 @@ There have been various earlier versions of this patch:
 
     scrut_is_demanded_var :: CoreExpr -> Bool
     scrut_is_demanded_var (Cast s _) = scrut_is_demanded_var s
-    scrut_is_demanded_var (Var _)    = isStrictDmd (idDemandInfo case_bndr)
+    scrut_is_demanded_var (Var _)    = isStrUsedDmd (idDemandInfo case_bndr)
     scrut_is_demanded_var _          = False
 
   This only fired if the scrutinee was a /variable/, which seems
@@ -2709,7 +2709,7 @@ doCaseToLet scrut case_bndr
 
   | otherwise  -- Scrut has a lifted type
   = exprIsHNF scrut
-    || isStrictDmd (idDemandInfo case_bndr)
+    || isStrUsedDmd (idDemandInfo case_bndr)
     -- See Note [Case-to-let for strictly-used binders]
 
 --------------------------------------------------


=====================================
compiler/GHC/Core/Opt/Simplify/Utils.hs
=====================================
@@ -329,7 +329,7 @@ addCastTo ai co = ai { ai_args = CastBy co : ai_args ai }
 isStrictArgInfo :: ArgInfo -> Bool
 -- True if the function is strict in the next argument
 isStrictArgInfo (ArgInfo { ai_dmds = dmds })
-  | dmd:_ <- dmds = isStrictDmd dmd
+  | dmd:_ <- dmds = isStrUsedDmd dmd
   | otherwise     = False
 
 argInfoAppArgs :: [ArgSpec] -> [OutExpr]


=====================================
compiler/GHC/Core/Opt/WorkWrap/Utils.hs
=====================================
@@ -610,7 +610,7 @@ wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> Maybe ([Demand], DataCon
 wantToUnbox fam_envs has_inlineable_prag ty dmd =
   case deepSplitProductType_maybe fam_envs ty of
     Just dcac at DataConAppContext{ dcac_arg_tys = con_arg_tys }
-      | isStrictDmd dmd
+      | isStrUsedDmd dmd
       -- See Note [Unpacking arguments with product and polymorphic demands]
       , Just cs <- split_prod_dmd_arity dmd (length con_arg_tys)
       -- See Note [Do not unpack class dictionaries]


=====================================
compiler/GHC/CoreToStg/Prep.hs
=====================================
@@ -1359,7 +1359,7 @@ mkFloat dmd is_unlifted bndr rhs
                    -- See Note [Pin demand info on floats]
   where
     is_hnf    = exprIsHNF rhs
-    is_strict = isStrictDmd dmd
+    is_strict = isStrUsedDmd dmd
 
 emptyFloats :: Floats
 emptyFloats = Floats OkToSpec nilOL
@@ -1446,7 +1446,7 @@ canFloat (Floats ok_to_spec fs) rhs
 wantFloatNested :: RecFlag -> Demand -> Bool -> Floats -> CpeRhs -> Bool
 wantFloatNested is_rec dmd is_unlifted floats rhs
   =  isEmptyFloats floats
-  || isStrictDmd dmd
+  || isStrUsedDmd dmd
   || is_unlifted
   || (allLazyNested is_rec floats && exprIsHNF rhs)
         -- Why the test for allLazyNested?


=====================================
compiler/GHC/Types/Demand.hs
=====================================
@@ -19,7 +19,7 @@ module GHC.Types.Demand (
         plusCard, plusDmd, plusCleanDmd,
         multCard, multDmd, multCleanDmd,
         lazyApply1Dmd, lazyApply2Dmd, strictApply1Dmd,
-        isAbs, isUsedOnce, isStrict, isAbsDmd, isUsedOnceDmd, isStrictDmd,
+        isAbs, isUsedOnce, isStrict, isAbsDmd, isUsedOnceDmd, isStrUsedDmd,
         isTopDmd, isSeqDmd,
         strictenDmd,
         addCaseBndrDmd,
@@ -80,28 +80,6 @@ import GHC.Utils.Outputable
 import GHC.Utils.Panic
 
 {-
-************************************************************************
-*                                                                      *
-        Joint domain for Strictness and Absence
-*                                                                      *
-************************************************************************
--}
-
-{-
-************************************************************************
-*                                                                      *
-            Strictness domain
-*                                                                      *
-************************************************************************
-
-          Lazy
-           |
-        HeadStr
-        /     \
-    SCall      SProd
-        \     /
-        HyperStr
-
 Note [Exceptions and strictness]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 We used to smart about catching exceptions, but we aren't anymore.
@@ -173,24 +151,6 @@ See Note [Precise exceptions and strictness analysis].
 
 -}
 
-{-
-************************************************************************
-*                                                                      *
-            Absence domain
-*                                                                      *
-************************************************************************
-
-         Used
-         /   \
-     UCall   UProd
-         \   /
-         UHead
-          |
-  Count x -
-        |
-       Abs
--}
-
 addCaseBndrDmd :: Demand    -- On the case binder
                -> [Demand]  -- On the components of the constructor
                -> [Demand]  -- Final demands for the components of the constructor
@@ -285,28 +245,6 @@ Compare with: (C) making Used win for plus, but UProd win for lub
 *                                                                      *
 ************************************************************************
 
-This domain differst from JointDemand in the sense that pure absence
-is taken away, i.e., we deal *only* with non-absent demands.
-
-Note [Strict demands]
-~~~~~~~~~~~~~~~~~~~~~
-isStrictDmd returns true only of demands that are
-   both strict
-   and  used
-In particular, it is False for <HyperStr, Abs>, which can and does
-arise in, say (#7319)
-   f x = raise# <some exception>
-Then 'x' is not used, so f gets strictness <HyperStr,Abs> -> .
-Now the w/w generates
-   fx = let x <HyperStr,Abs> = absentError "unused"
-        in raise <some exception>
-At this point we really don't want to convert to
-   fx = case absentError "unused" of x -> raise <some exception>
-Since the program is going to diverge, this swaps one error for another,
-but it's really a bad idea to *ever* evaluate an absent argument.
-In #7319 we get
-   T7319.exe: Oops!  Entered absent arg w_s1Hd{v} [lid] [base:GHC.Base.String{tc 36u}]
-
 Note [Dealing with call demands]
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 Call demands are constructed and deconstructed coherently for
@@ -585,9 +523,9 @@ isTopDmd dmd = dmd == topDmd
 isAbsDmd :: Demand -> Bool
 isAbsDmd (n :* _) = isAbs n
 
-isStrictDmd :: Demand -> Bool
--- See Note [Strict demands]
-isStrictDmd (n :* _) = isStrict n
+-- | Not absent and used strictly. See Note [Strict demands]
+isStrUsedDmd :: Demand -> Bool
+isStrUsedDmd (n :* _) = isStrict n && not (isAbs n)
 
 isSeqDmd :: Demand -> Bool
 isSeqDmd (C_11 :* cd) = cd == seqCleanDmd
@@ -605,13 +543,32 @@ seqDemand (_ :* cd) = seqCleanDemand cd
 seqCleanDemand :: CleanDemand -> ()
 seqCleanDemand (Prod ds)   = seqDemandList ds
 seqCleanDemand (Call _ cd) = seqCleanDemand cd
-seqCleanDemand (Poly _)    = () 
+seqCleanDemand (Poly _)    = ()
 
 seqDemandList :: [Demand] -> ()
 seqDemandList = foldr (seq . seqDemand) ()
 
-{- Note [Call demands are relative]
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+{- Note [Strict demands]
+~~~~~~~~~~~~~~~~~~~~~~~~
+'isStrUsedDmd' returns true only of demands that are
+   both strict
+   and  used
+In particular, it is False for <B>, which can and does
+arise in, say (#7319)
+   f x = raise# <some exception>
+Then 'x' is not used, so f gets strictness <B> -> .
+Now the w/w generates
+   fx = let x <B> = absentError "unused"
+        in raise <some exception>
+At this point we really don't want to convert to
+   fx = case absentError "unused" of x -> raise <some exception>
+Since the program is going to diverge, this swaps one error for another,
+but it's really a bad idea to *ever* evaluate an absent argument.
+In #7319 we get
+   T7319.exe: Oops!  Entered absent arg w_s1Hd{v} [lid] [base:GHC.Base.String{tc 36u}]
+
+Note [Call demands are relative]
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 The expression @if b then 0 else f 1 2 + f 3 4@ uses @f@ according to the demand
 @UCU(CS(S(U)))@, meaning
 


=====================================
compiler/GHC/Types/Id.hs
=====================================
@@ -704,7 +704,7 @@ isStrictId id
          not (isJoinId id) && (
            (isStrictType (idType id)) ||
            -- Take the best of both strictnesses - old and new
-           (isStrictDmd (idDemandInfo id))
+           (isStrUsedDmd (idDemandInfo id))
          )
 
         ---------------------------------


=====================================
compiler/GHC/Types/Id/Info.hs
=====================================
@@ -636,7 +636,7 @@ zapLamInfo info@(IdInfo {occInfo = occ, demandInfo = demand})
                           -> occ { occ_tail   = NoTailCallInfo }
                  _other   -> occ
 
-    is_safe_dmd dmd = not (isStrictDmd dmd)
+    is_safe_dmd dmd = not (isStrUsedDmd dmd)
 
 -- | Remove all demand info on the 'IdInfo'
 zapDemandInfo :: IdInfo -> Maybe IdInfo


=====================================
testsuite/tests/arityanal/should_compile/Arity01.stderr
=====================================
@@ -10,7 +10,7 @@ F1.f2 = 1
 Rec {
 -- RHS size: {terms: 18, types: 4, coercions: 0, joins: 0/0}
 F1.f1_h1 [Occ=LoopBreaker] :: Integer -> Integer -> Integer -> Integer
-[GblId, Arity=3, Str=<S,U><S,U><S,U>, Unf=OtherCon []]
+[GblId, Arity=3, Str=<S*U><S*U><S*U>, Unf=OtherCon []]
 F1.f1_h1
   = \ (n :: Integer) (x :: Integer) (eta :: Integer) ->
       case GHC.Num.Integer.integerCompare x n of {
@@ -33,7 +33,7 @@ f1 = F1.f1_h1 F1.f3 F1.f2 F1.f3
 g :: Integer -> Integer -> Integer -> Integer -> Integer -> Integer
 [GblId,
  Arity=5,
- Str=<S,1*U><S,U><S,U><S,U><S,U>,
+ Str=<SU><S*U><S*U><S*U><S*U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=5,unsat_ok=True,boring_ok=False)
          Tmpl= \ (x1 [Occ=Once1] :: Integer) (x2 [Occ=Once1] :: Integer) (x3 [Occ=Once1] :: Integer) (x4 [Occ=Once1] :: Integer) (x5 [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd x1 x2) x3) x4) x5}]
 g = \ (x1 :: Integer) (x2 :: Integer) (x3 :: Integer) (x4 :: Integer) (x5 :: Integer) -> GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd x1 x2) x3) x4) x5
@@ -47,7 +47,7 @@ F1.s1 = 3
 s :: forall {t1} {t2}. Num t1 => (t1 -> t2) -> t2
 [GblId,
  Arity=2,
- Str=<L,1*U(A,A,A,A,A,A,1*C1(U))><C(S),1*C1(U)>,
+ Str=<1(A,A,A,A,A,A,1C1(U))><SCS(U)>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
          Tmpl= \ (@t) (@t1) ($dNum [Occ=Once1] :: Num t) (f [Occ=Once1!] :: t -> t1) -> f (fromInteger @t $dNum F1.s1)}]
 s = \ (@t) (@t1) ($dNum :: Num t) (f :: t -> t1) -> f (fromInteger @t $dNum F1.s1)
@@ -61,7 +61,7 @@ F1.h1 = 24
 h :: Integer -> Integer
 [GblId,
  Arity=1,
- Str=<S,U>,
+ Str=<S*U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (x5 [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd F1.h1 x5}]
 h = \ (x5 :: Integer) -> GHC.Num.Integer.integerAdd F1.h1 x5


=====================================
testsuite/tests/arityanal/should_compile/Arity02.stderr
=====================================
@@ -11,7 +11,7 @@ F2.f1 = 0
 f2f :: forall {t1} {t2}. (t1 -> Integer -> t2) -> t1 -> t2
 [GblId,
  Arity=2,
- Str=<C(C(S)),1*C1(C1(U))><L,U>,
+ Str=<SCS(CS(U))><U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)
          Tmpl= \ (@t) (@t1) (h [Occ=Once1!] :: t -> Integer -> t1) (x [Occ=Once1] :: t) -> h x F2.f1}]
 f2f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F2.f1
@@ -24,7 +24,7 @@ lvl = 1
 Rec {
 -- RHS size: {terms: 16, types: 3, coercions: 0, joins: 0/0}
 F2.f2_g [Occ=LoopBreaker] :: Integer -> Integer -> Integer
-[GblId, Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
+[GblId, Arity=2, Str=<S*U><S*U>, Unf=OtherCon []]
 F2.f2_g
   = \ (x :: Integer) (y :: Integer) ->
       case GHC.Num.Integer.integerCompare x F2.f1 of {


=====================================
testsuite/tests/arityanal/should_compile/Arity03.stderr
=====================================
@@ -4,8 +4,8 @@ Result size of Tidy Core = {terms: 29, types: 13, coercions: 0, joins: 0/0}
 
 Rec {
 -- RHS size: {terms: 15, types: 3, coercions: 0, joins: 0/0}
-F3.$wfac [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int#
-[GblId, Arity=1, Str=<S,1*U>, Unf=OtherCon []]
+F3.$wfac [InlPrag=[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int#
+[GblId, Arity=1, Str=<SU>, Unf=OtherCon []]
 F3.$wfac
   = \ (ww :: GHC.Prim.Int#) ->
       case ww of wild {
@@ -15,10 +15,10 @@ F3.$wfac
 end Rec }
 
 -- RHS size: {terms: 10, types: 4, coercions: 0, joins: 0/0}
-fac [InlPrag=NOUSERINLINE[2]] :: Int -> Int
+fac [InlPrag=[2]] :: Int -> Int
 [GblId,
  Arity=1,
- Str=<S(S),1*U(1*U)>,
+ Str=<S(SU)>,
  Cpr=m1,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (w [Occ=Once1!] :: Int) -> case w of { GHC.Types.I# ww1 [Occ=Once1] -> case F3.$wfac ww1 of ww2 [Occ=Once1] { __DEFAULT -> GHC.Types.I# ww2 } }}]
@@ -28,7 +28,7 @@ fac = \ (w :: Int) -> case w of { GHC.Types.I# ww1 -> case F3.$wfac ww1 of ww2 {
 f3 :: Int -> Int
 [GblId,
  Arity=1,
- Str=<S(S),1*U(1*U)>,
+ Str=<S(SU)>,
  Cpr=m1,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
          Tmpl= fac}]


=====================================
testsuite/tests/arityanal/should_compile/Arity04.stderr
=====================================
@@ -6,7 +6,7 @@ Result size of Tidy Core = {terms: 39, types: 24, coercions: 0, joins: 0/0}
 f4g :: Int -> Int
 [GblId,
  Arity=1,
- Str=<S,1*U(U)>,
+ Str=<S(U)>,
  Cpr=m1,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (y [Occ=Once1!] :: Int) -> case y of { GHC.Types.I# x [Occ=Once1] -> GHC.Types.I# (GHC.Prim.+# x 1#) }}]
@@ -19,8 +19,8 @@ lvl = GHC.Types.I# 0#
 
 Rec {
 -- RHS size: {terms: 13, types: 4, coercions: 0, joins: 0/0}
-F4.$wf4h [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: (Int -> Int) -> GHC.Prim.Int# -> Int
-[GblId, Arity=2, Str=<C(S),1*C1(U)><S,1*U>, Unf=OtherCon []]
+F4.$wf4h [InlPrag=[2], Occ=LoopBreaker] :: (Int -> Int) -> GHC.Prim.Int# -> Int
+[GblId, Arity=2, Str=<SCS(U)><SU>, Unf=OtherCon []]
 F4.$wf4h
   = \ (w :: Int -> Int) (ww :: GHC.Prim.Int#) ->
       case ww of wild {
@@ -30,10 +30,10 @@ F4.$wf4h
 end Rec }
 
 -- RHS size: {terms: 8, types: 5, coercions: 0, joins: 0/0}
-f4h [InlPrag=NOUSERINLINE[2]] :: (Int -> Int) -> Int -> Int
+f4h [InlPrag=[2]] :: (Int -> Int) -> Int -> Int
 [GblId,
  Arity=2,
- Str=<C(S),1*C1(U)><S(S),1*U(1*U)>,
+ Str=<SCS(U)><S(SU)>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
          Tmpl= \ (w [Occ=Once1] :: Int -> Int) (w1 [Occ=Once1!] :: Int) -> case w1 of { GHC.Types.I# ww1 [Occ=Once1] -> F4.$wf4h w ww1 }}]
 f4h = \ (w :: Int -> Int) (w1 :: Int) -> case w1 of { GHC.Types.I# ww1 -> F4.$wf4h w ww1 }


=====================================
testsuite/tests/arityanal/should_compile/Arity05.stderr
=====================================
@@ -11,21 +11,21 @@ F5.f5g1 = 1
 f5g :: forall {a} {t}. Num a => (t -> a) -> t -> a
 [GblId,
  Arity=3,
- Str=<S(C(C(S))LLLLLL),U(1*C1(C1(U)),A,A,A,A,A,1*C1(U))><L,1*C1(U)><L,U>,
+ Str=<S*(SCS(CS(U)),A,A,A,A,A,1C1(U))><1C1(U)><U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=False)
          Tmpl= \ (@a) (@t) ($dNum :: Num a) (h [Occ=Once1!] :: t -> a) (z [Occ=Once1] :: t) -> + @a $dNum (h z) (fromInteger @a $dNum F5.f5g1)}]
 f5g = \ (@a) (@t) ($dNum :: Num a) (h :: t -> a) (z :: t) -> + @a $dNum (h z) (fromInteger @a $dNum F5.f5g1)
 
 -- RHS size: {terms: 15, types: 14, coercions: 0, joins: 0/0}
-F5.$wf5h [InlPrag=NOUSERINLINE[2]] :: forall {a} {t}. (a -> a -> a) -> (Integer -> a) -> (t -> a) -> t -> (t -> a) -> a
-[GblId, Arity=5, Str=<C(C(S)),C(C1(U))><L,1*C1(U)><L,1*C1(U)><L,U><L,1*C1(U)>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 60 60 0 60] 120 0}]
+F5.$wf5h [InlPrag=[2]] :: forall {a} {t}. (a -> a -> a) -> (Integer -> a) -> (t -> a) -> t -> (t -> a) -> a
+[GblId, Arity=5, Str=<S*CS*(CS(U))><1C1(U)><1C1(U)><U><1C1(U)>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 60 60 0 60] 120 0}]
 F5.$wf5h = \ (@a) (@t) (ww :: a -> a -> a) (ww1 :: Integer -> a) (w :: t -> a) (w1 :: t) (w2 :: t -> a) -> ww (w w1) (ww (w2 w1) (ww1 F5.f5g1))
 
 -- RHS size: {terms: 15, types: 32, coercions: 0, joins: 0/0}
-f5h [InlPrag=NOUSERINLINE[2]] :: forall {a} {t}. Num a => (t -> a) -> t -> (t -> a) -> a
+f5h [InlPrag=[2]] :: forall {a} {t}. Num a => (t -> a) -> t -> (t -> a) -> a
 [GblId,
  Arity=4,
- Str=<S(C(C(S))LLLLLL),1*U(C(C1(U)),A,A,A,A,A,1*C1(U))><L,1*C1(U)><L,U><L,1*C1(U)>,
+ Str=<S(S*CS*(CS(U)),A,A,A,A,A,1C1(U))><1C1(U)><U><1C1(U)>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=4,unsat_ok=True,boring_ok=False)
          Tmpl= \ (@a) (@t) (w [Occ=Once1!] :: Num a) (w1 [Occ=Once1] :: t -> a) (w2 [Occ=Once1] :: t) (w3 [Occ=Once1] :: t -> a) -> case w of { GHC.Num.C:Num ww1 [Occ=Once1] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] ww7 [Occ=Once1] -> F5.$wf5h @a @t ww1 ww7 w1 w2 w3 }}]
 f5h = \ (@a) (@t) (w :: Num a) (w1 :: t -> a) (w2 :: t) (w3 :: t -> a) -> case w of { GHC.Num.C:Num ww1 ww2 ww3 ww4 ww5 ww6 ww7 -> F5.$wf5h @a @t ww1 ww7 w1 w2 w3 }
@@ -34,7 +34,7 @@ f5h = \ (@a) (@t) (w :: Num a) (w1 :: t -> a) (w2 :: t) (w3 :: t -> a) -> case w
 f5y :: Integer -> Integer
 [GblId,
  Arity=1,
- Str=<S,1*U>,
+ Str=<SU>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (y [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd y F5.f5g1}]
 f5y = \ (y :: Integer) -> GHC.Num.Integer.integerAdd y F5.f5g1


=====================================
testsuite/tests/arityanal/should_compile/Arity09.stderr
=====================================
@@ -20,7 +20,7 @@ F9.f1 = 10
 Rec {
 -- RHS size: {terms: 15, types: 2, coercions: 0, joins: 0/0}
 F9.f91_f [Occ=LoopBreaker] :: Integer -> Integer
-[GblId, Arity=1, Str=<S,U>, Unf=OtherCon []]
+[GblId, Arity=1, Str=<S*U>, Unf=OtherCon []]
 F9.f91_f
   = \ (n :: Integer) ->
       case GHC.Num.Integer.integerCompare n lvl of {


=====================================
testsuite/tests/arityanal/should_compile/Arity11.stderr
=====================================
@@ -20,7 +20,7 @@ F11.fib2 = 2
 Rec {
 -- RHS size: {terms: 24, types: 3, coercions: 0, joins: 0/0}
 F11.f11_fib [Occ=LoopBreaker] :: Integer -> Integer
-[GblId, Arity=1, Str=<S,U>, Unf=OtherCon []]
+[GblId, Arity=1, Str=<S*U>, Unf=OtherCon []]
 F11.f11_fib
   = \ (ds :: Integer) ->
       case GHC.Num.Integer.integerEq# ds F11.fib1 of {
@@ -34,8 +34,8 @@ F11.f11_fib
 end Rec }
 
 -- RHS size: {terms: 52, types: 28, coercions: 0, joins: 0/5}
-F11.$wfib [InlPrag=NOUSERINLINE[2]] :: forall {a} {p}. (a -> a -> Bool) -> (Num a, Num p) => a -> p
-[GblId, Arity=4, Str=<C(C(S)),C(C1(U))><L,U(A,C(C1(U)),A,A,A,A,C(U))><L,U(C(C1(U)),A,A,A,A,A,1*C1(U))><L,U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 150 60 0] 460 0}]
+F11.$wfib [InlPrag=[2]] :: forall {a} {p}. (a -> a -> Bool) -> (Num a, Num p) => a -> p
+[GblId, Arity=4, Str=<S*CS*(CS(U))><U(A,UCU(CS(U)),A,A,A,A,UCU(U))><U(UCU(CS(U)),A,A,A,A,A,1C1(U))><U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 150 60 0] 460 0}]
 F11.$wfib
   = \ (@a) (@p) (ww :: a -> a -> Bool) (w :: Num a) (w1 :: Num p) (w2 :: a) ->
       let {
@@ -56,7 +56,7 @@ F11.$wfib
         lvl3 = fromInteger @a w F11.fib1 } in
       letrec {
         fib4 [Occ=LoopBreaker] :: a -> p
-        [LclId, Arity=1, Str=<L,U>, Unf=OtherCon []]
+        [LclId, Arity=1, Str=<U>, Unf=OtherCon []]
         fib4
           = \ (ds :: a) ->
               case ww ds lvl3 of {
@@ -70,10 +70,10 @@ F11.$wfib
       fib4 w2
 
 -- RHS size: {terms: 14, types: 21, coercions: 0, joins: 0/0}
-fib [InlPrag=NOUSERINLINE[2]] :: forall {a} {p}. (Eq a, Num a, Num p) => a -> p
+fib [InlPrag=[2]] :: forall {a} {p}. (Eq a, Num a, Num p) => a -> p
 [GblId,
  Arity=4,
- Str=<S(C(C(S))L),1*U(C(C1(U)),A)><L,U(A,C(C1(U)),A,A,A,A,C(U))><L,U(C(C1(U)),A,A,A,A,A,C(U))><L,U>,
+ Str=<S(S*CS*(CS(U)),A)><U(A,UCU(CS(U)),A,A,A,A,UCU(U))><U(UCU(CS(U)),A,A,A,A,A,UCU(U))><U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=4,unsat_ok=True,boring_ok=False)
          Tmpl= \ (@a) (@p) (w [Occ=Once1!] :: Eq a) (w1 [Occ=Once1] :: Num a) (w2 [Occ=Once1] :: Num p) (w3 [Occ=Once1] :: a) -> case w of { GHC.Classes.C:Eq ww1 [Occ=Once1] _ [Occ=Dead] -> F11.$wfib @a @p ww1 w1 w2 w3 }}]
 fib = \ (@a) (@p) (w :: Eq a) (w1 :: Num a) (w2 :: Num p) (w3 :: a) -> case w of { GHC.Classes.C:Eq ww1 ww2 -> F11.$wfib @a @p ww1 w1 w2 w3 }
@@ -92,7 +92,7 @@ F11.f11_x = F11.f11_fib F11.f3
 F11.f11f1 :: Integer -> Integer
 [GblId,
  Arity=1,
- Str=<S,U>,
+ Str=<S*U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (y [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd F11.f11_x y}]
 F11.f11f1 = \ (y :: Integer) -> GHC.Num.Integer.integerAdd F11.f11_x y
@@ -101,7 +101,7 @@ F11.f11f1 = \ (y :: Integer) -> GHC.Num.Integer.integerAdd F11.f11_x y
 f11f :: forall {p}. p -> Integer -> Integer
 [GblId,
  Arity=2,
- Str=<L,A><S,U>,
+ Str=<A><S*U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
          Tmpl= \ (@p) _ [Occ=Dead] (eta [Occ=Once1] :: Integer) -> F11.f11f1 eta}]
 f11f = \ (@p) _ [Occ=Dead] -> F11.f11f1


=====================================
testsuite/tests/arityanal/should_compile/Arity14.stderr
=====================================
@@ -6,7 +6,7 @@ Result size of Tidy Core = {terms: 56, types: 87, coercions: 0, joins: 0/3}
 F14.f1 :: forall {t}. t -> t
 [GblId,
  Arity=1,
- Str=<S,1*U>,
+ Str=<SU>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
          Tmpl= \ (@t) (y [Occ=Once1] :: t) -> y}]
 F14.f1 = \ (@t) (y :: t) -> y
@@ -17,8 +17,8 @@ F14.f2 :: Integer
 F14.f2 = 1
 
 -- RHS size: {terms: 35, types: 24, coercions: 0, joins: 0/3}
-F14.$wf14 [InlPrag=NOUSERINLINE[2]] :: forall {t}. (t -> t -> Bool) -> Num t => t -> t -> t -> t
-[GblId, Arity=4, Str=<C(C(S)),C(C1(U))><L,U(C(C1(U)),A,A,A,A,A,1*C1(U))><L,U><L,U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 90 0 0] 300 0}]
+F14.$wf14 [InlPrag=[2]] :: forall {t}. (t -> t -> Bool) -> Num t => t -> t -> t -> t
+[GblId, Arity=4, Str=<S*CS*(CS(U))><U(UCU(CS(U)),A,A,A,A,A,1C1(U))><U><U>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 90 0 0] 300 0}]
 F14.$wf14
   = \ (@t) (ww :: t -> t -> Bool) (w :: Num t) (w1 :: t) (w2 :: t) ->
       let {
@@ -27,14 +27,14 @@ F14.$wf14
         lvl = fromInteger @t w F14.f2 } in
       letrec {
         f3 [Occ=LoopBreaker] :: t -> t -> t -> t
-        [LclId, Arity=2, Str=<L,U><L,U>, Unf=OtherCon []]
+        [LclId, Arity=2, Str=<U><U>, Unf=OtherCon []]
         f3
           = \ (n :: t) (x :: t) ->
               case ww x n of {
                 False -> F14.f1 @t;
                 True ->
                   let {
-                    v [Dmd=<L,C(U)>] :: t -> t
+                    v [Dmd=UCU(U)] :: t -> t
                     [LclId]
                     v = f3 n (+ @t w x lvl) } in
                   \ (y :: t) -> v (+ @t w x y)
@@ -42,10 +42,10 @@ F14.$wf14
       f3 w1 w2
 
 -- RHS size: {terms: 13, types: 34, coercions: 0, joins: 0/0}
-f14 [InlPrag=NOUSERINLINE[2]] :: forall {t}. (Ord t, Num t) => t -> t -> t -> t
+f14 [InlPrag=[2]] :: forall {t}. (Ord t, Num t) => t -> t -> t -> t
 [GblId,
  Arity=4,
- Str=<S(LLC(C(S))LLLLL),1*U(A,A,C(C1(U)),A,A,A,A,A)><L,U(C(C1(U)),A,A,A,A,A,C(U))><L,U><L,U>,
+ Str=<S(A,A,S*CS*(CS(U)),A,A,A,A,A)><U(UCU(CS(U)),A,A,A,A,A,UCU(U))><U><U>,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=4,unsat_ok=True,boring_ok=False)
          Tmpl= \ (@t) (w [Occ=Once1!] :: Ord t) (w1 [Occ=Once1] :: Num t) (w2 [Occ=Once1] :: t) (w3 [Occ=Once1] :: t) -> case w of { GHC.Classes.C:Ord _ [Occ=Dead] _ [Occ=Dead] ww3 [Occ=Once1] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> F14.$wf14 @t ww3 w1 w2 w3 }}]
 f14 = \ (@t) (w :: Ord t) (w1 :: Num t) (w2 :: t) (w3 :: t) -> case w of { GHC.Classes.C:Ord ww1 ww2 ww3 ww4 ww5 ww6 ww7 ww8 -> F14.$wf14 @t ww3 w1 w2 w3 }


=====================================
testsuite/tests/arityanal/should_compile/Arity16.stderr
=====================================
@@ -5,7 +5,7 @@ Result size of Tidy Core = {terms: 52, types: 87, coercions: 0, joins: 0/0}
 Rec {
 -- RHS size: {terms: 15, types: 17, coercions: 0, joins: 0/0}
 map2 [Occ=LoopBreaker] :: forall {t} {a}. (t -> a) -> [t] -> [a]
-[GblId, Arity=2, Str=<L,C(U)><S,1*U>, Unf=OtherCon []]
+[GblId, Arity=2, Str=<UCU(U)><SU>, Unf=OtherCon []]
 map2
   = \ (@t) (@a) (f :: t -> a) (ds :: [t]) ->
       case ds of {
@@ -27,7 +27,7 @@ lvl1 = \ (@a) -> Control.Exception.Base.patError @'GHC.Types.LiftedRep @[a] lvl
 Rec {
 -- RHS size: {terms: 29, types: 35, coercions: 0, joins: 0/0}
 zipWith2 [Occ=LoopBreaker] :: forall {t1} {t2} {a}. (t1 -> t2 -> a) -> [t1] -> [t2] -> [a]
-[GblId, Arity=3, Str=<L,C(C1(U))><S,1*U><S,1*U>, Unf=OtherCon []]
+[GblId, Arity=3, Str=<UCU(CS(U))><SU><SU>, Unf=OtherCon []]
 zipWith2
   = \ (@t) (@t1) (@a) (f :: t -> t1 -> a) (ds :: [t]) (ds1 :: [t1]) ->
       case ds of {


=====================================
testsuite/tests/arityanal/should_compile/T18793.stderr
=====================================
@@ -4,14 +4,14 @@ Result size of Tidy Core = {terms: 81, types: 74, coercions: 0, joins: 0/0}
 
 -- RHS size: {terms: 20, types: 13, coercions: 0, joins: 0/0}
 T18793.$wstuff [InlPrag=NOINLINE] :: Int -> (# Int, [Int] #)
-[GblId, Arity=1, Str=<L,U(U)>, Unf=OtherCon []]
+[GblId, Arity=1, Str=<U(U)>, Unf=OtherCon []]
 T18793.$wstuff = \ (w :: Int) -> (# w, GHC.Types.: @Int (case w of { GHC.Types.I# x -> GHC.Types.I# (GHC.Prim.+# x 1#) }) (GHC.Types.: @Int (case w of { GHC.Types.I# x -> GHC.Types.I# (GHC.Prim.+# x 2#) }) (GHC.Types.[] @Int)) #)
 
 -- RHS size: {terms: 8, types: 11, coercions: 0, joins: 0/0}
-stuff [InlPrag=NOUSERINLINE[final]] :: Int -> [Int]
+stuff [InlPrag=[final]] :: Int -> [Int]
 [GblId,
  Arity=1,
- Str=<L,U(U)>,
+ Str=<U(U)>,
  Cpr=m2,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
          Tmpl= \ (w [Occ=Once1] :: Int) -> case T18793.$wstuff w of { (# ww1 [Occ=Once1], ww2 [Occ=Once1] #) -> GHC.Types.: @Int ww1 ww2 }}]
@@ -19,8 +19,8 @@ stuff = \ (w :: Int) -> case T18793.$wstuff w of { (# ww1, ww2 #) -> GHC.Types.:
 
 Rec {
 -- RHS size: {terms: 23, types: 11, coercions: 0, joins: 0/0}
-T18793.$wgo1 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: [Int] -> GHC.Prim.Int# -> GHC.Prim.Int#
-[GblId, Arity=2, Str=<S,1*U><L,U>, Unf=OtherCon []]
+T18793.$wgo1 [InlPrag=[2], Occ=LoopBreaker] :: [Int] -> GHC.Prim.Int# -> GHC.Prim.Int#
+[GblId, Arity=2, Str=<SU><U>, Unf=OtherCon []]
 T18793.$wgo1
   = \ (w :: [Int]) (ww :: GHC.Prim.Int#) ->
       case w of {
@@ -36,10 +36,10 @@ T18793.$wgo1
 end Rec }
 
 -- RHS size: {terms: 12, types: 6, coercions: 0, joins: 0/0}
-T18793.f_go1 [InlPrag=NOUSERINLINE[2]] :: [Int] -> Int -> Int
+T18793.f_go1 [InlPrag=[2]] :: [Int] -> Int -> Int
 [GblId,
  Arity=2,
- Str=<S,1*U><S,1*U(U)>,
+ Str=<SU><S(U)>,
  Cpr=m1,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
          Tmpl= \ (w [Occ=Once1] :: [Int]) (w1 [Occ=Once1!] :: Int) -> case w1 of { GHC.Types.I# ww1 [Occ=Once1] -> case T18793.$wgo1 w ww1 of ww2 [Occ=Once1] { __DEFAULT -> GHC.Types.I# ww2 } }}]
@@ -59,7 +59,7 @@ T18793.f1 = case T18793.$wstuff T18793.f2 of { (# ww1, ww2 #) -> GHC.Types.: @In
 f :: Int -> Int
 [GblId,
  Arity=1,
- Str=<S,1*U(U)>,
+ Str=<S(U)>,
  Cpr=m1,
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=False)
          Tmpl= \ (eta [Occ=Once1] :: Int) -> T18793.f_go1 T18793.f1 eta}]


=====================================
testsuite/tests/stranal/should_compile/T13031.stdout
=====================================
@@ -1,2 +1,2 @@
 hello
-[GblId, Arity=3, Str=<L,U><L,U><L,U>b, Cpr=b, Unf=OtherCon []]
+[GblId, Arity=3, Str=<U><U><U>b, Cpr=b, Unf=OtherCon []]


=====================================
testsuite/tests/stranal/should_compile/T18903.stderr
=====================================
@@ -61,37 +61,35 @@ T18903.$wh [InlPrag=[2]] :: GHC.Prim.Int# -> Int
  Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
          WorkFree=True, Expandable=True, Guidance=IF_ARGS [70] 262 10}]
 T18903.$wh
-  = \ (ww_s11L :: GHC.Prim.Int#) ->
+  = \ (ww :: GHC.Prim.Int#) ->
       let {
-        $wg_s11H [InlPrag=NOINLINE, Dmd=1C1((1(U),S(U)))]
+        $wg [InlPrag=NOINLINE, Dmd=1C1((1(U),S(U)))]
           :: GHC.Prim.Int# -> (# Int, Int #)
         [LclId, Arity=1, Str=<SU>, Unf=OtherCon []]
-        $wg_s11H
-          = \ (ww1_s11C [OS=OneShot] :: GHC.Prim.Int#) ->
-              case ww1_s11C of ds_X3 {
+        $wg
+          = \ (ww1 [OS=OneShot] :: GHC.Prim.Int#) ->
+              case ww1 of ds {
                 __DEFAULT ->
-                  (# GHC.Types.I# (GHC.Prim.*# 2# ds_X3),
-                     case ds_X3 of {
+                  (# GHC.Types.I# (GHC.Prim.*# 2# ds),
+                     case ds of {
                        __DEFAULT ->
-                         case GHC.Classes.divInt# 2# ds_X3 of ww4_aZI { __DEFAULT ->
-                         GHC.Types.I# ww4_aZI
+                         case GHC.Classes.divInt# 2# ds of ww4 { __DEFAULT ->
+                         GHC.Types.I# ww4
                          };
                        -1# -> T18903.h2;
-                       0# -> case GHC.Real.divZeroError of wild1_00 { }
+                       0# -> case GHC.Real.divZeroError of wild1 { }
                      } #);
-                1# -> (# GHC.Types.I# ww_s11L, T18903.h1 #)
+                1# -> (# GHC.Types.I# ww, T18903.h1 #)
               } } in
-      case ww_s11L of ds_X2 {
+      case ww of ds {
         __DEFAULT ->
-          case $wg_s11H ds_X2 of { (# ww2_s11O, ww3_s11P #) ->
-          case ww2_s11O of { GHC.Types.I# x_aZS ->
-          case ww3_s11P of { GHC.Types.I# y_aZV ->
-          GHC.Types.I# (GHC.Prim.+# x_aZS y_aZV)
-          }
+          case $wg ds of { (# ww2, ww3 #) ->
+          case ww2 of { GHC.Types.I# x ->
+          case ww3 of { GHC.Types.I# y -> GHC.Types.I# (GHC.Prim.+# x y) }
           }
           };
         1# -> T18903.h1;
-        2# -> case $wg_s11H 2# of { (# ww2_s11O, ww3_s11P #) -> ww3_s11P }
+        2# -> case $wg 2# of { (# ww2, ww3 #) -> ww3 }
       }
 
 -- RHS size: {terms: 6, types: 3, coercions: 0, joins: 0/0}
@@ -102,12 +100,10 @@ h [InlPrag=[2]] :: Int -> Int
  Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
          WorkFree=True, Expandable=True,
          Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
-         Tmpl= \ (w_s11I [Occ=Once1!] :: Int) ->
-                 case w_s11I of { GHC.Types.I# ww1_s11L [Occ=Once1] ->
-                 T18903.$wh ww1_s11L
-                 }}]
-h = \ (w_s11I :: Int) ->
-      case w_s11I of { GHC.Types.I# ww1_s11L -> T18903.$wh ww1_s11L }
+         Tmpl= \ (w [Occ=Once1!] :: Int) ->
+                 case w of { GHC.Types.I# ww1 [Occ=Once1] -> T18903.$wh ww1 }}]
+h = \ (w :: Int) ->
+      case w of { GHC.Types.I# ww1 -> T18903.$wh ww1 }
 
 
 


=====================================
testsuite/tests/stranal/should_compile/all.T
=====================================
@@ -57,4 +57,4 @@ test('T13380b',  [ grep_errmsg('bigDeadAction') ], compile, ['-dppr-cols=200 -dd
 test('T18122',  [ grep_errmsg(r'wfoo =') ], compile, ['-ddump-simpl'])
 
 # We care about the call demand on $wg
-test('T18903',  [ grep_errmsg(r'Dmd=\S+C\S+') ], compile, ['-ddump-simpl'])
+test('T18903',  [ grep_errmsg(r'Dmd=\S+C\S+') ], compile, ['-ddump-simpl -dsuppress-uniques'])



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/901e38d7bf3bbe96dc252e05a2aa43a912f9f59c...faaba016b53494042748e04229f5cc3bf9281f7c

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/901e38d7bf3bbe96dc252e05a2aa43a912f9f59c...faaba016b53494042748e04229f5cc3bf9281f7c
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/20201103/c46cdae7/attachment-0001.html>


More information about the ghc-commits mailing list