diff options
21 files changed, 112 insertions, 186 deletions
diff --git a/compiler/GHC/Core/Opt/WorkWrap.hs b/compiler/GHC/Core/Opt/WorkWrap.hs index aa29daa9c9..f07f6c5a42 100644 --- a/compiler/GHC/Core/Opt/WorkWrap.hs +++ b/compiler/GHC/Core/Opt/WorkWrap.hs @@ -493,11 +493,6 @@ tryWW :: DynFlags tryWW dflags fam_envs is_rec fn_id rhs -- See Note [Worker/wrapper for NOINLINE functions] - | Just stable_unf <- certainlyWillInline uf_opts fn_info - = return [ (new_fn_id `setIdUnfolding` stable_unf, rhs) ] - -- See Note [Don't w/w INLINE things] - -- See Note [Don't w/w inline small non-loop-breaker things] - | isRecordSelector fn_id -- See Note [No worker/wrapper for record selectors] = return [ (new_fn_id, rhs ) ] @@ -511,25 +506,24 @@ tryWW dflags fam_envs is_rec fn_id rhs = return [ (new_fn_id, rhs) ] where - uf_opts = unfoldingOpts dflags - fn_info = idInfo fn_id + fn_info = idInfo fn_id (wrap_dmds, div) = splitDmdSig (dmdSigInfo fn_info) - cpr_ty = getCprSig (cprSigInfo fn_info) + cpr_ty = getCprSig (cprSigInfo fn_info) -- Arity of the CPR sig should match idArity when it's not a join point. -- See Note [Arity trimming for CPR signatures] in GHC.Core.Opt.CprAnal - cpr = assertPpr (isJoinId fn_id || cpr_ty == topCprType || ct_arty cpr_ty == arityInfo fn_info) - (ppr fn_id <> colon <+> text "ct_arty:" <+> int (ct_arty cpr_ty) - <+> text "arityInfo:" <+> ppr (arityInfo fn_info)) $ - ct_cpr cpr_ty + cpr = assertPpr (isJoinId fn_id || cpr_ty == topCprType || ct_arty cpr_ty == arityInfo fn_info) + (ppr fn_id <> colon <+> text "ct_arty:" <+> int (ct_arty cpr_ty) + <+> text "arityInfo:" <+> ppr (arityInfo fn_info)) $ + ct_cpr cpr_ty new_fn_id = zapIdUsedOnceInfo (zapIdUsageEnvInfo fn_id) -- See Note [Zapping DmdEnv after Demand Analyzer] and -- See Note [Zapping Used Once info WorkWrap] - is_fun = notNull wrap_dmds || isJoinId fn_id - -- See Note [Don't eta expand in w/w] + -- is_eta_exp: see Note [Don't eta expand in w/w] is_eta_exp = length wrap_dmds == manifestArity rhs + is_fun = notNull wrap_dmds || isJoinId fn_id is_thunk = not is_fun && not (exprIsHNF rhs) && not (isJoinId fn_id) && not (isUnliftedType (idType fn_id)) @@ -640,9 +634,16 @@ splitFun dflags fam_envs fn_id fn_info wrap_dmds div cpr rhs ; case mb_stuff of Nothing -> return [(fn_id, rhs)] - Just stuff -> do { work_uniq <- getUniqueM - ; return (mkWWBindPair dflags fn_id fn_info arity rhs - work_uniq div cpr stuff) } } + Just stuff + | Just stable_unf <- certainlyWillInline (unfoldingOpts dflags) fn_info + -> return [ (fn_id `setIdUnfolding` stable_unf, rhs) ] + -- See Note [Don't w/w INLINE things] + -- See Note [Don't w/w inline small non-loop-breaker things] + + | otherwise + -> do { work_uniq <- getUniqueM + ; return (mkWWBindPair dflags fn_id fn_info arity rhs + work_uniq div cpr stuff) } } where rhs_fvs = exprFreeVars rhs arity = arityInfo fn_info diff --git a/compiler/GHC/Core/Unfold.hs b/compiler/GHC/Core/Unfold.hs index e0f6943f31..916eb79a45 100644 --- a/compiler/GHC/Core/Unfold.hs +++ b/compiler/GHC/Core/Unfold.hs @@ -967,9 +967,10 @@ certainlyWillInline opts fn_info UnfIfGoodArgs { ug_size = size, ug_args = args } -> do_cunf expr size args src' where - src' = case src of - InlineRhs -> InlineStable - _ -> src -- Do not change InlineCompulsory! + src' = -- Do not change InlineCompulsory! + case src of + InlineCompulsory -> InlineCompulsory + _ -> InlineStable DFunUnfolding {} -> Just fn_unf -- Don't w/w DFuns; it never makes sense -- to do so, and even if it is currently a diff --git a/compiler/GHC/Iface/Tidy.hs b/compiler/GHC/Iface/Tidy.hs index b1e7aa1dc6..83a1ea8346 100644 --- a/compiler/GHC/Iface/Tidy.hs +++ b/compiler/GHC/Iface/Tidy.hs @@ -752,10 +752,20 @@ addExternal omit_prags expose_all id || isStableSource src -- Always expose things whose -- source is an inline rule - || not (bottoming_fn -- No need to inline bottom functions - || never_active -- Or ones that say not to - || loop_breaker -- Or that are loop breakers - || neverUnfoldGuidance guidance) + || not dont_inline + where + dont_inline + | never_active = True -- Will never inline + | loop_breaker = True -- Ditto + | otherwise = case guidance of + UnfWhen {} -> False + UnfIfGoodArgs {} -> bottoming_fn + UnfNever {} -> True + -- bottoming_fn: don't inline bottoming functions, unless the + -- RHS is very small or trivial (UnfWhen), in which case we + -- may as well do so For example, a cast might cancel with + -- the call site. + show_unfolding (DFunUnfolding {}) = True show_unfolding _ = False diff --git a/testsuite/tests/arityanal/should_compile/Arity01.stderr b/testsuite/tests/arityanal/should_compile/Arity01.stderr index 5d88afdce2..c5c5a24a9a 100644 --- a/testsuite/tests/arityanal/should_compile/Arity01.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity01.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 61, types: 41, coercions: 0, joins: 0/0} +Result size of Tidy Core = {terms: 61, types: 43, coercions: 0, joins: 0/0} -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F1.f2 :: Integer @@ -31,11 +31,7 @@ f1 = F1.f1_h1 F1.f3 F1.f2 F1.f3 -- RHS size: {terms: 14, types: 5, coercions: 0, joins: 0/0} g :: Integer -> Integer -> Integer -> Integer -> Integer -> Integer -[GblId, - Arity=5, - Str=<1L><SL><SL><SL><SL>, - 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}] +[GblId, Arity=5, Str=<1L><SL><SL><SL><SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [0 0 0 0 0] 120 0}] 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 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} @@ -43,13 +39,9 @@ F1.s1 :: Integer [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] F1.s1 = 3 --- RHS size: {terms: 8, types: 7, coercions: 0, joins: 0/0} +-- RHS size: {terms: 8, types: 8, coercions: 0, joins: 0/0} s :: forall {t1} {t2}. Num t1 => (t1 -> t2) -> t2 -[GblId, - Arity=2, - Str=<MP(A,A,A,A,A,A,MCM(L))><1C1(L)>, - 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)}] +[GblId, Arity=2, Str=<MP(A,A,A,A,A,A,MCM(L))><1C1(L)>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [30 60] 50 0}] s = \ (@t) (@t1) ($dNum :: Num t) (f :: t -> t1) -> f (fromInteger @t $dNum F1.s1) -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} @@ -59,11 +51,7 @@ F1.h1 = 24 -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} h :: Integer -> Integer -[GblId, - Arity=1, - Str=<SL>, - 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}] +[GblId, Arity=1, Str=<SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 30 0}] h = \ (x5 :: Integer) -> GHC.Num.Integer.integerAdd F1.h1 x5 diff --git a/testsuite/tests/arityanal/should_compile/Arity02.stderr b/testsuite/tests/arityanal/should_compile/Arity02.stderr index a9fd55094e..576718aff4 100644 --- a/testsuite/tests/arityanal/should_compile/Arity02.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity02.stderr @@ -9,11 +9,7 @@ F2.f1 = 0 -- RHS size: {terms: 7, types: 6, coercions: 0, joins: 0/0} f2f :: forall {t1} {t2}. (t1 -> Integer -> t2) -> t1 -> t2 -[GblId, - Arity=2, - Str=<1C1(C1(L))><L>, - 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}] +[GblId, Arity=2, Str=<1C1(C1(L))><L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] f2f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F2.f1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity05.stderr b/testsuite/tests/arityanal/should_compile/Arity05.stderr index cac001de31..7045daa0f1 100644 --- a/testsuite/tests/arityanal/should_compile/Arity05.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity05.stderr @@ -27,16 +27,12 @@ f5h [InlPrag=[2]] :: forall {a} {t}. Num a => (t -> a) -> t -> (t -> a) -> a Arity=4, Str=<1P(SCS(C1(L)),A,A,A,A,A,MCM(L))><MCM(L)><L><MCM(L)>, 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 } + 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 ww [Occ=Once1] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] ww6 [Occ=Once1] -> F5.$wf5h @a @t ww ww6 w1 w2 w3 }}] +f5h = \ (@a) (@t) (w :: Num a) (w1 :: t -> a) (w2 :: t) (w3 :: t -> a) -> case w of { GHC.Num.C:Num ww ww1 ww2 ww3 ww4 ww5 ww6 -> F5.$wf5h @a @t ww ww6 w1 w2 w3 } -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} f5y :: Integer -> Integer -[GblId, - Arity=1, - Str=<1L>, - 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}] +[GblId, Arity=1, Str=<1L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 30 0}] f5y = \ (y :: Integer) -> GHC.Num.Integer.integerAdd y F5.f5g1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity06.stderr b/testsuite/tests/arityanal/should_compile/Arity06.stderr index 50a1ddc76b..88240eea38 100644 --- a/testsuite/tests/arityanal/should_compile/Arity06.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity06.stderr @@ -1,28 +1,20 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 14, types: 22, coercions: 0, joins: 0/0} +Result size of Tidy Core = {terms: 14, types: 18, coercions: 0, joins: 0/0} -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F6.f6f1 :: Integer [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] F6.f6f1 = 0 --- RHS size: {terms: 7, types: 8, coercions: 0, joins: 0/0} +-- RHS size: {terms: 7, types: 6, coercions: 0, joins: 0/0} f6f :: forall {t1} {t2}. (t1 -> Integer -> t2) -> t1 -> t2 -[GblId, - Arity=2, - Str=<C(C(S)),1*C1(C1(U))><L,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 F6.f6f1}] +[GblId, Arity=2, Str=<1C1(C1(L))><L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=True)}] f6f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F6.f6f1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} f6t :: Integer -> Integer -> Integer -[GblId, - Arity=2, - Str=<S,1*U><S,U>, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True) - Tmpl= GHC.Num.Integer.integerAdd}] +[GblId, Arity=2, Str=<1L><SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}] f6t = GHC.Num.Integer.integerAdd -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity07.stderr b/testsuite/tests/arityanal/should_compile/Arity07.stderr index 3a1852e017..eeb02d8e5c 100644 --- a/testsuite/tests/arityanal/should_compile/Arity07.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity07.stderr @@ -1,23 +1,15 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 8, types: 11, coercions: 0, joins: 0/0} +Result size of Tidy Core = {terms: 8, types: 9, coercions: 0, joins: 0/0} --- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0} +-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} f7f :: forall {p}. p -> p -[GblId, - Arity=1, - Str=<S,1*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) (x [Occ=Once1] :: p) -> x}] +[GblId, Arity=1, Str=<1L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] f7f = \ (@p) (x :: p) -> x -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} f7g :: Integer -> Integer -> Integer -[GblId, - Arity=2, - Str=<S,1*U><S,U>, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True) - Tmpl= GHC.Num.Integer.integerAdd}] +[GblId, Arity=2, Str=<1L><SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}] f7g = GHC.Num.Integer.integerAdd -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity08.stderr b/testsuite/tests/arityanal/should_compile/Arity08.stderr index 1f2f6c0fa4..406b5c6bdf 100644 --- a/testsuite/tests/arityanal/should_compile/Arity08.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity08.stderr @@ -4,15 +4,7 @@ Result size of Tidy Core = {terms: 23, types: 20, coercions: 0, joins: 0/0} -- RHS size: {terms: 20, types: 11, coercions: 0, joins: 0/0} f8f :: forall {p}. Num p => Bool -> p -> p -> p -[GblId, - Arity=4, - Str=<L,U(C(C1(U)),A,1*C1(C1(U)),A,A,A,A)><S,1*U><L,U><L,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= \ (@p) ($dNum :: Num p) (b [Occ=Once1!] :: Bool) (x :: p) (y [Occ=Once2] :: p) -> - case b of { - False -> + @p $dNum (+ @p $dNum x y) (* @p $dNum x x); - True -> y - }}] +[GblId, Arity=4, Str=<LP(LCL(C1(L)),A,MCM(C1(L)),A,A,A,A)><1L><L><L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [90 30 0 0] 140 0}] f8f = \ (@p) ($dNum :: Num p) (b :: Bool) (x :: p) (y :: p) -> case b of { diff --git a/testsuite/tests/arityanal/should_compile/Arity10.stderr b/testsuite/tests/arityanal/should_compile/Arity10.stderr index 3c527026ec..7b01f7680f 100644 --- a/testsuite/tests/arityanal/should_compile/Arity10.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity10.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 28, types: 34, coercions: 0, joins: 0/0} +Result size of Tidy Core = {terms: 28, types: 32, coercions: 0, joins: 0/0} -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F10.f10f3 :: Integer @@ -17,23 +17,19 @@ F10.f10f1 :: Integer [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] F10.f10f1 = 3 --- RHS size: {terms: 8, types: 8, coercions: 0, joins: 0/0} +-- RHS size: {terms: 8, types: 7, coercions: 0, joins: 0/0} f10f :: forall {a}. (Integer -> Integer -> a) -> (a, Integer -> a) [GblId, Arity=1, - Str=<L,C(U)>, - Cpr=m1, + Str=<L>, + Cpr=1, 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= \ (@a) (h :: Integer -> Integer -> a) -> (h F10.f10f3 F10.f10f2, h F10.f10f1)}] f10f = \ (@a) (h :: Integer -> Integer -> a) -> (h F10.f10f3 F10.f10f2, h F10.f10f1) -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} f10g :: Integer -> Integer -> Integer -[GblId, - Arity=2, - Str=<S,1*U><S,U>, - Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True) - Tmpl= GHC.Num.Integer.integerAdd}] +[GblId, Arity=2, Str=<1L><SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}] f10g = GHC.Num.Integer.integerAdd -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} @@ -43,11 +39,7 @@ f10x1 = F10.f10f1 -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} f10x2 :: Integer -> Integer -[GblId, - Arity=1, - Str=<S,U>, - 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] :: Integer) -> GHC.Num.Integer.integerAdd F10.f10f1 eta}] +[GblId, Arity=1, Str=<SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}] f10x2 = GHC.Num.Integer.integerAdd F10.f10f1 -- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity11.stderr b/testsuite/tests/arityanal/should_compile/Arity11.stderr index 92c7649dd2..da35b40ab8 100644 --- a/testsuite/tests/arityanal/should_compile/Arity11.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity11.stderr @@ -1,6 +1,6 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 129, types: 94, coercions: 0, joins: 0/5} +Result size of Tidy Core = {terms: 129, types: 98, coercions: 0, joins: 0/5} -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F11.fib1 :: Integer @@ -33,50 +33,50 @@ F11.f11_fib } end Rec } --- RHS size: {terms: 52, types: 26, coercions: 0, joins: 0/5} -F11.$wfib [InlPrag=[2]] :: forall {a1} {a2}. (a1 -> a1 -> Bool) -> (Num a1, Num a2) => a1 -> a2 +-- RHS size: {terms: 52, types: 27, coercions: 0, joins: 0/5} +F11.$wfib [InlPrag=[2]] :: forall {t} {a}. (t -> t -> Bool) -> (Num t, Num a) => t -> a [GblId, Arity=4, Str=<SCS(C1(L))><LP(A,LCL(C1(L)),A,A,A,A,L)><LP(LCL(C1(L)),A,A,A,A,A,MCM(L))><L>, 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) (@a1) (ww :: a -> a -> Bool) (w :: Num a) (w1 :: Num a1) (w2 :: a) -> + = \ (@t) (@a) (ww :: t -> t -> Bool) (w :: Num t) (w1 :: Num a) (w2 :: t) -> let { - lvl :: a + lvl :: t [LclId] - lvl = fromInteger @a w F11.fib3 } in + lvl = fromInteger @t w F11.fib3 } in let { - lvl1 :: a + lvl1 :: t [LclId] - lvl1 = fromInteger @a w F11.fib2 } in + lvl1 = fromInteger @t w F11.fib2 } in let { - lvl2 :: a1 + lvl2 :: a [LclId] - lvl2 = fromInteger @a1 w1 F11.fib3 } in + lvl2 = fromInteger @a w1 F11.fib3 } in let { - lvl3 :: a + lvl3 :: t [LclId] - lvl3 = fromInteger @a w F11.fib1 } in + lvl3 = fromInteger @t w F11.fib1 } in letrec { - fib4 [Occ=LoopBreaker, Dmd=SCS(L)] :: a -> a1 + fib4 [Occ=LoopBreaker, Dmd=SCS(L)] :: t -> a [LclId, Arity=1, Str=<L>, Unf=OtherCon []] fib4 - = \ (ds :: a) -> + = \ (ds :: t) -> case ww ds lvl3 of { False -> case ww ds lvl of { - False -> + @a1 w1 (fib4 (- @a w ds lvl)) (fib4 (- @a w ds lvl1)); + False -> + @a w1 (fib4 (- @t w ds lvl)) (fib4 (- @t w ds lvl1)); True -> lvl2 }; True -> lvl2 }; } in fib4 w2 --- RHS size: {terms: 14, types: 19, coercions: 0, joins: 0/0} -fib [InlPrag=[2]] :: forall {a1} {a2}. (Eq a1, Num a1, Num a2) => a1 -> a2 +-- RHS size: {terms: 14, types: 20, coercions: 0, joins: 0/0} +fib [InlPrag=[2]] :: forall {t} {a}. (Eq t, Num t, Num a) => t -> a [GblId, Arity=4, Str=<1P(SCS(C1(L)),A)><LP(A,LCL(C1(L)),A,A,A,A,L)><LP(LCL(C1(L)),A,A,A,A,A,L)><L>, 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) (@a1) (w [Occ=Once1!] :: Eq a) (w1 [Occ=Once1] :: Num a) (w2 [Occ=Once1] :: Num a1) (w3 [Occ=Once1] :: a) -> case w of { GHC.Classes.C:Eq ww1 [Occ=Once1] _ [Occ=Dead] -> F11.$wfib @a @a1 ww1 w1 w2 w3 }}] -fib = \ (@a) (@a1) (w :: Eq a) (w1 :: Num a) (w2 :: Num a1) (w3 :: a) -> case w of { GHC.Classes.C:Eq ww1 ww2 -> F11.$wfib @a @a1 ww1 w1 w2 w3 } + Tmpl= \ (@t) (@a) (w [Occ=Once1!] :: Eq t) (w1 [Occ=Once1] :: Num t) (w2 [Occ=Once1] :: Num a) (w3 [Occ=Once1] :: t) -> case w of { GHC.Classes.C:Eq ww [Occ=Once1] _ [Occ=Dead] -> F11.$wfib @t @a ww w1 w2 w3 }}] +fib = \ (@t) (@a) (w :: Eq t) (w1 :: Num t) (w2 :: Num a) (w3 :: t) -> case w of { GHC.Classes.C:Eq ww ww1 -> F11.$wfib @t @a ww w1 w2 w3 } -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F11.f3 :: Integer @@ -90,20 +90,12 @@ F11.f11_x = F11.f11_fib F11.f3 -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} F11.f11f1 :: Integer -> Integer -[GblId, - Arity=1, - Str=<SL>, - 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}] +[GblId, Arity=1, Str=<SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 30 0}] F11.f11f1 = \ (y :: Integer) -> GHC.Num.Integer.integerAdd F11.f11_x y -- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} f11f :: forall {p}. p -> Integer -> Integer -[GblId, - Arity=2, - Str=<A><SL>, - 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}] +[GblId, Arity=2, Str=<A><SL>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] f11f = \ (@p) _ [Occ=Dead] -> F11.f11f1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/Arity14.stderr b/testsuite/tests/arityanal/should_compile/Arity14.stderr index d2a9716d04..ee54686a29 100644 --- a/testsuite/tests/arityanal/should_compile/Arity14.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity14.stderr @@ -1,14 +1,10 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 56, types: 81, coercions: 0, joins: 0/3} +Result size of Tidy Core = {terms: 56, types: 87, coercions: 0, joins: 0/3} --- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0} +-- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0} F14.f1 :: forall {t}. t -> t -[GblId, - Arity=1, - Str=<1L>, - 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}] +[GblId, Arity=1, Str=<1L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] F14.f1 = \ (@t) (y :: t) -> y -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} @@ -16,7 +12,7 @@ F14.f2 :: Integer [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] F14.f2 = 1 --- RHS size: {terms: 35, types: 23, coercions: 0, joins: 0/3} +-- RHS size: {terms: 35, types: 24, coercions: 0, joins: 0/3} F14.$wf14 [InlPrag=[2]] :: forall {t}. (t -> t -> Bool) -> Num t => t -> t -> t -> t [GblId, Arity=4, Str=<SCS(C1(L))><LP(LCL(C1(L)),A,A,A,A,A,MCM(L))><L><L>, 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 @@ -41,14 +37,14 @@ F14.$wf14 }; } in f3 w1 w2 --- RHS size: {terms: 13, types: 33, coercions: 0, joins: 0/0} +-- RHS size: {terms: 13, types: 34, coercions: 0, joins: 0/0} f14 [InlPrag=[2]] :: forall {t}. (Ord t, Num t) => t -> t -> t -> t [GblId, Arity=4, Str=<1P(A,A,SCS(C1(L)),A,A,A,A,A)><LP(LCL(C1(L)),A,A,A,A,A,L)><L><L>, 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 } + 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] ww2 [Occ=Once1] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] -> F14.$wf14 @t ww2 w1 w2 w3 }}] +f14 = \ (@t) (w :: Ord t) (w1 :: Num t) (w2 :: t) (w3 :: t) -> case w of { GHC.Classes.C:Ord ww ww1 ww2 ww3 ww4 ww5 ww6 ww7 -> F14.$wf14 @t ww2 w1 w2 w3 } diff --git a/testsuite/tests/arityanal/should_compile/Arity15.stderr b/testsuite/tests/arityanal/should_compile/Arity15.stderr index 4034be6198..689939ffef 100644 --- a/testsuite/tests/arityanal/should_compile/Arity15.stderr +++ b/testsuite/tests/arityanal/should_compile/Arity15.stderr @@ -1,28 +1,20 @@ ==================== Tidy Core ==================== -Result size of Tidy Core = {terms: 14, types: 14, coercions: 0, joins: 0/0} +Result size of Tidy Core = {terms: 14, types: 12, coercions: 0, joins: 0/0} -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} F15.f15f1 :: Integer [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}] F15.f15f1 = 1 --- RHS size: {terms: 4, types: 4, coercions: 0, joins: 0/0} +-- RHS size: {terms: 4, types: 3, coercions: 0, joins: 0/0} f15f :: forall {t}. (Integer -> t) -> t -[GblId, - Arity=1, - Str=<C(S),1*C1(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= \ (@t) (h [Occ=Once1!] :: Integer -> t) -> h F15.f15f1}] +[GblId, Arity=1, Str=<1C1(L)>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}] f15f = \ (@t) (h :: Integer -> t) -> h F15.f15f1 -- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0} f15g :: Integer -> Integer -[GblId, - Arity=1, - Str=<S,1*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= \ (x [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd x F15.f15f1}] +[GblId, Arity=1, Str=<1L>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 30 0}] f15g = \ (x :: Integer) -> GHC.Num.Integer.integerAdd x F15.f15f1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/arityanal/should_compile/T18793.stderr b/testsuite/tests/arityanal/should_compile/T18793.stderr index d1a6b102a9..ca73ba7157 100644 --- a/testsuite/tests/arityanal/should_compile/T18793.stderr +++ b/testsuite/tests/arityanal/should_compile/T18793.stderr @@ -12,10 +12,10 @@ stuff [InlPrag=[final]] :: Int -> [Int] [GblId, Arity=1, Str=<LP(L)>, - Cpr=m2, + Cpr=2, 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 }}] -stuff = \ (w :: Int) -> case T18793.$wstuff w of { (# ww1, ww2 #) -> GHC.Types.: @Int ww1 ww2 } + Tmpl= \ (w [Occ=Once1] :: Int) -> case T18793.$wstuff w of { (# ww [Occ=Once1], ww1 [Occ=Once1] #) -> GHC.Types.: @Int ww ww1 }}] +stuff = \ (w :: Int) -> case T18793.$wstuff w of { (# ww, ww1 #) -> GHC.Types.: @Int ww ww1 } Rec { -- RHS size: {terms: 23, types: 11, coercions: 0, joins: 0/0} @@ -40,10 +40,10 @@ T18793.f_go1 [InlPrag=[2]] :: [Int] -> Int -> Int [GblId, Arity=2, Str=<1L><1P(L)>, - Cpr=m1, + Cpr=1, 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 } }}] -T18793.f_go1 = \ (w :: [Int]) (w1 :: Int) -> case w1 of { GHC.Types.I# ww1 -> case T18793.$wgo1 w ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 } } + Tmpl= \ (w [Occ=Once1] :: [Int]) (w1 [Occ=Once1!] :: Int) -> case w1 of { GHC.Types.I# ww [Occ=Once1] -> case T18793.$wgo1 w ww of ww1 [Occ=Once1] { __DEFAULT -> GHC.Types.I# ww1 } }}] +T18793.f_go1 = \ (w :: [Int]) (w1 :: Int) -> case w1 of { GHC.Types.I# ww -> case T18793.$wgo1 w ww of ww1 { __DEFAULT -> GHC.Types.I# ww1 } } -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} T18793.f2 :: Int @@ -53,16 +53,11 @@ T18793.f2 = GHC.Types.I# 1# -- RHS size: {terms: 7, types: 10, coercions: 0, joins: 0/0} T18793.f1 :: [Int] [GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 40 10}] -T18793.f1 = case T18793.$wstuff T18793.f2 of { (# ww1, ww2 #) -> GHC.Types.: @Int ww1 ww2 } +T18793.f1 = case T18793.$wstuff T18793.f2 of { (# ww, ww1 #) -> GHC.Types.: @Int ww ww1 } -- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} f :: Int -> Int -[GblId, - Arity=1, - Str=<1P(L)>, - 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}] +[GblId, Arity=1, Str=<1P(L)>, Cpr=1, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}] f = T18793.f_go1 T18793.f1 diff --git a/testsuite/tests/codeGen/should_compile/debug.stdout b/testsuite/tests/codeGen/should_compile/debug.stdout index 25df0c258f..3dca62a419 100644 --- a/testsuite/tests/codeGen/should_compile/debug.stdout +++ b/testsuite/tests/codeGen/should_compile/debug.stdout @@ -18,7 +18,6 @@ src<debug.hs:4:9> src<debug.hs:5:21-29> src<debug.hs:5:9-29> src<debug.hs:6:1-21> -src<debug.hs:6:16-21> == CBE == src<debug.hs:4:9> 89 diff --git a/testsuite/tests/driver/inline-check.stderr b/testsuite/tests/driver/inline-check.stderr index 953e101315..40b5b59d19 100644 --- a/testsuite/tests/driver/inline-check.stderr +++ b/testsuite/tests/driver/inline-check.stderr @@ -23,6 +23,9 @@ Considering inlining: foo some_benefit False is exp: True is work-free: True - guidance ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False) + guidance IF_ARGS [0] 30 0 + case depth = 0 + depth based penalty = 0 + discounted size = 20 ANSWER = NO Inactive unfolding: foo1 diff --git a/testsuite/tests/numeric/should_compile/T14465.stdout b/testsuite/tests/numeric/should_compile/T14465.stdout index 00d3101eb4..7c2e846101 100644 --- a/testsuite/tests/numeric/should_compile/T14465.stdout +++ b/testsuite/tests/numeric/should_compile/T14465.stdout @@ -75,10 +75,8 @@ plusOne :: Natural -> Natural [GblId, Arity=1, Str=<1L>, - 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= \ (n [Occ=Once1] :: Natural) -> naturalAdd n M.minusOne1}] + Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, + WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 30 0}] plusOne = \ (n :: Natural) -> naturalAdd n M.minusOne1 -- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} diff --git a/testsuite/tests/simplCore/should_compile/T17901.stdout b/testsuite/tests/simplCore/should_compile/T17901.stdout index 3017c7a4a6..15a4d4df66 100644 --- a/testsuite/tests/simplCore/should_compile/T17901.stdout +++ b/testsuite/tests/simplCore/should_compile/T17901.stdout @@ -1,14 +1,6 @@ - (wombat1 [Occ=Once3!] :: T -> t) - A -> wombat1 T17901.A; - B -> wombat1 T17901.B; - C -> wombat1 T17901.C = \ (@t) (wombat1 :: T -> t) (x :: T) -> case x of wild { __DEFAULT -> wombat1 wild } - (wombat2 [Occ=Once1!] :: S -> t) - case x of wild [Occ=Once1] { __DEFAULT -> wombat2 wild }}] = \ (@t) (wombat2 :: S -> t) (x :: S) -> case x of wild { __DEFAULT -> wombat2 wild } - (wombat3 [Occ=Once1!] :: W -> t) - case x of wild [Occ=Once1] { __DEFAULT -> wombat3 wild }}] = \ (@t) (wombat3 :: W -> t) (x :: W) -> case x of wild { __DEFAULT -> wombat3 wild } diff --git a/testsuite/tests/simplCore/should_compile/T4201.stdout b/testsuite/tests/simplCore/should_compile/T4201.stdout index ef54a0da7c..383d652757 100644 --- a/testsuite/tests/simplCore/should_compile/T4201.stdout +++ b/testsuite/tests/simplCore/should_compile/T4201.stdout @@ -1,4 +1,4 @@ + lift :: Foo -> T [HasNoCafRefs, LambdaFormInfo: LFReEntrant 1, Arity: 1, Strictness: <1L>, - Unfolding: InlineRule (0, True, True) - bof `cast` (Sym (N:Foo[0]) %<'Many>_N ->_R <T>_R)] + Unfolding: (bof `cast` (Sym (N:Foo[0]) %<'Many>_N ->_R <T>_R))] diff --git a/testsuite/tests/simplCore/should_compile/T5658b.stdout b/testsuite/tests/simplCore/should_compile/T5658b.stdout index b8626c4cff..0cfbf08886 100644 --- a/testsuite/tests/simplCore/should_compile/T5658b.stdout +++ b/testsuite/tests/simplCore/should_compile/T5658b.stdout @@ -1 +1 @@ -4 +2 diff --git a/testsuite/tests/warnings/should_compile/T16282/T16282.stderr b/testsuite/tests/warnings/should_compile/T16282/T16282.stderr index b25c4c3563..e0da0ab80a 100644 --- a/testsuite/tests/warnings/should_compile/T16282/T16282.stderr +++ b/testsuite/tests/warnings/should_compile/T16282/T16282.stderr @@ -7,7 +7,6 @@ T16282.hs: warning: [-Wall-missed-specialisations] Probable fix: add INLINABLE pragma on ‘T16282A.$wmyMapM_’ T16282.hs: warning: [-Wall-missed-specialisations] - Could not specialise imported function ‘T16282A.$w$cshowsPrec’ - when specialising ‘T16282A.$fShowMyMap_$cshowsPrec’ - Probable fix: add INLINABLE pragma on ‘T16282A.$w$cshowsPrec’ -Linking T16282.exe ... + Could not specialise imported function ‘GHC.Show.$fShow(,)_$cshowList’ + Probable fix: add INLINABLE pragma on ‘GHC.Show.$fShow(,)_$cshowList’ + |