diff options
-rw-r--r-- | compiler/GHC/Core/Op/CprAnal.hs | 86 | ||||
-rw-r--r-- | compiler/GHC/Core/Op/DmdAnal.hs | 27 | ||||
-rw-r--r-- | compiler/GHC/Core/Op/WorkWrap/Lib.hs | 100 | ||||
-rw-r--r-- | testsuite/tests/perf/should_run/all.T | 3 | ||||
-rw-r--r-- | testsuite/tests/simplCore/should_compile/T4201.stdout | 2 | ||||
-rw-r--r-- | testsuite/tests/stranal/T10482a.hs | 5 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_compile/T10482.stderr | 228 | ||||
-rw-r--r-- | testsuite/tests/stranal/should_compile/T10482a.stderr | 372 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr | 6 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/T17932.hs | 11 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/T17932.stderr | 30 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/UnsatFun.stderr | 8 | ||||
-rw-r--r-- | testsuite/tests/stranal/sigs/all.T | 1 |
13 files changed, 445 insertions, 434 deletions
diff --git a/compiler/GHC/Core/Op/CprAnal.hs b/compiler/GHC/Core/Op/CprAnal.hs index 8016c2c13d..022ce0b7f1 100644 --- a/compiler/GHC/Core/Op/CprAnal.hs +++ b/compiler/GHC/Core/Op/CprAnal.hs @@ -13,7 +13,6 @@ module GHC.Core.Op.CprAnal ( cprAnalProgram ) where import GhcPrelude -import GHC.Core.Op.WorkWrap.Lib ( deepSplitProductType_maybe ) import GHC.Driver.Session import GHC.Types.Demand import GHC.Types.Cpr @@ -30,6 +29,7 @@ import GHC.Core.Utils ( exprIsHNF, dumpIdInfoOfProgram ) import GHC.Core.TyCon import GHC.Core.Type import GHC.Core.FamInstEnv +import GHC.Core.Op.WorkWrap.Lib import Util import ErrUtils ( dumpIfSet_dyn, DumpFormat (..) ) import Maybes ( isJust, isNothing ) @@ -88,7 +88,8 @@ Ideally, we would want the following pipeline: 4. worker/wrapper (for CPR) Currently, we omit 2. and anticipate the results of worker/wrapper. -See Note [CPR in a DataAlt case alternative] and Note [CPR for strict binders]. +See Note [CPR in a DataAlt case alternative] +and Note [CPR for binders that will be unboxed]. An additional w/w pass would simplify things, but probably add slight overhead. So currently we have @@ -175,7 +176,7 @@ cprAnal' env (Lam var body) | otherwise = (lam_ty, Lam var body') where - env' = extendSigsWithLam env var + env' = extendAnalEnvForDemand env var (idDemandInfo var) (body_ty, body') = cprAnal env' body lam_ty = abstractCprTy body_ty @@ -392,15 +393,25 @@ lookupSigEnv env id = lookupVarEnv (ae_sigs env) id nonVirgin :: AnalEnv -> AnalEnv nonVirgin env = env { ae_virgin = False } -extendSigsWithLam :: AnalEnv -> Id -> AnalEnv --- Extend the AnalEnv when we meet a lambda binder -extendSigsWithLam env id +-- | A version of 'extendAnalEnv' for a binder of which we don't see the RHS +-- needed to compute a 'CprSig' (e.g. lambdas and DataAlt field binders). +-- In this case, we can still look at their demand to attach CPR signatures +-- anticipating the unboxing done by worker/wrapper. +-- See Note [CPR for binders that will be unboxed]. +extendAnalEnvForDemand :: AnalEnv -> Id -> Demand -> AnalEnv +extendAnalEnvForDemand env id dmd | isId id - , isStrictDmd (idDemandInfo id) -- See Note [CPR for strict binders] - , Just (dc,_,_,_) <- deepSplitProductType_maybe (ae_fam_envs env) $ idType id + , Just (_, DataConAppContext { dcac_dc = dc }) + <- wantToUnbox (ae_fam_envs env) has_inlineable_prag (idType id) dmd = extendAnalEnv env id (CprSig (conCprType (dataConTag dc))) | otherwise = env + where + -- Rather than maintaining in AnalEnv whether we are in an INLINEABLE + -- function, we just assume that we aren't. That flag is only relevant + -- to Note [Do not unpack class dictionaries], the few unboxing + -- opportunities on dicts it prohibits are probably irrelevant to CPR. + has_inlineable_prag = False extendEnvForDataAlt :: AnalEnv -> CoreExpr -> Id -> DataCon -> [Var] -> AnalEnv -- See Note [CPR in a DataAlt case alternative] @@ -425,18 +436,16 @@ extendEnvForDataAlt env scrut case_bndr dc bndrs -- propagate available unboxed things from the scrutinee, getting rid of -- the is_var_scrut heuristic. See Note [CPR in a DataAlt case alternative]. -- Giving strict binders the CPR property only makes sense for products, as - -- the arguments in Note [CPR for strict binders] don't apply to sums (yet); - -- we lack WW for strict binders of sum type. + -- the arguments in Note [CPR for binders that will be unboxed] don't apply + -- to sums (yet); we lack WW for strict binders of sum type. do_con_arg env (id, str) - | let is_strict = isStrictDmd (idDemandInfo id) || isMarkedStrict str - , is_var_scrut && is_strict - , let fam_envs = ae_fam_envs env - , Just (dc,_,_,_) <- deepSplitProductType_maybe fam_envs $ idType id - = extendAnalEnv env id (CprSig (conCprType (dataConTag dc))) + | is_var scrut + -- See Note [Add demands for strict constructors] in WorkWrap.Lib + , let dmd = applyWhen (isMarkedStrict str) strictifyDmd (idDemandInfo id) + = extendAnalEnvForDemand env id dmd | otherwise = env - is_var_scrut = is_var scrut is_var (Cast e _) = is_var e is_var (Var v) = isLocalId v is_var _ = False @@ -472,7 +481,8 @@ Specifically box. If the wrapper doesn't cancel with its caller, we'll end up re-boxing something that we did have available in boxed form. - * Any strict binders with product type, can use Note [CPR for strict binders] + * Any strict binders with product type, can use + Note [CPR for binders that will be unboxed] to anticipate worker/wrappering for strictness info. But we can go a little further. Consider @@ -499,11 +509,11 @@ Specifically sub-component thereof. But it's simple, and nothing terrible happens if we get it wrong. e.g. Trac #10694. -Note [CPR for strict binders] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -If a lambda-bound variable is marked demanded with a strict demand, then give it -a CPR signature, anticipating the results of worker/wrapper. Here's a concrete -example ('f1' in test T10482a), assuming h is strict: +Note [CPR for binders that will be unboxed] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +If a lambda-bound variable will be unboxed by worker/wrapper (so it must be +demanded strictly), then give it a CPR signature. Here's a concrete example +('f1' in test T10482a), assuming h is strict: f1 :: Int -> Int f1 x = case h x of @@ -527,6 +537,9 @@ Note that has product type, else we may get over-optimistic CPR results (e.g. from \x -> x!). + * This also (approximately) applies to DataAlt field binders; + See Note [CPR in a DataAlt case alternative]. + * See Note [CPR examples] Note [CPR for sum types] @@ -628,21 +641,6 @@ point: all of these functions can have the CPR property. True -> x False -> f1 (x-1) - - ------- f2 ----------- - -- x is a strict field of MkT2, so we'll pass it unboxed - -- to $wf2, so it's available unboxed. This depends on - -- the case expression analysing (a subcomponent of) one - -- of the original arguments to the function, so it's - -- a bit more delicate. - - data T2 = MkT2 !Int Int - - f2 :: T2 -> Int - f2 (MkT2 x y) | y>0 = f2 (MkT2 x (y-1)) - | otherwise = x - - ------- f3 ----------- -- h is strict in x, so x will be unboxed before it -- is rerturned in the otherwise case. @@ -652,18 +650,4 @@ point: all of these functions can have the CPR property. f1 :: T3 -> Int f1 (MkT3 x y) | h x y = f3 (MkT3 x (y-1)) | otherwise = x - - - ------- f4 ----------- - -- Just like f2, but MkT4 can't unbox its strict - -- argument automatically, as f2 can - - data family Foo a - newtype instance Foo Int = Foo Int - - data T4 a = MkT4 !(Foo a) Int - - f4 :: T4 Int -> Int - f4 (MkT4 x@(Foo v) y) | y>0 = f4 (MkT4 x (y-1)) - | otherwise = v -} diff --git a/compiler/GHC/Core/Op/DmdAnal.hs b/compiler/GHC/Core/Op/DmdAnal.hs index 88e96773ac..08d244a36a 100644 --- a/compiler/GHC/Core/Op/DmdAnal.hs +++ b/compiler/GHC/Core/Op/DmdAnal.hs @@ -617,16 +617,11 @@ dmdAnalRhsLetDown rec_flag env let_dmd id rhs is_thunk = not (exprIsHNF rhs) && not (isJoinId id) -- | @mkRhsDmd env rhs_arity rhs@ creates a 'CleanDemand' for --- unleashing on the given function's @rhs@, by creating a call demand of --- @rhs_arity@ with a body demand appropriate for possible product types. --- See Note [Product demands for function body]. --- For example, a call of the form @mkRhsDmd _ 2 (\x y -> (x, y))@ returns a --- clean usage demand of @C1(C1(U(U,U)))@. +-- unleashing on the given function's @rhs@, by creating +-- a call demand of @rhs_arity@ +-- See Historical Note [Product demands for function body] mkRhsDmd :: AnalEnv -> Arity -> CoreExpr -> CleanDemand -mkRhsDmd env rhs_arity rhs = - case peelTsFuns rhs_arity (findTypeShape (ae_fam_envs env) (exprType rhs)) of - Just (TsProd tss) -> mkCallDmds rhs_arity (cleanEvalProdDmd (length tss)) - _ -> mkCallDmds rhs_arity cleanEvalDmd +mkRhsDmd _env rhs_arity _rhs = mkCallDmds rhs_arity cleanEvalDmd -- | If given the let-bound 'Id', 'useLetUp' determines whether we should -- process the binding up (body before rhs) or down (rhs before body). @@ -857,9 +852,9 @@ forward plusInt's demand signature, and all is well (see Note [Newtype arity] in GHC.Core.Arity)! A small example is the test case NewtypeArity. -Note [Product demands for function body] -~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -This example comes from shootout/binary_trees: +Historical Note [Product demands for function body] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +In 2013 I spotted this example, in shootout/binary_trees: Main.check' = \ b z ds. case z of z' { I# ip -> case ds_d13s of @@ -878,8 +873,12 @@ Here we *really* want to unbox z, even though it appears to be used boxed in the Nil case. Partly the Nil case is not a hot path. But more specifically, the whole function gets the CPR property if we do. -So for the demand on the body of a RHS we use a product demand if it's -a product type. +That motivated using a demand of C(C(C(S(L,L)))) for the RHS, where +(solely because the result was a product) we used a product demand +(albeit with lazy components) for the body. But that gives very silly +behaviour -- see #17932. Happily it turns out now to be entirely +unnecessary: we get good results with C(C(C(S))). So I simply +deleted the special case. ************************************************************************ * * diff --git a/compiler/GHC/Core/Op/WorkWrap/Lib.hs b/compiler/GHC/Core/Op/WorkWrap/Lib.hs index 6245bb9099..684c807d07 100644 --- a/compiler/GHC/Core/Op/WorkWrap/Lib.hs +++ b/compiler/GHC/Core/Op/WorkWrap/Lib.hs @@ -8,7 +8,8 @@ A library for the ``worker\/wrapper'' back-end to the strictness analyser module GHC.Core.Op.WorkWrap.Lib ( mkWwBodies, mkWWstr, mkWorkerArgs - , deepSplitProductType_maybe, findTypeShape + , DataConAppContext(..), deepSplitProductType_maybe, wantToUnbox + , findTypeShape , isWorkerSmallEnough ) where @@ -588,21 +589,8 @@ mkWWstr_one dflags fam_envs has_inlineable_prag arg -- (that's what mk_absent_let does) = return (True, [], nop_fn, work_fn) - | isStrictDmd dmd - , Just cs <- splitProdDmd_maybe dmd - -- See Note [Unpacking arguments with product and polymorphic demands] - , not (has_inlineable_prag && isClassPred arg_ty) - -- See Note [Do not unpack class dictionaries] - , Just stuff@(_, _, inst_con_arg_tys, _) <- deepSplitProductType_maybe fam_envs arg_ty - , cs `equalLength` inst_con_arg_tys - -- See Note [mkWWstr and unsafeCoerce] - = unbox_one dflags fam_envs arg cs stuff - - | isSeqDmd dmd -- For seqDmd, splitProdDmd_maybe will return Nothing, but - -- it should behave like <S, U(AAAA)>, for some suitable arity - , Just stuff@(_, _, inst_con_arg_tys, _) <- deepSplitProductType_maybe fam_envs arg_ty - , let abs_dmds = map (const absDmd) inst_con_arg_tys - = unbox_one dflags fam_envs arg abs_dmds stuff + | Just (cs, acdc) <- wantToUnbox fam_envs has_inlineable_prag arg_ty dmd + = unbox_one dflags fam_envs arg cs acdc | otherwise -- Other cases = return (False, [arg], nop_fn, nop_fn) @@ -611,12 +599,36 @@ mkWWstr_one dflags fam_envs has_inlineable_prag arg arg_ty = idType arg dmd = idDemandInfo arg +wantToUnbox :: FamInstEnvs -> Bool -> Type -> Demand -> Maybe ([Demand], DataConAppContext) +wantToUnbox fam_envs has_inlineable_prag ty dmd = + case deepSplitProductType_maybe fam_envs ty of + Just dcac@DataConAppContext{ dcac_arg_tys = con_arg_tys } + | isStrictDmd 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] + , not (has_inlineable_prag && isClassPred ty) + -- See Note [mkWWstr and unsafeCoerce] + , cs `equalLength` con_arg_tys + -> Just (cs, dcac) + _ -> Nothing + where + split_prod_dmd_arity dmd arty + -- For seqDmd, splitProdDmd_maybe will return Nothing (because how would + -- it know the arity?), but it should behave like <S, U(AAAA)>, for some + -- suitable arity + | isSeqDmd dmd = Just (replicate arty absDmd) + -- Otherwise splitProdDmd_maybe does the job + | otherwise = splitProdDmd_maybe dmd + unbox_one :: DynFlags -> FamInstEnvs -> Var -> [Demand] - -> (DataCon, [Type], [(Type, StrictnessMark)], Coercion) + -> DataConAppContext -> UniqSM (Bool, [Var], CoreExpr -> CoreExpr, CoreExpr -> CoreExpr) unbox_one dflags fam_envs arg cs - (data_con, inst_tys, inst_con_arg_tys, co) + DataConAppContext { dcac_dc = data_con, dcac_tys = inst_tys + , dcac_arg_tys = inst_con_arg_tys + , dcac_co = co } = do { (uniq1:uniqs) <- getUniquesM ; let -- See Note [Add demands for strict constructors] cs' = addDataConStrictness data_con cs @@ -898,8 +910,8 @@ If we have f :: Ord a => [a] -> Int -> a {-# INLINABLE f #-} and we worker/wrapper f, we'll get a worker with an INLINABLE pragma -(see Note [Worker-wrapper for INLINABLE functions] in GHC.Core.Op.WorkWrap), which -can still be specialised by the type-class specialiser, something like +(see Note [Worker-wrapper for INLINABLE functions] in GHC.Core.Op.WorkWrap), +which can still be specialised by the type-class specialiser, something like fw :: Ord a => [a] -> Int# -> a BUT if f is strict in the Ord dictionary, we might unpack it, to get @@ -915,9 +927,29 @@ Historical note: #14955 describes how I got this fix wrong the first time. -} -deepSplitProductType_maybe - :: FamInstEnvs -> Type - -> Maybe (DataCon, [Type], [(Type, StrictnessMark)], Coercion) +-- | Context for a 'DataCon' application with a hole for every field, including +-- surrounding coercions. +-- The result of 'deepSplitProductType_maybe' and 'deepSplitCprType_maybe'. +-- +-- Example: +-- +-- > DataConAppContext Just [Int] [(Lazy, Int)] (co :: Maybe Int ~ First Int) +-- +-- represents +-- +-- > Just @Int (_1 :: Int) |> co :: First Int +-- +-- where _1 is a hole for the first argument. The number of arguments is +-- determined by the length of @arg_tys@. +data DataConAppContext + = DataConAppContext + { dcac_dc :: !DataCon + , dcac_tys :: ![Type] + , dcac_arg_tys :: ![(Type, StrictnessMark)] + , dcac_co :: !Coercion + } + +deepSplitProductType_maybe :: FamInstEnvs -> Type -> Maybe DataConAppContext -- If deepSplitProductType_maybe ty = Just (dc, tys, arg_tys, co) -- then dc @ tys (args::arg_tys) :: rep_ty -- co :: ty ~ rep_ty @@ -930,12 +962,14 @@ deepSplitProductType_maybe fam_envs ty , Just con <- isDataProductTyCon_maybe tc , let arg_tys = dataConInstArgTys con tc_args strict_marks = dataConRepStrictness con - = Just (con, tc_args, zipEqual "dspt" arg_tys strict_marks, co) + = Just DataConAppContext { dcac_dc = con + , dcac_tys = tc_args + , dcac_arg_tys = zipEqual "dspt" arg_tys strict_marks + , dcac_co = co } deepSplitProductType_maybe _ _ = Nothing deepSplitCprType_maybe - :: FamInstEnvs -> ConTag -> Type - -> Maybe (DataCon, [Type], [(Type, StrictnessMark)], Coercion) + :: FamInstEnvs -> ConTag -> Type -> Maybe DataConAppContext -- If deepSplitCprType_maybe n ty = Just (dc, tys, arg_tys, co) -- then dc @ tys (args::arg_tys) :: rep_ty -- co :: ty ~ rep_ty @@ -952,7 +986,10 @@ deepSplitCprType_maybe fam_envs con_tag ty , let con = cons `getNth` (con_tag - fIRST_TAG) arg_tys = dataConInstArgTys con tc_args strict_marks = dataConRepStrictness con - = Just (con, tc_args, zipEqual "dsct" arg_tys strict_marks, co) + = Just DataConAppContext { dcac_dc = con + , dcac_tys = tc_args + , dcac_arg_tys = zipEqual "dspt" arg_tys strict_marks + , dcac_co = co } deepSplitCprType_maybe _ _ _ = Nothing findTypeShape :: FamInstEnvs -> Type -> TypeShape @@ -1009,17 +1046,18 @@ mkWWcpr opt_CprAnal fam_envs body_ty cpr | otherwise = case asConCpr cpr of Nothing -> return (False, id, id, body_ty) -- No CPR info - Just con_tag | Just stuff <- deepSplitCprType_maybe fam_envs con_tag body_ty - -> mkWWcpr_help stuff + Just con_tag | Just dcac <- deepSplitCprType_maybe fam_envs con_tag body_ty + -> mkWWcpr_help dcac | otherwise -- See Note [non-algebraic or open body type warning] -> WARN( True, text "mkWWcpr: non-algebraic or open body type" <+> ppr body_ty ) return (False, id, id, body_ty) -mkWWcpr_help :: (DataCon, [Type], [(Type,StrictnessMark)], Coercion) +mkWWcpr_help :: DataConAppContext -> UniqSM (Bool, CoreExpr -> CoreExpr, CoreExpr -> CoreExpr, Type) -mkWWcpr_help (data_con, inst_tys, arg_tys, co) +mkWWcpr_help (DataConAppContext { dcac_dc = data_con, dcac_tys = inst_tys + , dcac_arg_tys = arg_tys, dcac_co = co }) | [arg1@(arg_ty1, _)] <- arg_tys , isUnliftedType arg_ty1 -- Special case when there is a single result of unlifted type diff --git a/testsuite/tests/perf/should_run/all.T b/testsuite/tests/perf/should_run/all.T index 70bd0fa48c..50bd6b8449 100644 --- a/testsuite/tests/perf/should_run/all.T +++ b/testsuite/tests/perf/should_run/all.T @@ -233,7 +233,8 @@ test('T5949', ['-O']) test('T4267', - [collect_stats('bytes allocated',10), + [expect_broken(4267), + collect_stats('bytes allocated',10), only_ways(['normal'])], compile_and_run, ['-O']) diff --git a/testsuite/tests/simplCore/should_compile/T4201.stdout b/testsuite/tests/simplCore/should_compile/T4201.stdout index e12c9f1584..9d13fc2b4d 100644 --- a/testsuite/tests/simplCore/should_compile/T4201.stdout +++ b/testsuite/tests/simplCore/should_compile/T4201.stdout @@ -1,3 +1,3 @@ - [HasNoCafRefs, Arity: 1, Strictness: <S,1*H>, CPR: m1, + [HasNoCafRefs, Arity: 1, Strictness: <S,1*U>, Unfolding: InlineRule (0, True, True) bof `cast` (Sym (N:Foo[0]) ->_R <T>_R)] diff --git a/testsuite/tests/stranal/T10482a.hs b/testsuite/tests/stranal/T10482a.hs index 3547ebd35e..76f134f3e6 100644 --- a/testsuite/tests/stranal/T10482a.hs +++ b/testsuite/tests/stranal/T10482a.hs @@ -22,6 +22,9 @@ f1 x = case h x x of ------- f2 ----------- +-- We used to unbox x here and rebox it in the wrapper. After #17932, we don't. +-- After #17932, we don't. +-- Historical comment: -- x is a strict field of MkT2, so we'll pass it unboxed -- to $wf2, so it's available unboxed. This depends on -- the case expression analysing (a subcomponent of) one @@ -48,6 +51,8 @@ f1 (MkT3 x y) | h x y = f3 (MkT3 x (y-1)) ------- f4 ----------- +-- We used to unbox x here and rebox it in the wrapper. After #17932, we don't. +-- Historical comment: -- Just like f2, but MkT4 can't unbox its strict -- argument automatically, as f2 can diff --git a/testsuite/tests/stranal/should_compile/T10482.stderr b/testsuite/tests/stranal/should_compile/T10482.stderr index 47e8e102c4..af81b81bab 100644 --- a/testsuite/tests/stranal/should_compile/T10482.stderr +++ b/testsuite/tests/stranal/should_compile/T10482.stderr @@ -1,261 +1,243 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 171, types: 116, coercions: 15, joins: 0/0} +Result size of Tidy Core = {terms: 167, types: 116, coercions: 15, joins: 0/0} -- RHS size: {terms: 13, types: 14, coercions: 4, joins: 0/0} -T10482.$WFooPair [InlPrag=INLINE[2]] :: forall a b. Foo a -> Foo b -> Foo (a, b) +T10482.$WFooPair [InlPrag=INLINE[0]] :: forall a b. Foo a -> Foo b -> Foo (a, b) [GblId[DataConWrapper], Arity=2, Caf=NoCafRefs, - Str=<S,U><S,U>m, + Str=<S,U><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= \ (@ a_aX9) (@ b_aXa) (dt_a2pg [Occ=Once] :: Foo a_aX9[sk:2]) (dt_a2ph [Occ=Once] :: Foo b_aXa[sk:2]) -> - (case dt_a2pg of dt_X2pl { __DEFAULT -> case dt_a2ph of dt_X2pn { __DEFAULT -> T10482.FooPair @ a_aX9 @ b_aXa dt_X2pl dt_X2pn } }) - `cast` (Sym (T10482.D:R:Foo(,)0[0] <a_aX9>_N <b_aXa>_N) :: (T10482.R:Foo(,) a_aX9 b_aXa :: *) ~R# (Foo (a_aX9, b_aXa) :: *))}] + Tmpl= \ (@a_atL) (@b_atM) (dt_a1r7 [Occ=Once] :: Foo a_atL) (dt_a1r8 [Occ=Once] :: Foo b_atM) -> + (case dt_a1r7 of dt_X0 [Occ=Once] { __DEFAULT -> + case dt_a1r8 of dt_X1 [Occ=Once] { __DEFAULT -> T10482.FooPair @a_atL @b_atM dt_X0 dt_X1 } + }) + `cast` (Sym (T10482.D:R:Foo(,)0[0] <a_atL>_N <b_atM>_N) :: T10482.R:Foo(,) a_atL b_atM ~R# Foo (a_atL, b_atM))}] T10482.$WFooPair - = \ (@ a_aX9) (@ b_aXa) (dt_a2pg [Occ=Once] :: Foo a_aX9[sk:2]) (dt_a2ph [Occ=Once] :: Foo b_aXa[sk:2]) -> - (case dt_a2pg of dt_X2pl { __DEFAULT -> case dt_a2ph of dt_X2pn { __DEFAULT -> T10482.FooPair @ a_aX9 @ b_aXa dt_X2pl dt_X2pn } }) - `cast` (Sym (T10482.D:R:Foo(,)0[0] <a_aX9>_N <b_aXa>_N) :: (T10482.R:Foo(,) a_aX9 b_aXa :: *) ~R# (Foo (a_aX9, b_aXa) :: *)) + = \ (@a_atL) (@b_atM) (dt_a1r7 [Occ=Once] :: Foo a_atL) (dt_a1r8 [Occ=Once] :: Foo b_atM) -> + (case dt_a1r7 of dt_X0 [Occ=Once] { __DEFAULT -> + case dt_a1r8 of dt_X1 [Occ=Once] { __DEFAULT -> T10482.FooPair @a_atL @b_atM dt_X0 dt_X1 } + }) + `cast` (Sym (T10482.D:R:Foo(,)0[0] <a_atL>_N <b_atM>_N) :: T10482.R:Foo(,) a_atL b_atM ~R# Foo (a_atL, b_atM)) -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} T10482.$trModule4 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] T10482.$trModule4 = "main"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T10482.$trModule3 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] T10482.$trModule3 = GHC.Types.TrNameS T10482.$trModule4 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} T10482.$trModule2 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] T10482.$trModule2 = "T10482"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T10482.$trModule1 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] T10482.$trModule1 = GHC.Types.TrNameS T10482.$trModule2 -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} T10482.$trModule :: GHC.Types.Module [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] T10482.$trModule = GHC.Types.Module T10482.$trModule3 T10482.$trModule1 -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} -$krep_r2Q4 :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep_r2Q4 = GHC.Types.KindRepTyConApp GHC.Types.$tcInt (GHC.Types.[] @ GHC.Types.KindRep) +$krep_r1Gw :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep_r1Gw = GHC.Types.KindRepTyConApp GHC.Types.$tcInt (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} -$krep1_r2Q5 :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep1_r2Q5 = GHC.Types.KindRepVar 1# +$krep1_r1Gx :: GHC.Types.KindRep +[GblId, Cpr=m2, Unf=OtherCon []] +$krep1_r1Gx = GHC.Types.KindRepVar 1# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} -$krep2_r2Q6 :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep2_r2Q6 = GHC.Types.KindRepVar 0# +$krep2_r1Gy :: GHC.Types.KindRep +[GblId, Cpr=m2, Unf=OtherCon []] +$krep2_r1Gy = GHC.Types.KindRepVar 0# -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep3_r2Q7 :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep3_r2Q7 = GHC.Types.: @ GHC.Types.KindRep $krep1_r2Q5 (GHC.Types.[] @ GHC.Types.KindRep) +$krep3_r1Gz :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep3_r1Gz = GHC.Types.: @GHC.Types.KindRep $krep1_r1Gx (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} -$krep4_r2Q8 :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep4_r2Q8 = GHC.Types.: @ GHC.Types.KindRep $krep2_r2Q6 $krep3_r2Q7 +$krep4_r1GA :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep4_r1GA = GHC.Types.: @GHC.Types.KindRep $krep2_r1Gy $krep3_r1Gz -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep5_r2Q9 :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep5_r2Q9 = GHC.Types.KindRepTyConApp GHC.Tuple.$tc(,) $krep4_r2Q8 +$krep5_r1GB :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep5_r1GB = GHC.Types.KindRepTyConApp GHC.Tuple.$tc(,) $krep4_r1GA -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} T10482.$tcFoo2 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] T10482.$tcFoo2 = "Foo"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T10482.$tcFoo1 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] T10482.$tcFoo1 = GHC.Types.TrNameS T10482.$tcFoo2 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} T10482.$tcFoo :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] T10482.$tcFoo = GHC.Types.TyCon 3311038889639791302## 7944995683507700778## T10482.$trModule T10482.$tcFoo1 0# GHC.Types.krep$*Arr* -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep6_r2Qa :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep6_r2Qa = GHC.Types.: @ GHC.Types.KindRep $krep2_r2Q6 (GHC.Types.[] @ GHC.Types.KindRep) +$krep6_r1GC :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep6_r1GC = GHC.Types.: @GHC.Types.KindRep $krep2_r1Gy (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep7_r2Qb :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep7_r2Qb = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep6_r2Qa +$krep7_r1GD :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep7_r1GD = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep6_r1GC -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep8_r2Qc :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep8_r2Qc = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep3_r2Q7 +$krep8_r1GE :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep8_r1GE = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep3_r1Gz -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep9_r2Qd :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep9_r2Qd = GHC.Types.: @ GHC.Types.KindRep $krep5_r2Q9 (GHC.Types.[] @ GHC.Types.KindRep) +$krep9_r1GF :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep9_r1GF = GHC.Types.: @GHC.Types.KindRep $krep5_r1GB (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep10_r2Qe :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep10_r2Qe = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep9_r2Qd +$krep10_r1GG :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep10_r1GG = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep9_r1GF -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep11_r2Qf :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -$krep11_r2Qf = GHC.Types.KindRepFun $krep8_r2Qc $krep10_r2Qe +$krep11_r1GH :: GHC.Types.KindRep +[GblId, Cpr=m4, Unf=OtherCon []] +$krep11_r1GH = GHC.Types.KindRepFun $krep8_r1GE $krep10_r1GG -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} T10482.$tc'FooPair1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -T10482.$tc'FooPair1 = GHC.Types.KindRepFun $krep7_r2Qb $krep11_r2Qf +[GblId, Cpr=m4, Unf=OtherCon []] +T10482.$tc'FooPair1 = GHC.Types.KindRepFun $krep7_r1GD $krep11_r1GH -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep12_r2Qg :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep12_r2Qg = GHC.Types.: @ GHC.Types.KindRep $krep_r2Q4 (GHC.Types.[] @ GHC.Types.KindRep) +$krep12_r1GI :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep12_r1GI = GHC.Types.: @GHC.Types.KindRep $krep_r1Gw (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep13_r2Qh :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep13_r2Qh = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep12_r2Qg +$krep13_r1GJ :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep13_r1GJ = GHC.Types.KindRepTyConApp T10482.$tcFoo $krep12_r1GI -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} T10482.$tc'Foo1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -T10482.$tc'Foo1 = GHC.Types.KindRepFun $krep_r2Q4 $krep13_r2Qh +[GblId, Cpr=m4, Unf=OtherCon []] +T10482.$tc'Foo1 = GHC.Types.KindRepFun $krep_r1Gw $krep13_r1GJ -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} T10482.$tc'FooPair3 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] T10482.$tc'FooPair3 = "'FooPair"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T10482.$tc'FooPair2 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] T10482.$tc'FooPair2 = GHC.Types.TrNameS T10482.$tc'FooPair3 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} T10482.$tc'FooPair :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] T10482.$tc'FooPair = GHC.Types.TyCon 5329411373903054066## 1455261321638291317## T10482.$trModule T10482.$tc'FooPair2 2# T10482.$tc'FooPair1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} T10482.$tc'Foo3 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] T10482.$tc'Foo3 = "'Foo"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T10482.$tc'Foo2 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] T10482.$tc'Foo2 = GHC.Types.TrNameS T10482.$tc'Foo3 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} T10482.$tc'Foo :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] T10482.$tc'Foo = GHC.Types.TyCon 5096937192618987042## 15136671864408054946## T10482.$trModule T10482.$tc'Foo2 0# T10482.$tc'Foo1 +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl_r1GK :: Int +[GblId, Cpr=m1, Unf=OtherCon []] +lvl_r1GK = GHC.Types.I# 0# + Rec { --- RHS size: {terms: 19, types: 4, coercions: 0, joins: 0/0} -T10482.$wfoo [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=<L,1*U><S,1*U>, Unf=OtherCon []] +-- RHS size: {terms: 19, types: 5, coercions: 3, joins: 0/0} +T10482.$wfoo [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: Foo Int -> GHC.Prim.Int# -> Int +[GblId, Arity=2, Str=<L,1*U><S,1*U>, Unf=OtherCon []] T10482.$wfoo - = \ (ww_s2OA :: GHC.Prim.Int#) (ww1_s2OI :: GHC.Prim.Int#) -> - case ww1_s2OI of wild_X1r { + = \ (ww_s1Fu + :: Foo Int + Unf=OtherCon []) + (ww1_s1FB :: GHC.Prim.Int#) -> + case ww1_s1FB of wild_X1 { __DEFAULT -> - case GHC.Prim.remInt# wild_X1r 2# of { - __DEFAULT -> ww_s2OA; - 0# -> T10482.$wfoo ww_s2OA (GHC.Prim.-# wild_X1r 1#) + case GHC.Prim.remInt# wild_X1 2# of { + __DEFAULT -> ww_s1Fu `cast` (T10482.D:R:FooInt0[0] ; T10482.N:R:FooInt[0] :: Foo Int ~R# Int); + 0# -> T10482.$wfoo ww_s1Fu (GHC.Prim.-# wild_X1 1#) }; - 0# -> 0# + 0# -> lvl_r1GK } end Rec } --- RHS size: {terms: 21, types: 30, coercions: 11, joins: 0/0} +-- RHS size: {terms: 14, types: 27, coercions: 8, joins: 0/0} foo [InlPrag=NOUSERINLINE[2]] :: Foo ((Int, Int), Int) -> Int -> Int [GblId, Arity=2, - Caf=NoCafRefs, - Str=<S(S(S(S)L)L),1*U(U(U(1*U),A),A)><S(S),1*U(1*U)>m, + Str=<S(SL),1*U(1*U(1*U,A),A)><S(S),1*U(1*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= \ (w_s2Oq [Occ=Once] :: Foo ((Int, Int), Int)) (w1_s2Or [Occ=Once!] :: Int) -> - case w_s2Oq - `cast` (T10482.D:R:Foo(,)0[0] <(Int, Int)>_N <Int>_N :: (Foo ((Int, Int), Int) :: *) ~R# (T10482.R:Foo(,) (Int, Int) Int :: *)) - of - { FooPair ww1_s2Ou [Occ=Once] _ [Occ=Dead] -> - case ww1_s2Ou `cast` (T10482.D:R:Foo(,)0[0] <Int>_N <Int>_N :: (Foo (Int, Int) :: *) ~R# (T10482.R:Foo(,) Int Int :: *)) of - { FooPair ww4_s2Ox [Occ=Once] _ [Occ=Dead] -> - case ww4_s2Ox `cast` (T10482.D:R:FooInt0[0] ; T10482.N:R:FooInt[0] :: (Foo Int :: *) ~R# (Int :: *)) of - { GHC.Types.I# ww7_s2OA [Occ=Once] -> - case w1_s2Or of { GHC.Types.I# ww9_s2OI [Occ=Once] -> - case T10482.$wfoo ww7_s2OA ww9_s2OI of ww10_s2OM { __DEFAULT -> GHC.Types.I# ww10_s2OM } - } - } + Tmpl= \ (w_s1Fn [Occ=Once] :: Foo ((Int, Int), Int)) (w1_s1Fo [Occ=Once!] :: Int) -> + case w_s1Fn `cast` (T10482.D:R:Foo(,)0[0] <(Int, Int)>_N <Int>_N :: Foo ((Int, Int), Int) ~R# T10482.R:Foo(,) (Int, Int) Int) of + { FooPair ww1_s1Fr [Occ=Once] _ [Occ=Dead] -> + case ww1_s1Fr `cast` (T10482.D:R:Foo(,)0[0] <Int>_N <Int>_N :: Foo (Int, Int) ~R# T10482.R:Foo(,) Int Int) of + { FooPair ww4_s1Fu [Occ=Once] _ [Occ=Dead] -> + case w1_s1Fo of { GHC.Types.I# ww7_s1FB [Occ=Once] -> T10482.$wfoo ww4_s1Fu ww7_s1FB } } }}] foo - = \ (w_s2Oq :: Foo ((Int, Int), Int)) (w1_s2Or :: Int) -> - case w_s2Oq - `cast` (T10482.D:R:Foo(,)0[0] <(Int, Int)>_N <Int>_N :: (Foo ((Int, Int), Int) :: *) ~R# (T10482.R:Foo(,) (Int, Int) Int :: *)) - of - { FooPair ww1_s2Ou ww2_s2OE -> - case ww1_s2Ou `cast` (T10482.D:R:Foo(,)0[0] <Int>_N <Int>_N :: (Foo (Int, Int) :: *) ~R# (T10482.R:Foo(,) Int Int :: *)) of - { FooPair ww4_s2Pm ww5_s2Pn -> - case ww4_s2Pm `cast` (T10482.D:R:FooInt0[0] ; T10482.N:R:FooInt[0] :: (Foo Int :: *) ~R# (Int :: *)) of { GHC.Types.I# ww7_s2Pq -> - case w1_s2Or of { GHC.Types.I# ww9_s2OI -> case T10482.$wfoo ww7_s2Pq ww9_s2OI of ww10_s2OM { __DEFAULT -> GHC.Types.I# ww10_s2OM } } - } + = \ (w_s1Fn :: Foo ((Int, Int), Int)) (w1_s1Fo :: Int) -> + case w_s1Fn `cast` (T10482.D:R:Foo(,)0[0] <(Int, Int)>_N <Int>_N :: Foo ((Int, Int), Int) ~R# T10482.R:Foo(,) (Int, Int) Int) of + { FooPair ww1_s1Fr ww2_s1Fx -> + case ww1_s1Fr `cast` (T10482.D:R:Foo(,)0[0] <Int>_N <Int>_N :: Foo (Int, Int) ~R# T10482.R:Foo(,) Int Int) of + { FooPair ww4_s1G0 ww5_s1G1 -> + case w1_s1Fo of { GHC.Types.I# ww7_s1FB -> T10482.$wfoo ww4_s1G0 ww7_s1FB } } } diff --git a/testsuite/tests/stranal/should_compile/T10482a.stderr b/testsuite/tests/stranal/should_compile/T10482a.stderr index 6fa4f00d75..8d6fd7d877 100644 --- a/testsuite/tests/stranal/should_compile/T10482a.stderr +++ b/testsuite/tests/stranal/should_compile/T10482a.stderr @@ -1,407 +1,366 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 353, types: 155, coercions: 3, joins: 0/0} +Result size of Tidy Core = {terms: 342, types: 152, coercions: 3, joins: 0/0} -- RHS size: {terms: 9, types: 8, coercions: 0, joins: 0/0} -Foo.$WMkT4 [InlPrag=INLINE[2]] :: forall a. Foo a -> Int -> T4 a +Foo.$WMkT4 [InlPrag=INLINE[0]] :: forall a. Foo a -> Int -> T4 a [GblId[DataConWrapper], Arity=2, Caf=NoCafRefs, - Str=<S,U><L,U>m, + Str=<S,U><L,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= \ (@ a_atA) (dt_a21M [Occ=Once] :: Foo a_atA[sk:1]) (dt_a21N [Occ=Once] :: Int) -> - case dt_a21M of dt_X21Q { __DEFAULT -> Foo.MkT4 @ a_atA dt_X21Q dt_a21N }}] + Tmpl= \ (@a_agw) (dt_a1hl [Occ=Once] :: Foo a_agw) (dt_a1hm [Occ=Once] :: Int) -> + case dt_a1hl of dt_X0 [Occ=Once] { __DEFAULT -> Foo.MkT4 @a_agw dt_X0 dt_a1hm }}] Foo.$WMkT4 - = \ (@ a_atA) (dt_a21M [Occ=Once] :: Foo a_atA[sk:1]) (dt_a21N [Occ=Once] :: Int) -> - case dt_a21M of dt_X21Q { __DEFAULT -> Foo.MkT4 @ a_atA dt_X21Q dt_a21N } + = \ (@a_agw) (dt_a1hl [Occ=Once] :: Foo a_agw) (dt_a1hm [Occ=Once] :: Int) -> + case dt_a1hl of dt_X0 [Occ=Once] { __DEFAULT -> Foo.MkT4 @a_agw dt_X0 dt_a1hm } -- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0} -Foo.$WMkT2 [InlPrag=INLINE[2]] :: Int -> Int -> T2 +Foo.$WMkT2 [InlPrag=INLINE[0]] :: Int -> Int -> T2 [GblId[DataConWrapper], Arity=2, Caf=NoCafRefs, - Str=<S,U><L,U>m, + Str=<S,U><L,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= \ (dt_a20w [Occ=Once] :: Int) (dt_a20x [Occ=Once] :: Int) -> - case dt_a20w of dt_X20z { __DEFAULT -> Foo.MkT2 dt_X20z dt_a20x }}] + Tmpl= \ (dt_a1gu [Occ=Once] :: Int) (dt_a1gv [Occ=Once] :: Int) -> + case dt_a1gu of dt_X0 [Occ=Once] { __DEFAULT -> Foo.MkT2 dt_X0 dt_a1gv }}] Foo.$WMkT2 - = \ (dt_a20w [Occ=Once] :: Int) (dt_a20x [Occ=Once] :: Int) -> case dt_a20w of dt_X20z { __DEFAULT -> Foo.MkT2 dt_X20z dt_a20x } + = \ (dt_a1gu [Occ=Once] :: Int) (dt_a1gv [Occ=Once] :: Int) -> + case dt_a1gu of dt_X0 [Occ=Once] { __DEFAULT -> Foo.MkT2 dt_X0 dt_a1gv } -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$trModule4 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$trModule4 = "main"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$trModule3 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$trModule3 = GHC.Types.TrNameS Foo.$trModule4 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$trModule2 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$trModule2 = "Foo"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$trModule1 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$trModule1 = GHC.Types.TrNameS Foo.$trModule2 -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} Foo.$trModule :: GHC.Types.Module [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}] Foo.$trModule = GHC.Types.Module Foo.$trModule3 Foo.$trModule1 -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} -$krep_r2oJ :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep_r2oJ = GHC.Types.KindRepTyConApp GHC.Types.$tcInt (GHC.Types.[] @ GHC.Types.KindRep) +$krep_r1x7 :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep_r1x7 = GHC.Types.KindRepTyConApp GHC.Types.$tcInt (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} -$krep1_r2oK :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep1_r2oK = GHC.Types.KindRepVar 0# +$krep1_r1x8 :: GHC.Types.KindRep +[GblId, Cpr=m2, Unf=OtherCon []] +$krep1_r1x8 = GHC.Types.KindRepVar 0# -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tcT5 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$tcT5 = "T2"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tcT1 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tcT1 = GHC.Types.TrNameS Foo.$tcT5 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tcT2 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tcT2 = GHC.Types.TyCon 12492463661685256209## 1082997131366389398## Foo.$trModule Foo.$tcT1 0# GHC.Types.krep$* -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} -$krep2_r2oL :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep2_r2oL = GHC.Types.KindRepTyConApp Foo.$tcT2 (GHC.Types.[] @ GHC.Types.KindRep) +$krep2_r1x9 :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep2_r1x9 = GHC.Types.KindRepTyConApp Foo.$tcT2 (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep3_r2oM :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -$krep3_r2oM = GHC.Types.KindRepFun $krep_r2oJ $krep2_r2oL +$krep3_r1xa :: GHC.Types.KindRep +[GblId, Cpr=m4, Unf=OtherCon []] +$krep3_r1xa = GHC.Types.KindRepFun $krep_r1x7 $krep2_r1x9 -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -Foo.$tc'MkT1 = GHC.Types.KindRepFun $krep_r2oJ $krep3_r2oM +[GblId, Cpr=m4, Unf=OtherCon []] +Foo.$tc'MkT1 = GHC.Types.KindRepFun $krep_r1x7 $krep3_r1xa -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT6 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] Foo.$tc'MkT6 = "'MkT2"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT5 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tc'MkT5 = GHC.Types.TrNameS Foo.$tc'MkT6 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT2 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tc'MkT2 = GHC.Types.TyCon 5707542518475997625## 9584804394183763875## Foo.$trModule Foo.$tc'MkT5 0# Foo.$tc'MkT1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tcT7 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$tcT7 = "T3"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tcT6 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tcT6 = GHC.Types.TrNameS Foo.$tcT7 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tcT3 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tcT3 = GHC.Types.TyCon 8915518733037212359## 16476420519216613869## Foo.$trModule Foo.$tcT6 0# GHC.Types.krep$* -- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0} -$krep4_r2oN :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep4_r2oN = GHC.Types.KindRepTyConApp Foo.$tcT3 (GHC.Types.[] @ GHC.Types.KindRep) +$krep4_r1xb :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep4_r1xb = GHC.Types.KindRepTyConApp Foo.$tcT3 (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep5_r2oO :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -$krep5_r2oO = GHC.Types.KindRepFun $krep_r2oJ $krep4_r2oN +$krep5_r1xc :: GHC.Types.KindRep +[GblId, Cpr=m4, Unf=OtherCon []] +$krep5_r1xc = GHC.Types.KindRepFun $krep_r1x7 $krep4_r1xb -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT7 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -Foo.$tc'MkT7 = GHC.Types.KindRepFun $krep_r2oJ $krep5_r2oO +[GblId, Cpr=m4, Unf=OtherCon []] +Foo.$tc'MkT7 = GHC.Types.KindRepFun $krep_r1x7 $krep5_r1xc -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT9 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] Foo.$tc'MkT9 = "'MkT3"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT8 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tc'MkT8 = GHC.Types.TrNameS Foo.$tc'MkT9 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT3 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tc'MkT3 = GHC.Types.TyCon 7218783144619306039## 13236146459150723629## Foo.$trModule Foo.$tc'MkT8 0# Foo.$tc'MkT7 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tcFoo :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tcFoo = GHC.Types.TyCon 11236787750777559483## 2472662601374496863## Foo.$trModule Foo.$trModule1 0# GHC.Types.krep$*Arr* -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep6_r2oP :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep6_r2oP = GHC.Types.: @ GHC.Types.KindRep $krep1_r2oK (GHC.Types.[] @ GHC.Types.KindRep) +$krep6_r1xd :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep6_r1xd = GHC.Types.: @GHC.Types.KindRep $krep1_r1x8 (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep7_r2oQ :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep7_r2oQ = GHC.Types.KindRepTyConApp Foo.$tcFoo $krep6_r2oP +$krep7_r1xe :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep7_r1xe = GHC.Types.KindRepTyConApp Foo.$tcFoo $krep6_r1xd -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} -$krep8_r2oR :: [GHC.Types.KindRep] -[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []] -$krep8_r2oR = GHC.Types.: @ GHC.Types.KindRep $krep_r2oJ (GHC.Types.[] @ GHC.Types.KindRep) +$krep8_r1xf :: [GHC.Types.KindRep] +[GblId, Cpr=m2, Unf=OtherCon []] +$krep8_r1xf = GHC.Types.: @GHC.Types.KindRep $krep_r1x7 (GHC.Types.[] @GHC.Types.KindRep) -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep9_r2oS :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep9_r2oS = GHC.Types.KindRepTyConApp Foo.$tcFoo $krep8_r2oR +$krep9_r1xg :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep9_r1xg = GHC.Types.KindRepTyConApp Foo.$tcFoo $krep8_r1xf -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} Foo.$tc'Foo1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -Foo.$tc'Foo1 = GHC.Types.KindRepFun $krep_r2oJ $krep9_r2oS +[GblId, Cpr=m4, Unf=OtherCon []] +Foo.$tc'Foo1 = GHC.Types.KindRepFun $krep_r1x7 $krep9_r1xg -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tc'Foo3 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$tc'Foo3 = "'Foo"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tc'Foo2 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tc'Foo2 = GHC.Types.TrNameS Foo.$tc'Foo3 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tc'Foo :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tc'Foo = GHC.Types.TyCon 10641757595611461765## 13961773224584044648## Foo.$trModule Foo.$tc'Foo2 0# Foo.$tc'Foo1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tcT9 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}] Foo.$tcT9 = "T4"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tcT8 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tcT8 = GHC.Types.TrNameS Foo.$tcT9 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tcT4 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tcT4 = GHC.Types.TyCon 15961711399118996930## 13694522307176382499## Foo.$trModule Foo.$tcT8 0# GHC.Types.krep$*Arr* -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep10_r2oT :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []] -$krep10_r2oT = GHC.Types.KindRepTyConApp Foo.$tcT4 $krep6_r2oP +$krep10_r1xh :: GHC.Types.KindRep +[GblId, Cpr=m1, Unf=OtherCon []] +$krep10_r1xh = GHC.Types.KindRepTyConApp Foo.$tcT4 $krep6_r1xd -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} -$krep11_r2oU :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -$krep11_r2oU = GHC.Types.KindRepFun $krep_r2oJ $krep10_r2oT +$krep11_r1xi :: GHC.Types.KindRep +[GblId, Cpr=m4, Unf=OtherCon []] +$krep11_r1xi = GHC.Types.KindRepFun $krep_r1x7 $krep10_r1xh -- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT10 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep -[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []] -Foo.$tc'MkT10 = GHC.Types.KindRepFun $krep7_r2oQ $krep11_r2oU +[GblId, Cpr=m4, Unf=OtherCon []] +Foo.$tc'MkT10 = GHC.Types.KindRepFun $krep7_r1xe $krep11_r1xi -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT12 :: GHC.Prim.Addr# -[GblId, - Caf=NoCafRefs, - Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] +[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}] Foo.$tc'MkT12 = "'MkT4"# -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT11 :: GHC.Types.TrName [GblId, - Caf=NoCafRefs, - Str=m1, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}] Foo.$tc'MkT11 = GHC.Types.TrNameS Foo.$tc'MkT12 -- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0} Foo.$tc'MkT4 :: GHC.Types.TyCon [GblId, - Caf=NoCafRefs, - Str=m, + Cpr=m1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}] Foo.$tc'MkT4 = GHC.Types.TyCon 6077781708614236332## 14823286043222481570## Foo.$trModule Foo.$tc'MkT11 1# Foo.$tc'MkT10 Rec { --- RHS size: {terms: 14, types: 3, coercions: 0, joins: 0/0} -Foo.$wf4 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=<S,1*U><S,U>, Unf=OtherCon []] +-- RHS size: {terms: 14, types: 4, coercions: 3, joins: 0/0} +Foo.$wf4 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: Foo Int -> GHC.Prim.Int# -> Int +[GblId, Arity=2, Str=<S,1*U><L,U>, Unf=OtherCon []] Foo.$wf4 - = \ (ww_s2jL :: GHC.Prim.Int#) (ww1_s2jQ :: GHC.Prim.Int#) -> - case GHC.Prim.># ww1_s2jQ 0# of { - __DEFAULT -> ww_s2jL; - 1# -> Foo.$wf4 ww_s2jL (GHC.Prim.-# ww1_s2jQ 1#) + = \ (ww_s1tc + :: Foo Int + Unf=OtherCon []) + (ww1_s1tg :: GHC.Prim.Int#) -> + case GHC.Prim.># ww1_s1tg 0# of { + __DEFAULT -> ww_s1tc `cast` (Foo.D:R:FooInt0[0] ; Foo.N:R:FooInt[0] :: Foo Int ~R# Int); + 1# -> Foo.$wf4 ww_s1tc (GHC.Prim.-# ww1_s1tg 1#) } end Rec } --- RHS size: {terms: 17, types: 12, coercions: 3, joins: 0/0} +-- RHS size: {terms: 10, types: 9, coercions: 0, joins: 0/0} f4 [InlPrag=NOUSERINLINE[2]] :: T4 Int -> Int [GblId, Arity=1, - Caf=NoCafRefs, - Str=<S(S(S)S(S)),1*U(U(1*U),1*U(U))>m, + Str=<S(SS),1*U(1*U,1*U(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= \ (w_s2jF [Occ=Once!] :: T4 Int) -> - case w_s2jF of { MkT4 ww1_s2jI [Occ=Once] ww2_s2jN [Occ=Once!] -> - case ww1_s2jI `cast` (Foo.D:R:FooInt0[0] ; Foo.N:R:FooInt[0] :: (Foo Int :: *) ~R# (Int :: *)) of - { GHC.Types.I# ww4_s2jL [Occ=Once] -> - case ww2_s2jN of { GHC.Types.I# ww6_s2jQ [Occ=Once] -> - case Foo.$wf4 ww4_s2jL ww6_s2jQ of ww7_s2jV { __DEFAULT -> GHC.Types.I# ww7_s2jV } - } - } + Tmpl= \ (w_s1t9 [Occ=Once!] :: T4 Int) -> + case w_s1t9 of { MkT4 ww1_s1tc [Occ=Once] ww2_s1td [Occ=Once!] -> + case ww2_s1td of { GHC.Types.I# ww4_s1tg [Occ=Once] -> Foo.$wf4 ww1_s1tc ww4_s1tg } }}] f4 - = \ (w_s2jF :: T4 Int) -> - case w_s2jF of { MkT4 ww1_s2jI ww2_s2jN -> - case ww1_s2jI `cast` (Foo.D:R:FooInt0[0] ; Foo.N:R:FooInt[0] :: (Foo Int :: *) ~R# (Int :: *)) of { GHC.Types.I# ww4_s2mW -> - case ww2_s2jN of { GHC.Types.I# ww6_s2jQ -> case Foo.$wf4 ww4_s2mW ww6_s2jQ of ww7_s2jV { __DEFAULT -> GHC.Types.I# ww7_s2jV } } - } - } + = \ (w_s1t9 :: T4 Int) -> + case w_s1t9 of { MkT4 ww1_s1tc ww2_s1td -> case ww2_s1td of { GHC.Types.I# ww4_s1tg -> Foo.$wf4 ww1_s1tc ww4_s1tg } } + +-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} +lvl_r1xj :: Int +[GblId, Cpr=m1, Unf=OtherCon []] +lvl_r1xj = GHC.Types.I# 1# Rec { -- RHS size: {terms: 21, types: 4, coercions: 0, joins: 0/0} -Foo.$wf2 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=<L,1*U><S,U>, Unf=OtherCon []] +Foo.$wf2 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: Int -> GHC.Prim.Int# -> Int +[GblId, Arity=2, Str=<L,1*U><L,U>, Unf=OtherCon []] Foo.$wf2 - = \ (ww_s2k3 :: GHC.Prim.Int#) (ww1_s2k8 :: GHC.Prim.Int#) -> - case GHC.Prim.># ww1_s2k8 0# of { + = \ (ww_s1tn + :: Int + Unf=OtherCon []) + (ww1_s1tr :: GHC.Prim.Int#) -> + case GHC.Prim.># ww1_s1tr 0# of { __DEFAULT -> - case GHC.Prim.># ww1_s2k8 1# of { - __DEFAULT -> ww_s2k3; - 1# -> 1# + case GHC.Prim.># ww1_s1tr 1# of { + __DEFAULT -> ww_s1tn; + 1# -> lvl_r1xj }; - 1# -> Foo.$wf2 ww_s2k3 (GHC.Prim.-# ww1_s2k8 1#) + 1# -> Foo.$wf2 ww_s1tn (GHC.Prim.-# ww1_s1tr 1#) } end Rec } --- RHS size: {terms: 17, types: 9, coercions: 0, joins: 0/0} +-- RHS size: {terms: 10, types: 6, coercions: 0, joins: 0/0} f2 [InlPrag=NOUSERINLINE[2]] :: T2 -> Int [GblId, Arity=1, - Caf=NoCafRefs, - Str=<S(S(S)S(S)),1*U(U(1*U),1*U(U))>m, + Str=<S(LS),1*U(1*U,1*U(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= \ (w_s2jX [Occ=Once!] :: T2) -> - case w_s2jX of { MkT2 ww1_s2k0 [Occ=Once!] ww2_s2k5 [Occ=Once!] -> - case ww1_s2k0 of { GHC.Types.I# ww4_s2k3 [Occ=Once] -> - case ww2_s2k5 of { GHC.Types.I# ww6_s2k8 [Occ=Once] -> - case Foo.$wf2 ww4_s2k3 ww6_s2k8 of ww7_s2kd { __DEFAULT -> GHC.Types.I# ww7_s2kd } - } - } + Tmpl= \ (w_s1tk [Occ=Once!] :: T2) -> + case w_s1tk of { MkT2 ww1_s1tn [Occ=Once] ww2_s1to [Occ=Once!] -> + case ww2_s1to of { GHC.Types.I# ww4_s1tr [Occ=Once] -> Foo.$wf2 ww1_s1tn ww4_s1tr } }}] f2 - = \ (w_s2jX :: T2) -> - case w_s2jX of { MkT2 ww1_s2k0 ww2_s2k5 -> - case ww1_s2k0 of { GHC.Types.I# ww4_s2mZ -> - case ww2_s2k5 of { GHC.Types.I# ww6_s2k8 -> case Foo.$wf2 ww4_s2mZ ww6_s2k8 of ww7_s2kd { __DEFAULT -> GHC.Types.I# ww7_s2kd } } - } - } + = \ (w_s1tk :: T2) -> + case w_s1tk of { MkT2 ww1_s1tn ww2_s1to -> case ww2_s1to of { GHC.Types.I# ww4_s1tr -> Foo.$wf2 ww1_s1tn ww4_s1tr } } Rec { -- RHS size: {terms: 15, types: 4, coercions: 0, joins: 0/0} Foo.$wh [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> Bool -[GblId, Arity=2, Caf=NoCafRefs, Str=<S,1*U><S,U>, Unf=OtherCon []] +[GblId, Arity=2, Str=<S,1*U><L,U>, Unf=OtherCon []] Foo.$wh - = \ (ww_s2kj :: GHC.Prim.Int#) (ww1_s2kn :: GHC.Prim.Int#) -> - case ww_s2kj of ds_X2gt { - __DEFAULT -> Foo.$wh (GHC.Prim.-# ds_X2gt 1#) ww1_s2kn; - 0# -> GHC.Prim.tagToEnum# @ Bool (GHC.Prim.># ww1_s2kn 0#) + = \ (ww_s1tz :: GHC.Prim.Int#) (ww1_s1tD :: GHC.Prim.Int#) -> + case ww_s1tz of ds_X2 { + __DEFAULT -> Foo.$wh (GHC.Prim.-# ds_X2 1#) ww1_s1tD; + 0# -> GHC.Prim.tagToEnum# @Bool (GHC.Prim.># ww1_s1tD 0#) } end Rec } @@ -409,26 +368,25 @@ end Rec } h [InlPrag=NOUSERINLINE[2]] :: Int -> Int -> Bool [GblId, Arity=2, - Caf=NoCafRefs, - Str=<S(S),1*U(1*U)><S(S),1*U(U)>, + Str=<S(S),1*U(1*U)><S,1*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=False) - Tmpl= \ (w_s2kf [Occ=Once!] :: Int) (w1_s2kg [Occ=Once!] :: Int) -> - case w_s2kf of { GHC.Types.I# ww1_s2kj [Occ=Once] -> - case w1_s2kg of { GHC.Types.I# ww3_s2kn [Occ=Once] -> Foo.$wh ww1_s2kj ww3_s2kn } + Tmpl= \ (w_s1tv [Occ=Once!] :: Int) (w1_s1tw [Occ=Once!] :: Int) -> + case w_s1tv of { GHC.Types.I# ww1_s1tz [Occ=Once] -> + case w1_s1tw of { GHC.Types.I# ww3_s1tD [Occ=Once] -> Foo.$wh ww1_s1tz ww3_s1tD } }}] -h = \ (w_s2kf :: Int) (w1_s2kg :: Int) -> - case w_s2kf of { GHC.Types.I# ww1_s2kj -> case w1_s2kg of { GHC.Types.I# ww3_s2kn -> Foo.$wh ww1_s2kj ww3_s2kn } } +h = \ (w_s1tv :: Int) (w1_s1tw :: Int) -> + case w_s1tv of { GHC.Types.I# ww1_s1tz -> case w1_s1tw of { GHC.Types.I# ww3_s1tD -> Foo.$wh ww1_s1tz ww3_s1tD } } Rec { -- RHS size: {terms: 12, types: 2, coercions: 0, joins: 0/0} Foo.$wf1 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []] +[GblId, Arity=1, Str=<S,U>, Unf=OtherCon []] Foo.$wf1 - = \ (ww_s2kt :: GHC.Prim.Int#) -> - case Foo.$wh ww_s2kt ww_s2kt of { - False -> Foo.$wf1 (GHC.Prim.-# ww_s2kt 1#); - True -> ww_s2kt + = \ (ww_s1tJ :: GHC.Prim.Int#) -> + case Foo.$wh ww_s1tJ ww_s1tJ of { + False -> Foo.$wf1 (GHC.Prim.-# ww_s1tJ 1#); + True -> ww_s1tJ } end Rec } @@ -436,25 +394,27 @@ end Rec } f1 [InlPrag=NOUSERINLINE[2]] :: Int -> Int [GblId, Arity=1, - Caf=NoCafRefs, - Str=<S(S),1*U(U)>m, + Str=<S(S),1*U(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= \ (w_s2kq [Occ=Once!] :: Int) -> - case w_s2kq of { GHC.Types.I# ww1_s2kt [Occ=Once] -> case Foo.$wf1 ww1_s2kt of ww2_s2kx { __DEFAULT -> GHC.Types.I# ww2_s2kx } }}] + Tmpl= \ (w_s1tG [Occ=Once!] :: Int) -> + case w_s1tG of { GHC.Types.I# ww1_s1tJ [Occ=Once] -> + case Foo.$wf1 ww1_s1tJ of ww2_s1tN [Occ=Once] { __DEFAULT -> GHC.Types.I# ww2_s1tN } + }}] f1 - = \ (w_s2kq :: Int) -> - case w_s2kq of { GHC.Types.I# ww1_s2kt -> case Foo.$wf1 ww1_s2kt of ww2_s2kx { __DEFAULT -> GHC.Types.I# ww2_s2kx } } + = \ (w_s1tG :: Int) -> + case w_s1tG of { GHC.Types.I# ww1_s1tJ -> case Foo.$wf1 ww1_s1tJ of ww2_s1tN { __DEFAULT -> GHC.Types.I# ww2_s1tN } } Rec { -- RHS size: {terms: 14, types: 3, coercions: 0, joins: 0/0} Foo.$wf3 [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int# -[GblId, Arity=2, Caf=NoCafRefs, Str=<S,U><S,U>, Unf=OtherCon []] +[GblId, Arity=2, Str=<S,U><L,U>, Unf=OtherCon []] Foo.$wf3 - = \ (ww_s2kF :: GHC.Prim.Int#) (ww1_s2kK :: GHC.Prim.Int#) -> - case Foo.$wh ww_s2kF ww1_s2kK of { - False -> ww_s2kF; - True -> Foo.$wf3 ww_s2kF (GHC.Prim.-# ww1_s2kK 1#) + = \ (ww_s1tV :: GHC.Prim.Int#) (ww1_s1u0 :: GHC.Prim.Int#) -> + case Foo.$wh ww_s1tV ww1_s1u0 of { + False -> ww_s1tV; + True -> Foo.$wf3 ww_s1tV (GHC.Prim.-# ww1_s1u0 1#) } end Rec } @@ -462,23 +422,23 @@ end Rec } f3 [InlPrag=NOUSERINLINE[2]] :: T3 -> Int [GblId, Arity=1, - Caf=NoCafRefs, - Str=<S(S(S)S(S)),1*U(1*U(U),1*U(U))>m, + Str=<S(S(S)S),1*U(1*U(U),1*U(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= \ (w_s2kz [Occ=Once!] :: T3) -> - case w_s2kz of { MkT3 ww1_s2kC [Occ=Once!] ww2_s2kH [Occ=Once!] -> - case ww1_s2kC of { GHC.Types.I# ww4_s2kF [Occ=Once] -> - case ww2_s2kH of { GHC.Types.I# ww6_s2kK [Occ=Once] -> - case Foo.$wf3 ww4_s2kF ww6_s2kK of ww7_s2kP { __DEFAULT -> GHC.Types.I# ww7_s2kP } + Tmpl= \ (w_s1tP [Occ=Once!] :: T3) -> + case w_s1tP of { MkT3 ww1_s1tS [Occ=Once!] ww2_s1tX [Occ=Once!] -> + case ww1_s1tS of { GHC.Types.I# ww4_s1tV [Occ=Once] -> + case ww2_s1tX of { GHC.Types.I# ww6_s1u0 [Occ=Once] -> + case Foo.$wf3 ww4_s1tV ww6_s1u0 of ww7_s1u5 [Occ=Once] { __DEFAULT -> GHC.Types.I# ww7_s1u5 } } } }}] f3 - = \ (w_s2kz :: T3) -> - case w_s2kz of { MkT3 ww1_s2kC ww2_s2kH -> - case ww1_s2kC of { GHC.Types.I# ww4_s2kF -> - case ww2_s2kH of { GHC.Types.I# ww6_s2kK -> case Foo.$wf3 ww4_s2kF ww6_s2kK of ww7_s2kP { __DEFAULT -> GHC.Types.I# ww7_s2kP } } + = \ (w_s1tP :: T3) -> + case w_s1tP of { MkT3 ww1_s1tS ww2_s1tX -> + case ww1_s1tS of { GHC.Types.I# ww4_s1tV -> + case ww2_s1tX of { GHC.Types.I# ww6_s1u0 -> case Foo.$wf3 ww4_s1tV ww6_s1u0 of ww7_s1u5 { __DEFAULT -> GHC.Types.I# ww7_s1u5 } } } } diff --git a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr index 96b6bf669f..a42d492099 100644 --- a/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr +++ b/testsuite/tests/stranal/sigs/DmdAnalGADTs.stderr @@ -9,7 +9,7 @@ DmdAnalGADTs.f: <S,1*U> DmdAnalGADTs.f': <S,1*U> DmdAnalGADTs.g: <S,1*U> DmdAnalGADTs.hasCPR: -DmdAnalGADTs.hasStrSig: <S,1*U(U)> +DmdAnalGADTs.hasStrSig: <S,1*U> @@ -23,7 +23,7 @@ DmdAnalGADTs.f: DmdAnalGADTs.f': m1 DmdAnalGADTs.g: DmdAnalGADTs.hasCPR: m1 -DmdAnalGADTs.hasStrSig: m1 +DmdAnalGADTs.hasStrSig: @@ -37,6 +37,6 @@ DmdAnalGADTs.f: <S,1*U> DmdAnalGADTs.f': <S,1*U> DmdAnalGADTs.g: <S,1*U> DmdAnalGADTs.hasCPR: -DmdAnalGADTs.hasStrSig: <S,1*U(U)> +DmdAnalGADTs.hasStrSig: <S,1*U> diff --git a/testsuite/tests/stranal/sigs/T17932.hs b/testsuite/tests/stranal/sigs/T17932.hs new file mode 100644 index 0000000000..4f59ded3eb --- /dev/null +++ b/testsuite/tests/stranal/sigs/T17932.hs @@ -0,0 +1,11 @@ +-- See commentary in #17932 + +module T17932 where + +flags (Options f x) + = reverse (reverse (reverse (reverse (reverse (reverse (reverse (reverse x))))))) + `seq` f + +data X = X String Bool Bool Bool Bool + +data Options = Options !X [Int] diff --git a/testsuite/tests/stranal/sigs/T17932.stderr b/testsuite/tests/stranal/sigs/T17932.stderr new file mode 100644 index 0000000000..c086c8cd86 --- /dev/null +++ b/testsuite/tests/stranal/sigs/T17932.stderr @@ -0,0 +1,30 @@ + +==================== Strictness signatures ==================== +T17932.$tc'Options: +T17932.$tc'X: +T17932.$tcOptions: +T17932.$tcX: +T17932.$trModule: +T17932.flags: <S(SS),1*U(1*U,1*U)> + + + +==================== Cpr signatures ==================== +T17932.$tc'Options: m1 +T17932.$tc'X: m1 +T17932.$tcOptions: m1 +T17932.$tcX: m1 +T17932.$trModule: m1 +T17932.flags: + + + +==================== Strictness signatures ==================== +T17932.$tc'Options: +T17932.$tc'X: +T17932.$tcOptions: +T17932.$tcX: +T17932.$trModule: +T17932.flags: <S(SS),1*U(1*U,1*U)> + + diff --git a/testsuite/tests/stranal/sigs/UnsatFun.stderr b/testsuite/tests/stranal/sigs/UnsatFun.stderr index 1f5a58b422..aedf131826 100644 --- a/testsuite/tests/stranal/sigs/UnsatFun.stderr +++ b/testsuite/tests/stranal/sigs/UnsatFun.stderr @@ -5,8 +5,8 @@ UnsatFun.f: <B,1*U(U)><B,A>b UnsatFun.g: <B,1*U(U)>b UnsatFun.g': <L,1*U(U)> UnsatFun.g3: <L,U(U)> -UnsatFun.h: <C(S),1*C1(U(U))> -UnsatFun.h2: <S,1*U><L,1*C1(U(U))> +UnsatFun.h: <C(S),1*C1(U)> +UnsatFun.h2: <S,1*U><L,1*C1(U)> UnsatFun.h3: <C(S),1*C1(U)> @@ -29,8 +29,8 @@ UnsatFun.f: <B,1*U(U)><B,A>b UnsatFun.g: <B,1*U(U)>b UnsatFun.g': <L,1*U(U)> UnsatFun.g3: <L,U(U)> -UnsatFun.h: <C(S),1*C1(U(U))> -UnsatFun.h2: <S,1*U><L,1*C1(U(U))> +UnsatFun.h: <C(S),1*C1(U)> +UnsatFun.h2: <S,1*U><L,1*C1(U)> UnsatFun.h3: <C(S),1*C1(U)> diff --git a/testsuite/tests/stranal/sigs/all.T b/testsuite/tests/stranal/sigs/all.T index f7cbd3761d..3afe9c7cd8 100644 --- a/testsuite/tests/stranal/sigs/all.T +++ b/testsuite/tests/stranal/sigs/all.T @@ -19,3 +19,4 @@ test('T12370', normal, compile, ['']) test('CaseBinderCPR', normal, compile, ['']) test('NewtypeArity', normal, compile, ['']) test('T5075', normal, compile, ['']) +test('T17932', normal, compile, ['']) |