Commit 451455fd authored by Sebastian Graf's avatar Sebastian Graf Committed by Marge Bot

Testsuite: Add dead arity analysis tests

We didn't seem to test these old tests at all, judging from their
expected output.
parent 6b3eb06a
Pipeline #26447 canceled with stages
This diff is collapsed.
This diff is collapsed.
TOP=../..
include $(TOP)/mk/boilerplate.mk
include $(TOP)/mk/test.mk
==================== IdInfo ====================
lvl_s1yb :: GHC.Base.Int :: [*
Str: DmdType m]
F0.f0 :: GHC.Base.Int
-> GHC.Base.Int
-> GHC.Base.Int
-> GHC.Base.Int :: [Arity 3
0 -> 0 -> 0 -> *
Str: DmdType U(L)LLm]
***Arity is changed: h1{v a19i} 3 2
==================== IdInfo ====================
lvl_s1AI :: GHC.Num.Integer -> GHC.Num.Integer :: [Arity 1
0 -> *
Str: DmdType S]
lit_a1hu :: GHC.Num.Integer :: [*
Str: DmdType]
lit_a1ho :: GHC.Num.Integer :: [*
Str: DmdType]
h1_a19i :: GHC.Num.Integer
-> GHC.Num.Integer
-> GHC.Num.Integer
-> GHC.Num.Integer :: [Arity 2
0 -> 0 -> 0 -> *
Str: DmdType SS]
F1.f1 :: GHC.Num.Integer :: [*
Str: DmdType]
***Arity is changed as occur many times: F10.f10f{v r155} 2 1
==================== IdInfo ====================
lit_s1Ll :: GHC.Num.Integer :: [*
Str: DmdType]
lit_s1Lj :: GHC.Num.Integer :: [*
Str: DmdType]
lit_s1Lh :: GHC.Num.Integer :: [*
Str: DmdType]
F10.f10g :: GHC.Num.Integer -> GHC.Num.Integer -> GHC.Num.Integer :: [Arity 2
*
Str: DmdType SS]
F10.f10f :: forall a_a1fu.
(GHC.Num.Integer -> GHC.Num.Integer -> a_a1fu)
-> (a_a1fu, GHC.Num.Integer -> a_a1fu) :: [Arity 1
1 -> *
Str: DmdType Lm]
F10.f10h :: (GHC.Num.Integer, GHC.Num.Integer -> GHC.Num.Integer) :: [*
Str: DmdType]
F10.f10x1 :: GHC.Num.Integer :: [*
Str: DmdType]
F10.f10x2 :: GHC.Num.Integer -> GHC.Num.Integer :: [*
Str: DmdType]
F10.f10 :: GHC.Num.Integer :: [*
Str: DmdType]
***expensive e1 0
***expensive e1 0
***expensive e1 0
***expensive e1 0
***expensive e1 0
==================== IdInfo ====================
lvl_s1Fz :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1Fv :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1Fu :: GHC.Num.Integer :: [*
Str: DmdType]
fib_s1Fj :: GHC.Num.Integer -> GHC.Num.Integer :: [Arity 1
0 -> *
Str: DmdType S]
lvl_s1IP :: GHC.Num.Integer :: [*]
x_s1Fr :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1IQ :: GHC.Num.Integer :: [*]
a_s1rF :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1IR :: GHC.Num.Integer :: [*]
a_s1rE :: GHC.Num.Integer :: [*
Str: DmdType]
F11.f11 :: (GHC.Num.Integer, GHC.Num.Integer) :: [*
Str: DmdType m]
F11.f11f :: forall t_a1gd.
t_a1gd -> GHC.Num.Integer -> GHC.Num.Integer :: [Arity 2
T
Str: DmdType AS]
F11.fib :: forall a_a19x a_a1eN.
(GHC.Num.Num a_a1eN, GHC.Num.Num a_a19x) =>
a_a19x -> a_a1eN :: [Arity 2
0 -> 0 -> 0 -> *
Str: DmdType LL
RULES: "SPEC F11.fib" __forall {$dNum_X1Fo :: {GHC.Num.Num GHC.Num.Integer}
$dNum_X1Fq :: {GHC.Num.Num GHC.Num.Integer}}
F11.fib @ GHC.Num.Integer
@ GHC.Num.Integer
$dNum_X1Fo
$dNum_X1Fq
= fib_s1Fj ;]
==================== IdInfo ====================
lvl_s1Bx :: GHC.Num.Integer :: [*]
lvl_s1By :: GHC.Num.Integer :: [*]
F12.f12 :: GHC.Num.Integer :: [*
Str: DmdType]
***expensive e1 0
==================== IdInfo ====================
lvl_s1AR :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1AQ :: GHC.Num.Integer :: [*
Str: DmdType]
F13.f13 :: forall a_a19A a_a1gc.
(GHC.Num.Num a_a19A,
GHC.Base.Ord a_a19A,
GHC.Num.Num a_a1gc,
GHC.Num.Num (a_a19A -> a_a1gc -> a_a1gc)) =>
a_a19A -> a_a1gc -> a_a1gc -> a_a1gc :: [Arity 6
0 -> 0 -> 0 -> 0 -> 0 -> 0 -> 0 -> *
Str: DmdType LLLLLL]
***expensive e1 0
***Arity is changed as occur many times: F14.f14{v r16A} 4 0
==================== IdInfo ====================
lvl_s1zz :: forall a_a19p. a_a19p -> a_a19p :: [Arity 1
0 -> *
Str: DmdType S]
lvl_s1zy :: GHC.Num.Integer :: [*
Str: DmdType]
$wf14_s1Ak :: forall a_a19p.
(a_a19p -> a_a19p -> GHC.Base.Bool)
-> {GHC.Num.Num a_a19p}
-> a_a19p
-> a_a19p
-> a_a19p
-> a_a19p :: [Arity 4
2 -> 0 -> 0 -> 0 -> 0 -> *
Str: DmdType C(C(S))LLL]
F14.f14 :: forall a_a19p.
(GHC.Base.Ord a_a19p, GHC.Num.Num a_a19p) =>
a_a19p -> a_a19p -> a_a19p -> a_a19p :: [Arity 4
T
Worker $wf14_s1Ak
Str: DmdType U(AAC(C(S))AAAAA)LLL]
==================== IdInfo ====================
lit_s1zs :: GHC.Num.Integer :: [*
Str: DmdType]
F15.f15f :: forall t_a1fm. (GHC.Num.Integer -> t_a1fm) -> t_a1fm :: [Arity 1
1 -> *
Str: DmdType C(S)]
F15.f15g :: GHC.Num.Integer -> GHC.Num.Integer :: [Arity 1
0 -> *
Str: DmdType S]
F15.f15 :: GHC.Num.Integer :: [*
Str: DmdType]
==================== IdInfo ====================
lit_s1Bh :: GHC.Num.Integer :: [*
Str: DmdType]
F2.f2f :: forall t_a19s t_a19u.
(t_a19u -> GHC.Num.Integer -> t_a19s) -> t_a19u -> t_a19s :: [Arity 2
2 -> 0 -> *
Str: DmdType C(C(S))L]
lit_a1i8 :: GHC.Num.Integer :: [*
Str: DmdType]
g_a1fp :: GHC.Num.Integer -> GHC.Num.Integer -> GHC.Num.Integer :: [Arity 2
0 -> 0 -> *
Str: DmdType SS]
lvl_s1DV :: GHC.Num.Integer :: [*]
F2.f2 :: GHC.Num.Integer :: [*
Str: DmdType]
***Arity is changed as occur many times: F3.f3{v r157} 1 0
==================== IdInfo ====================
$wfac_s1Bz :: GHC.Prim.Int# -> GHC.Prim.Int# :: [Arity 1
0 -> *
Str: DmdType L]
F3.fac :: GHC.Base.Int -> GHC.Base.Int :: [Arity 1
T
Worker $wfac_s1Bz
Str: DmdType U(L)m]
F3.f3 :: GHC.Base.Int -> GHC.Base.Int :: [Arity 1
T
Str: DmdType U(L)m]
***Arity is changed as occur many times: F4.f4h{v r155} 2 0
==================== IdInfo ====================
F4.f4g :: GHC.Base.Int -> GHC.Base.Int :: [Arity 1
0 -> *
Str: DmdType U(L)m]
lvl_s1Cq :: GHC.Base.Int :: [*]
$wf4h_s1C9 :: (GHC.Base.Int -> GHC.Base.Int)
-> GHC.Prim.Int#
-> GHC.Base.Int :: [Arity 2
0 -> 0 -> *
Str: DmdType C(S)L]
F4.f4h :: (GHC.Base.Int -> GHC.Base.Int)
-> GHC.Base.Int
-> GHC.Base.Int :: [Arity 2
T
Worker $wf4h_s1C9
Str: DmdType C(S)U(L)]
F4.f4 :: GHC.Base.Int :: [*
Str: DmdType]
==================== IdInfo ====================
lvl_s1B7 :: GHC.Num.Integer :: [*
Str: DmdType]
$sf5h_s1B2 :: forall t_a1gj.
(t_a1gj -> GHC.Num.Integer)
-> t_a1gj
-> (t_a1gj -> GHC.Num.Integer)
-> GHC.Num.Integer :: [Arity 3
1 -> 0 -> 1 -> *
Str: DmdType C(S)LC(S)]
$sf5g_s1B1 :: forall t_a1fy.
(t_a1fy -> GHC.Num.Integer) -> t_a1fy -> GHC.Num.Integer :: [Arity 2
1 -> 0 -> *
Str: DmdType C(S)L]
eta_s1or :: GHC.Num.Integer :: [*
Str: DmdType]
F5.f5h :: forall a_a1gd t_a1gj.
(GHC.Num.Num a_a1gd) =>
(t_a1gj -> a_a1gd) -> t_a1gj -> (t_a1gj -> a_a1gd) -> a_a1gd :: [Arity 4
0 -> 1 -> 0 -> 1 -> *
Str: DmdType U(AAC(C(S))AAAAAL)LLL
RULES: "SPEC F5.f5h" __forall {@ t_a1gj
$dNum_X1Bl :: {GHC.Num.Num GHC.Num.Integer}}
F5.f5h @ GHC.Num.Integer
@ t_a1gj
$dNum_X1Bl
= $sf5h_s1B2
@ t_a1gj ;]
F5.f5g :: forall t_a1fy a_a1fB.
(GHC.Num.Num a_a1fB) =>
(t_a1fy -> a_a1fB) -> t_a1fy -> a_a1fB :: [Arity 3
0 -> 1 -> 0 -> *
Str: DmdType U(AAC(C(S))AAAAAL)LL
RULES: "SPEC F5.f5g" __forall {@ t_a1fy
$dNum_X1Bk :: {GHC.Num.Num GHC.Num.Integer}}
F5.f5g @ t_a1fy @ GHC.Num.Integer $dNum_X1Bk
= $sf5g_s1B1 @ t_a1fy ;]
F5.f5y :: GHC.Num.Integer -> GHC.Num.Integer :: [Arity 1
0 -> *
Str: DmdType S]
lvl_s1DK :: GHC.Num.Integer :: [*]
lvl_s1DL :: GHC.Num.Integer :: [*]
F5.f5 :: GHC.Num.Integer :: [*
Str: DmdType]
==================== IdInfo ====================
lit_s1zR :: GHC.Num.Integer :: [*
Str: DmdType]
lvl_s1C2 :: GHC.Num.Integer :: [*]
F6.f6 :: GHC.Num.Integer :: [*
Str: DmdType]
F6.f6t :: GHC.Num.Integer -> GHC.Num.Integer -> GHC.Num.Integer :: [Arity 2
*
Str: DmdType SS]
F6.f6f :: forall t_a1fp t_a1fr.
(t_a1fr -> GHC.Num.Integer -> t_a1fp) -> t_a1fr -> t_a1fp :: [Arity 2
2 -> 0 -> *
Str: DmdType C(C(S))L]
==================== IdInfo ====================
lvl_s1BI :: GHC.Num.Integer :: [*]
lvl_s1BJ :: GHC.Num.Integer :: [*]
F7.f7 :: GHC.Num.Integer :: [*
Str: DmdType]
F7.f7g :: GHC.Num.Integer -> GHC.Num.Integer -> GHC.Num.Integer :: [Arity 2
*
Str: DmdType SS]
F7.f7f :: forall t_a1fh. t_a1fh -> t_a1fh :: [Arity 1
0 -> *
Str: DmdType S]
==================== IdInfo ====================
$sf8f_s1zR :: GHC.Base.Bool
-> GHC.Num.Integer
-> GHC.Num.Integer
-> GHC.Num.Integer :: [Arity 3
0 -> 0 -> 0 -> *
Str: DmdType SLS]
F8.f8 :: GHC.Num.Integer :: [*
Str: DmdType]
F8.f8f :: forall a_a1ex.
(GHC.Num.Num a_a1ex) =>
GHC.Base.Bool -> a_a1ex -> a_a1ex -> a_a1ex :: [Arity 4
0 -> 0 -> 0 -> 0 -> *
Str: DmdType LSLL
RULES: "SPEC F8.f8f" __forall {$dNum_X1zY :: {GHC.Num.Num GHC.Num.Integer}}
F8.f8f @ GHC.Num.Integer $dNum_X1zY
= $sf8f_s1zR ;]
==================== IdInfo ====================
lit_a1hg :: GHC.Num.Integer :: [*
Str: DmdType]
lit_a1he :: GHC.Num.Integer :: [*
Str: DmdType]
lit_a1h9 :: GHC.Num.Integer :: [*
Str: DmdType]
f_a19b :: GHC.Num.Integer -> GHC.Num.Integer :: [Arity 1
0 -> *
Str: DmdType S]
F9.f91 :: GHC.Num.Integer :: [*
Str: DmdType]
***Arity is changed as occur in Lambda: polyzufail_s1tt{v} 1 0
==================== IdInfo ====================
poly_fail_s1tt :: forall a_a175. [a_a175] :: [*
Str: DmdType b]
Prim.zipWith2 :: forall a_a16Z a_a171 a_a175.
(a_a16Z -> a_a171 -> a_a175) -> [a_a16Z] -> [a_a171] -> [a_a175] :: [Arity 3
0 -> 0 -> 0 -> *
Str: DmdType LSS]
Prim.map2 :: forall a_a17C a_a17G.
(a_a17C -> a_a17G) -> [a_a17C] -> [a_a17G] :: [Arity 2
0 -> 0 -> *
Str: DmdType LS]
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 29, types: 15, coercions: 0, joins: 0/0}
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
F0.f1 :: Int
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 10}]
F0.f1 = GHC.Types.I# 1#
-- RHS size: {terms: 25, types: 10, coercions: 0, joins: 0/0}
f0 :: Int -> Int -> Int -> Int
[GblId,
Arity=3,
Str=<S,1*U(U)><L,1*U(U)><L,1*U(U)>,
Cpr=m1,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=False)
Tmpl= \ (x [Occ=Once1!] :: Int) (y [Occ=Once1!] :: Int) (eta [Occ=Once1!] :: Int) ->
case x of { GHC.Types.I# x1 ->
case GHC.Prim.># x1 0# of {
__DEFAULT -> F0.f1;
1# -> case y of { GHC.Types.I# y1 [Occ=Once1] -> case eta of { GHC.Types.I# y2 [Occ=Once1] -> GHC.Types.I# (GHC.Prim.+# (GHC.Prim.+# x1 y1) y2) } }
}
}}]
f0
= \ (x :: Int) (y :: Int) (eta :: Int) ->
case x of { GHC.Types.I# x1 ->
case GHC.Prim.># x1 0# of {
__DEFAULT -> F0.f1;
1# -> case y of { GHC.Types.I# y1 -> case eta of { GHC.Types.I# y2 -> GHC.Types.I# (GHC.Prim.+# (GHC.Prim.+# x1 y1) y2) } }
}
}
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 61, types: 45, coercions: 0, joins: 0/0}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F1.f2 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F1.f2 = 1
Rec {
-- RHS size: {terms: 18, types: 4, coercions: 0, joins: 0/0}
F1.f1_h1 [Occ=LoopBreaker] :: Integer -> Integer -> Integer -> Integer
[GblId, Arity=3, Str=<S,U><S,U><S,U>, Unf=OtherCon []]
F1.f1_h1
= \ (n :: Integer) (x :: Integer) (eta :: Integer) ->
case GHC.Num.Integer.integerCompare x n of {
__DEFAULT -> eta;
LT -> F1.f1_h1 n (GHC.Num.Integer.integerAdd x F1.f2) (GHC.Num.Integer.integerAdd x eta)
}
end Rec }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F1.f3 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F1.f3 = 5
-- RHS size: {terms: 4, types: 0, coercions: 0, joins: 0/0}
f1 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 40 0}]
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=<S,1*U><S,U><S,U><S,U><S,U>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=5,unsat_ok=True,boring_ok=False)
Tmpl= \ (x1 [Occ=Once1] :: Integer) (x2 [Occ=Once1] :: Integer) (x3 [Occ=Once1] :: Integer) (x4 [Occ=Once1] :: Integer) (x5 [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd x1 x2) x3) x4) x5}]
g = \ (x1 :: Integer) (x2 :: Integer) (x3 :: Integer) (x4 :: Integer) (x5 :: Integer) -> GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd (GHC.Num.Integer.integerAdd x1 x2) x3) x4) x5
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
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: 9, coercions: 0, joins: 0/0}
s :: forall {t1} {t2}. Num t1 => (t1 -> t2) -> t2
[GblId,
Arity=2,
Str=<L,1*U(A,A,A,A,A,A,1*C1(U))><C(S),1*C1(U)>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (@t) (@t1) ($dNum [Occ=Once1] :: Num t) (f [Occ=Once1!] :: t -> t1) -> f (fromInteger @t $dNum F1.s1)}]
s = \ (@t) (@t1) ($dNum :: Num t) (f :: t -> t1) -> f (fromInteger @t $dNum F1.s1)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F1.h1 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F1.h1 = 24
-- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0}
h :: 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=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (x5 [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd F1.h1 x5}]
h = \ (x5 :: Integer) -> GHC.Num.Integer.integerAdd F1.h1 x5
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 35, types: 27, coercions: 0, joins: 0/0}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F2.f1 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F2.f1 = 0
-- RHS size: {terms: 7, types: 8, coercions: 0, joins: 0/0}
f2f :: 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 F2.f1}]
f2f = \ (@t) (@t1) (h :: t -> Integer -> t1) (x :: t) -> h x F2.f1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
lvl :: Integer
[GblId, Unf=OtherCon []]
lvl = 1
Rec {
-- RHS size: {terms: 16, types: 3, coercions: 0, joins: 0/0}
F2.f2_g [Occ=LoopBreaker] :: Integer -> Integer -> Integer
[GblId, Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
F2.f2_g
= \ (x :: Integer) (y :: Integer) ->
case GHC.Num.Integer.integerCompare x F2.f1 of {
__DEFAULT -> y;
GT -> F2.f2_g (GHC.Num.Integer.integerSub x lvl) (GHC.Num.Integer.integerAdd x y)
}
end Rec }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F2.f3 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F2.f3 = 5
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
f2 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 30 0}]
f2 = F2.f2_g F2.f3 F2.f1
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 29, types: 13, coercions: 0, joins: 0/0}
Rec {
-- RHS size: {terms: 15, types: 3, coercions: 0, joins: 0/0}
F3.$wfac [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Str=<S,1*U>, Unf=OtherCon []]
F3.$wfac
= \ (ww :: GHC.Prim.Int#) ->
case ww of wild {
__DEFAULT -> case F3.$wfac (GHC.Prim.-# wild 1#) of ww1 { __DEFAULT -> GHC.Prim.*# wild ww1 };
0# -> 1#
}
end Rec }
-- RHS size: {terms: 10, types: 4, coercions: 0, joins: 0/0}
fac [InlPrag=NOUSERINLINE[2]] :: Int -> Int
[GblId,
Arity=1,
Str=<S(S),1*U(1*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 [Occ=Once1!] :: Int) -> case w of { GHC.Types.I# ww1 [Occ=Once1] -> case F3.$wfac ww1 of ww2 [Occ=Once1] { __DEFAULT -> GHC.Types.I# ww2 } }}]
fac = \ (w :: Int) -> case w of { GHC.Types.I# ww1 -> case F3.$wfac ww1 of ww2 { __DEFAULT -> GHC.Types.I# ww2 } }
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
f3 :: Int -> Int
[GblId,
Arity=1,
Str=<S(S),1*U(1*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=True)
Tmpl= fac}]
f3 = fac
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 39, types: 24, coercions: 0, joins: 0/0}
-- RHS size: {terms: 8, types: 3, coercions: 0, joins: 0/0}
f4g :: Int -> Int
[GblId,
Arity=1,
Str=<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= \ (y [Occ=Once1!] :: Int) -> case y of { GHC.Types.I# x [Occ=Once1] -> GHC.Types.I# (GHC.Prim.+# x 1#) }}]
f4g = \ (y :: Int) -> case y of { GHC.Types.I# x -> GHC.Types.I# (GHC.Prim.+# x 1#) }
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
lvl :: Int
[GblId, Unf=OtherCon []]
lvl = GHC.Types.I# 0#
Rec {
-- RHS size: {terms: 13, types: 4, coercions: 0, joins: 0/0}
F4.$wf4h [InlPrag=NOUSERINLINE[2], Occ=LoopBreaker] :: (Int -> Int) -> GHC.Prim.Int# -> Int
[GblId, Arity=2, Str=<C(S),1*C1(U)><S,1*U>, Unf=OtherCon []]
F4.$wf4h
= \ (w :: Int -> Int) (ww :: GHC.Prim.Int#) ->
case ww of wild {
__DEFAULT -> F4.$wf4h w (GHC.Prim.-# wild 1#);
0# -> w lvl
}
end Rec }
-- RHS size: {terms: 8, types: 5, coercions: 0, joins: 0/0}
f4h [InlPrag=NOUSERINLINE[2]] :: (Int -> Int) -> Int -> Int
[GblId,
Arity=2,
Str=<C(S),1*C1(U)><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 [Occ=Once1] :: Int -> Int) (w1 [Occ=Once1!] :: Int) -> case w1 of { GHC.Types.I# ww1 [Occ=Once1] -> F4.$wf4h w ww1 }}]
f4h = \ (w :: Int -> Int) (w1 :: Int) -> case w1 of { GHC.Types.I# ww1 -> F4.$wf4h w ww1 }
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
f4 :: Int
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 30 0}]
f4 = F4.$wf4h f4g 9#
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 54, types: 99, coercions: 0, joins: 0/0}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
F5.f5g1 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
F5.f5g1 = 1
-- RHS size: {terms: 12, types: 11, coercions: 0, joins: 0/0}
f5g :: forall {a} {t}. Num a => (t -> a) -> t -> a
[GblId,
Arity=3,
Str=<S(C(C(S))LLLLLL),U(1*C1(C1(U)),A,A,A,A,A,1*C1(U))><L,1*C1(U)><L,U>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=False)
Tmpl= \ (@a) (@t) ($dNum :: Num a) (h [Occ=Once1!] :: t -> a) (z [Occ=Once1] :: t) -> + @a $dNum (h z) (fromInteger @a $dNum F5.f5g1)}]
f5g = \ (@a) (@t) ($dNum :: Num a) (h :: t -> a) (z :: t) -> + @a $dNum (h z) (fromInteger @a $dNum F5.f5g1)
-- RHS size: {terms: 15, types: 14, coercions: 0, joins: 0/0}
F5.$wf5h [InlPrag=NOUSERINLINE[2]] :: forall {a} {t}. (a -> a -> a) -> (Integer -> a) -> (t -> a) -> t -> (t -> a) -> a
[GblId, Arity=5, Str=<C(C(S)),C(C1(U))><L,1*C1(U)><L,1*C1(U)><L,U><L,1*C1(U)>, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [60 60 60 0 60] 120 0}]
F5.$wf5h = \ (@a) (@t) (ww :: a -> a -> a) (ww1 :: Integer -> a) (w :: t -> a) (w1 :: t) (w2 :: t -> a) -> ww (w w1) (ww (w2 w1) (ww1 F5.f5g1))
-- RHS size: {terms: 15, types: 32, coercions: 0, joins: 0/0}
f5h [InlPrag=NOUSERINLINE[2]] :: forall {a} {t}. Num a => (t -> a) -> t -> (t -> a) -> a
[GblId,
Arity=4,
Str=<S(C(C(S))LLLLLL),1*U(C(C1(U)),A,A,A,A,A,1*C1(U))><L,1*C1(U)><L,U><L,1*C1(U)>,
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 }
-- RHS size: {terms: 4, types: 1, coercions: 0, joins: 0/0}
f5y :: 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= \ (y [Occ=Once1] :: Integer) -> GHC.Num.Integer.integerAdd y F5.f5g1}]
f5y = \ (y :: Integer) -> GHC.Num.Integer.integerAdd y F5.f5g1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
f5 :: Integer
[GblId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True, WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
f5 = 3
==================== Tidy Core ====================
Result size of Tidy Core = {terms: 14, types: 22, 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}
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}]
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}]
f6t = GHC.Num.Integer.integerAdd