Skip to content

Instantly share code, notes, and snippets.

@mpickering
Created September 28, 2017 14:31
Show Gist options
  • Save mpickering/7c7cb362206f60bc85a76ceb30d786c3 to your computer and use it in GitHub Desktop.
Save mpickering/7c7cb362206f60bc85a76ceb30d786c3 to your computer and use it in GitHub Desktop.
==================== Tidy Core ====================
2017-09-28 14:23:59.51330523 UTC
Result size of Tidy Core
= {terms: 510, types: 477, coercions: 31, joins: 12/13}
-- RHS size: {terms: 30, types: 37, coercions: 0, joins: 1/2}
sfilter [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8H7)
(@ s_s8H8)
(w_s8H9 :: a_s8H7 -> Bool)
(w1_s8Ha [Occ=Once!] :: Stream s_s8H8 a_s8H7) ->
case w1_s8Ha of { Stream ww1_s8Hd ww2_s8He [Occ=Once] ->
let {
filterStep_s8yu [InlPrag=INLINE[2] (sat-args=1), Occ=Once]
:: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId,
Arity=1,
Str=<L,U>,
Unf=Unf{Src=InlineStable, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= letrec {
filterStep_a4YX [Occ=LoopBreaker]
:: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId, Arity=1, Unf=OtherCon []]
filterStep_a4YX
= \ (s1_a3ir [Occ=Once] :: s_s8H8) ->
case ww1_s8Hd s1_a3ir of {
Done -> Main.Done @ s_s8H8 @ a_s8H7;
Yield x_a3is ns_a3it [Occ=Once*] ->
case w_s8H9 x_a3is of {
False -> filterStep_a4YX ns_a3it;
True -> Main.Yield @ s_s8H8 @ a_s8H7 x_a3is ns_a3it
}
}; } in
filterStep_a4YX}]
filterStep_s8yu
= \ (eta_B1 [Occ=Once] :: s_s8H8) ->
joinrec {
sat_worker_s8yt [Occ=LoopBreakerT[1]]
:: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
sat_worker_s8yt (s1_X3iu [Occ=Once] :: s_s8H8)
= case ww1_s8Hd s1_X3iu of {
Done -> Main.Done @ s_s8H8 @ a_s8H7;
Yield x_a3is ns_a3it [Occ=Once*] ->
case w_s8H9 x_a3is of {
False -> jump sat_worker_s8yt ns_a3it;
True -> Main.Yield @ s_s8H8 @ a_s8H7 x_a3is ns_a3it
}
}; } in
jump sat_worker_s8yt eta_B1 } in
Main.Stream @ s_s8H8 @ a_s8H7 filterStep_s8yu ww2_s8He
}}]
sfilter
= \ (@ a_s8H7)
(@ s_s8H8)
(w_s8H9 :: a_s8H7 -> Bool)
(w1_s8Ha :: Stream s_s8H8 a_s8H7) ->
case w1_s8Ha of { Stream ww1_s8Hd ww2_s8He ->
let {
filterStep_s8yu [InlPrag=INLINE[2] (sat-args=1)]
:: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId,
Arity=1,
Str=<L,U>,
Unf=Unf{Src=InlineStable, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= letrec {
filterStep_a4YX [Occ=LoopBreaker] :: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId, Arity=1, Unf=OtherCon []]
filterStep_a4YX
= \ (s1_a3ir [Occ=Once] :: s_s8H8) ->
case ww1_s8Hd s1_a3ir of {
Done -> Main.Done @ s_s8H8 @ a_s8H7;
Yield x_a3is ns_a3it [Occ=Once*] ->
case w_s8H9 x_a3is of {
False -> filterStep_a4YX ns_a3it;
True -> Main.Yield @ s_s8H8 @ a_s8H7 x_a3is ns_a3it
}
}; } in
filterStep_a4YX}]
filterStep_s8yu
= \ (eta_B1 :: s_s8H8) ->
joinrec {
sat_worker_s8yt [Occ=LoopBreaker] :: s_s8H8 -> Step s_s8H8 a_s8H7
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
sat_worker_s8yt (s1_X3iu :: s_s8H8)
= case ww1_s8Hd s1_X3iu of wild_Xb {
Done -> Main.Done @ s_s8H8 @ a_s8H7;
Yield x_a3is ns_a3it ->
case w_s8H9 x_a3is of {
False -> jump sat_worker_s8yt ns_a3it;
True -> wild_Xb
}
}; } in
jump sat_worker_s8yt eta_B1 } in
Main.Stream @ s_s8H8 @ a_s8H7 filterStep_s8yu ww2_s8He
}
-- RHS size: {terms: 28, types: 33, coercions: 0, joins: 1/1}
sfilter2 [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8Hl)
(@ s_s8Hm)
(w_s8Hn [Occ=OnceL!] :: a_s8Hl -> Bool)
(w1_s8Ho [Occ=Once!] :: Stream s_s8Hm a_s8Hl) ->
case w1_s8Ho of
{ Stream ww1_s8Hr [Occ=OnceL!] ww2_s8Hs [Occ=Once] ->
Main.Stream
@ s_s8Hm
@ a_s8Hl
(\ (s1_a3iy [Occ=Once] :: s_s8Hm) ->
joinrec {
sat_worker_s8yq [Occ=LoopBreakerT[1]]
:: s_s8Hm -> Step s_s8Hm a_s8Hl
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
sat_worker_s8yq (s2_X3iB [Occ=Once] :: s_s8Hm)
= case ww1_s8Hr s2_X3iB of {
Done -> Main.Done @ s_s8Hm @ a_s8Hl;
Yield x_a3iz ns_a3iA [Occ=Once*] ->
case w_s8Hn x_a3iz of {
False -> jump sat_worker_s8yq ns_a3iA;
True -> Main.Yield @ s_s8Hm @ a_s8Hl x_a3iz ns_a3iA
}
}; } in
jump sat_worker_s8yq s1_a3iy)
ww2_s8Hs
}}]
sfilter2
= \ (@ a_s8Hl)
(@ s_s8Hm)
(w_s8Hn :: a_s8Hl -> Bool)
(w1_s8Ho :: Stream s_s8Hm a_s8Hl) ->
case w1_s8Ho of { Stream ww1_s8Hr ww2_s8Hs ->
Main.Stream
@ s_s8Hm
@ a_s8Hl
(\ (s1_a3iy :: s_s8Hm) ->
joinrec {
sat_worker_s8yq [Occ=LoopBreaker] :: s_s8Hm -> Step s_s8Hm a_s8Hl
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
sat_worker_s8yq (s2_X3iB :: s_s8Hm)
= case ww1_s8Hr s2_X3iB of wild_Xb {
Done -> Main.Done @ s_s8Hm @ a_s8Hl;
Yield x_a3iz ns_a3iA ->
case w_s8Hn x_a3iz of {
False -> jump sat_worker_s8yq ns_a3iA;
True -> wild_Xb
}
}; } in
jump sat_worker_s8yq s1_a3iy)
ww2_s8Hs
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
sfilter3 [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8Hz)
(@ s_s8HA)
(w_s8HB [Occ=OnceL!] :: a_s8Hz -> Bool)
(w1_s8HC [Occ=Once!] :: Stream s_s8HA a_s8Hz) ->
case w1_s8HC of
{ Stream ww1_s8HF [Occ=OnceL!] ww2_s8HG [Occ=Once] ->
Main.Stream
@ s_s8HA
@ a_s8Hz
(\ (s1_a3iF [Occ=Once] :: s_s8HA) ->
joinrec {
sat_worker_s8yo [Occ=LoopBreakerT[1]]
:: s_s8HA -> Step s_s8HA a_s8Hz
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
sat_worker_s8yo (s2_X3iK [Occ=Once] :: s_s8HA)
= case ww1_s8HF s2_X3iK of {
Done -> Main.Done @ s_s8HA @ a_s8Hz;
Yield x_a3iI ns_a3iJ [Occ=Once*] ->
case w_s8HB x_a3iI of {
False -> jump sat_worker_s8yo ns_a3iJ;
True -> Main.Yield @ s_s8HA @ a_s8Hz x_a3iI ns_a3iJ
}
}; } in
jump sat_worker_s8yo s1_a3iF)
ww2_s8HG
}}]
sfilter3 = sfilter2
-- RHS size: {terms: 24, types: 14, coercions: 0, joins: 0/0}
fromTo [InlPrag=INLINE (sat-args=2)]
:: Int -> Int -> Stream Int Int
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,U><L,U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=False,boring_ok=False)
Tmpl= \ (from_a3iK [Occ=Once] :: Int)
(to_a3iL [Occ=OnceL] :: Int) ->
Main.Stream
@ Int
@ Int
(\ (i_a3iN :: Int) ->
case GHC.Classes.gtInt i_a3iN to_a3iL of {
False ->
Main.Yield
@ Int
@ Int
i_a3iN
(case i_a3iN of { I# x_a5m6 [Occ=Once] ->
GHC.Types.I# (+# x_a5m6 1#)
});
True -> Main.Done @ Int @ Int
})
from_a3iK}]
fromTo
= \ (from_a3iK :: Int) (to_a3iL :: Int) ->
Main.Stream
@ Int
@ Int
(\ (i_a3iN :: Int) ->
case i_a3iN of wild_a5jR { I# x_a5jT ->
case to_a3iL of { I# y_a5jX ->
case ># x_a5jT y_a5jX of {
__DEFAULT ->
Main.Yield @ Int @ Int wild_a5jR (GHC.Types.I# (+# x_a5jT 1#));
1# -> Main.Done @ Int @ Int
}
}
})
from_a3iK
-- RHS size: {terms: 29, types: 32, coercions: 0, joins: 1/1}
sfoldl [InlPrag=INLINE (sat-args=3)]
:: forall b a s. (b -> a -> b) -> b -> Stream s a -> b
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,C(C1(U))><S,1*U><S(C(S)L),1*U(C(U),U)>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=3,unsat_ok=False,boring_ok=False)
Tmpl= \ (@ b_a4W0)
(@ a_a4W1)
(@ s_a4W2)
(acc_a4jM [Occ=OnceL!] :: b_a4W0 -> a_a4W1 -> b_a4W0)
(z_a4jN [Occ=Once] :: b_a4W0)
(ds_d53k [Occ=Once!] :: Stream s_a4W2 a_a4W1) ->
case ds_d53k of { Stream step_a4jO [Occ=Once] s0_a4jP [Occ=Once] ->
case step_a4jO of step1_X4jY { __DEFAULT ->
joinrec {
go_a4W6 [Occ=LoopBreakerT[2]] :: b_a4W0 -> s_a4W2 -> b_a4W0
[LclId[JoinId(2)], Arity=2, Unf=OtherCon []]
go_a4W6 (y_a4jR [Occ=Once] :: b_a4W0)
(s1_a4jS [Occ=Once] :: s_a4W2)
= case y_a4jR of y1_X4k5 { __DEFAULT ->
case step1_X4jY s1_a4jS of {
Done -> y1_X4k5;
Yield x_a4jT [Occ=Once] ns_a4jU [Occ=Once] ->
jump go_a4W6 (acc_a4jM y1_X4k5 x_a4jT) ns_a4jU
}
}; } in
jump go_a4W6 z_a4jN s0_a4jP
}
}}]
sfoldl
= \ (@ b_a4W0)
(@ a_a4W1)
(@ s_a4W2)
(acc_a4jM :: b_a4W0 -> a_a4W1 -> b_a4W0)
(z_a4jN :: b_a4W0)
(ds_d53k :: Stream s_a4W2 a_a4W1) ->
case ds_d53k of { Stream step_a4jO s0_a4jP ->
joinrec {
sat_worker_s8ym [Occ=LoopBreaker] :: b_a4W0 -> s_a4W2 -> b_a4W0
[LclId[JoinId(2)], Arity=2, Str=<S,1*U><L,U>, Unf=OtherCon []]
sat_worker_s8ym (y_X4jV :: b_a4W0) (s1_X4jX :: s_a4W2)
= case y_X4jV of y1_X4k9 { __DEFAULT ->
case step_a4jO s1_X4jX of {
Done -> y1_X4k9;
Yield x_a4jT ns_a4jU ->
jump sat_worker_s8ym (acc_a4jM y1_X4k9 x_a4jT) ns_a4jU
}
}; } in
jump sat_worker_s8ym z_a4jN s0_a4jP
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.ssum1 :: Integer
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
Main.ssum1 = 0
-- RHS size: {terms: 9, types: 11, coercions: 0, joins: 0/0}
ssum :: forall a s. Num a => Stream s a -> a
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<L,U(1*C(C1(U)),A,A,A,A,A,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=False)
Tmpl= \ (@ a_a4Ww) (@ s_a4Wx) ($dNum_a4Wz :: Num a_a4Ww) ->
sfoldl
@ a_a4Ww
@ a_a4Ww
@ s_a4Wx
(+ @ a_a4Ww $dNum_a4Wz)
(fromInteger @ a_a4Ww $dNum_a4Wz Main.ssum1)}]
ssum
= \ (@ a_a4Ww) (@ s_a4Wx) ($dNum_a4Wz :: Num a_a4Ww) ->
sfoldl
@ a_a4Ww
@ a_a4Ww
@ s_a4Wx
(+ @ a_a4Ww $dNum_a4Wz)
(fromInteger @ a_a4Ww $dNum_a4Wz Main.ssum1)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$trModule4 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$trModule4 = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$trModule3 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$trModule3 = GHC.Types.TrNameS Main.$trModule4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$trModule2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$trModule2 = "Main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$trModule1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$trModule1 = GHC.Types.TrNameS Main.$trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$trModule :: GHC.Types.Module
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.$trModule = GHC.Types.Module Main.$trModule3 Main.$trModule1
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep_r8Sg :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2]
$krep_r8Sg = GHC.Types.KindRepVar 1#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep1_r8Sh :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2]
$krep1_r8Sh = GHC.Types.KindRepVar 0#
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$tcStep2 = "Step"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tcStep1 = GHC.Types.TrNameS Main.$tcStep2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tcStep
= GHC.Types.TyCon
12766381590924836876##
17532131051778711994##
Main.$trModule
Main.$tcStep1
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep2_r8Si :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2]
$krep2_r8Si
= GHC.Types.:
@ GHC.Types.KindRep $krep_r8Sg (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r8Sj :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2]
$krep3_r8Sj
= GHC.Types.: @ GHC.Types.KindRep $krep1_r8Sh $krep2_r8Si
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1]
Main.$tc'Done1 = GHC.Types.KindRepTyConApp Main.$tcStep $krep3_r8Sj
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Done3 = "'Done"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Done2 = GHC.Types.TrNameS Main.$tc'Done3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Done
= GHC.Types.TyCon
12461457374452162227##
16535247372730198091##
Main.$trModule
Main.$tc'Done2
2#
Main.$tc'Done1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep4_r8Sk :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
$krep4_r8Sk = GHC.Types.KindRepFun $krep1_r8Sh Main.$tc'Done1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
Main.$tc'Yield1 = GHC.Types.KindRepFun $krep_r8Sg $krep4_r8Sk
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Yield3 = "'Yield"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Yield2 = GHC.Types.TrNameS Main.$tc'Yield3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Yield
= GHC.Types.TyCon
11605012626859213932##
10048296928662928533##
Main.$trModule
Main.$tc'Yield2
2#
Main.$tc'Yield1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tcStream2 = "Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tcStream1 = GHC.Types.TrNameS Main.$tcStream2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tcStream
= GHC.Types.TyCon
4684828220733693542##
9271748289049993304##
Main.$trModule
Main.$tcStream1
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5_r8Sl :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1]
$krep5_r8Sl = GHC.Types.KindRepTyConApp Main.$tcStream $krep3_r8Sj
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep6_r8Sm :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
$krep6_r8Sm = GHC.Types.KindRepFun $krep1_r8Sh $krep5_r8Sl
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
Main.$tc'Stream1 = GHC.Types.KindRepFun $krep4_r8Sk $krep6_r8Sm
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Stream3 = "'Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Stream2 = GHC.Types.TrNameS Main.$tc'Stream3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Stream
= GHC.Types.TyCon
3913242768984846722##
15904583103253483572##
Main.$trModule
Main.$tc'Stream2
2#
Main.$tc'Stream1
-- RHS size: {terms: 41, types: 14, coercions: 0, joins: 3/3}
filterTest3 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8I5 [Occ=Once!] :: Int) ->
case w_s8I5 of { I# ww1_s8I8 [Occ=OnceL] ->
joinrec {
$wsat_worker1_s8I4 [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[2]]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<L,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8I4 (ww2_s8HY [Occ=OnceL*] :: Int#)
(ww3_s8I2 [Occ=Once] :: Int#)
= joinrec {
$wsat_worker2_s8HT [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[1]]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wsat_worker2_s8HT (ww4_s8HR :: Int#)
= case ># ww4_s8HR ww1_s8I8 of {
__DEFAULT ->
case remInt# ww4_s8HR 2# of {
__DEFAULT -> jump $wsat_worker2_s8HT (+# ww4_s8HR 1#);
0# ->
jump $wsat_worker1_s8I4 (+# ww2_s8HY ww4_s8HR) (+# ww4_s8HR 1#)
};
1# -> GHC.Types.I# ww2_s8HY
}; } in
jump $wsat_worker2_s8HT ww3_s8I2; } in
jump $wsat_worker1_s8I4 0# 1#
}}]
filterTest3
= \ (w_s8I5 :: Int) ->
case w_s8I5 of { I# ww1_s8I8 ->
joinrec {
$wsat_worker1_s8I4 [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8I4 (ww2_s8HY :: Int#) (ww3_s8I2 :: Int#)
= join {
lvl_s8NJ [Dmd=<L,U(U)>] :: Int
[LclId[JoinId(0)], Str=m, Unf=OtherCon []]
lvl_s8NJ = GHC.Types.I# ww2_s8HY } in
joinrec {
$wsat_worker2_s8HT [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wsat_worker2_s8HT (ww4_s8HR :: Int#)
= case ># ww4_s8HR ww1_s8I8 of {
__DEFAULT ->
case remInt# ww4_s8HR 2# of {
__DEFAULT -> jump $wsat_worker2_s8HT (+# ww4_s8HR 1#);
0# ->
jump $wsat_worker1_s8I4 (+# ww2_s8HY ww4_s8HR) (+# ww4_s8HR 1#)
};
1# -> jump lvl_s8NJ
}; } in
jump $wsat_worker2_s8HT ww3_s8I2; } in
jump $wsat_worker1_s8I4 0# 1#
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
filterTest2 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8Iv [Occ=Once!] :: Int) ->
case w_s8Iv of { I# ww1_s8Iy [Occ=OnceL] ->
joinrec {
$wsat_worker1_s8Iu [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[2]]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<L,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8Iu (ww2_s8Io [Occ=OnceL*] :: Int#)
(ww3_s8Is [Occ=Once] :: Int#)
= joinrec {
$wsat_worker2_s8Ij [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[1]]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wsat_worker2_s8Ij (ww4_s8Ih :: Int#)
= case ># ww4_s8Ih ww1_s8Iy of {
__DEFAULT ->
case remInt# ww4_s8Ih 2# of {
__DEFAULT -> jump $wsat_worker2_s8Ij (+# ww4_s8Ih 1#);
0# ->
jump $wsat_worker1_s8Iu (+# ww2_s8Io ww4_s8Ih) (+# ww4_s8Ih 1#)
};
1# -> GHC.Types.I# ww2_s8Io
}; } in
jump $wsat_worker2_s8Ij ww3_s8Is; } in
jump $wsat_worker1_s8Iu 0# 1#
}}]
filterTest2 = filterTest3
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
filterTest1 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8IV [Occ=Once!] :: Int) ->
case w_s8IV of { I# ww1_s8IY [Occ=OnceL] ->
joinrec {
$wsat_worker1_s8IU [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[2]]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<L,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8IU (ww2_s8IO [Occ=OnceL*] :: Int#)
(ww3_s8IS [Occ=Once] :: Int#)
= joinrec {
$wfilterStep_s8IJ [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[1]]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wfilterStep_s8IJ (ww4_s8IH :: Int#)
= case ># ww4_s8IH ww1_s8IY of {
__DEFAULT ->
case remInt# ww4_s8IH 2# of {
__DEFAULT -> jump $wfilterStep_s8IJ (+# ww4_s8IH 1#);
0# ->
jump $wsat_worker1_s8IU (+# ww2_s8IO ww4_s8IH) (+# ww4_s8IH 1#)
};
1# -> GHC.Types.I# ww2_s8IO
}; } in
jump $wfilterStep_s8IJ ww3_s8IS; } in
jump $wsat_worker1_s8IU 0# 1#
}}]
filterTest1 = filterTest3
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main_x :: Int
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.main_x = GHC.Types.I# 10000#
Rec {
-- RHS size: {terms: 59, types: 36, coercions: 0, joins: 3/3}
Main.main_$s$wsat_worker [Occ=LoopBreaker]
:: State# RealWorld -> Int# -> Int# -> (# State# RealWorld, () #)
[GblId, Arity=3, Caf=NoCafRefs, Str=<S,U><S,U><L,U>]
Main.main_$s$wsat_worker
= \ (sc_s8PT :: State# RealWorld)
(sc1_s8PS :: Int#)
(sc2_s8PR :: Int#) ->
case seq#
@ Int
@ RealWorld
(joinrec {
$wsat_worker1_s8IU [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8IU (ww_s8IO :: Int#) (ww1_s8IS :: Int#)
= join {
lvl_s8NM :: Int
[LclId[JoinId(0)], Str=m, Unf=OtherCon []]
lvl_s8NM = GHC.Types.I# ww_s8IO } in
joinrec {
$wfilterStep_s8IJ [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wfilterStep_s8IJ (ww2_s8IH :: Int#)
= case ># ww2_s8IH sc2_s8PR of {
__DEFAULT ->
case remInt# ww2_s8IH 2# of {
__DEFAULT -> jump $wfilterStep_s8IJ (+# ww2_s8IH 1#);
0# ->
jump $wsat_worker1_s8IU (+# ww_s8IO ww2_s8IH) (+# ww2_s8IH 1#)
};
1# -> jump lvl_s8NM
}; } in
jump $wfilterStep_s8IJ ww1_s8IS; } in
jump $wsat_worker1_s8IU 0# 1#)
sc_s8PT
of
{ (# ipv_s8NP, ipv3_s8NQ #) ->
case <=# sc1_s8PS 0# of {
__DEFAULT ->
Main.main_$s$wsat_worker ipv_s8NP (-# sc1_s8PS 1#) sc2_s8PR;
1# -> (# sc_s8PT, GHC.Tuple.() #)
}
}
end Rec }
Rec {
-- RHS size: {terms: 62, types: 38, coercions: 0, joins: 3/3}
Main.$wsat_worker [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int -> Int# -> State# RealWorld -> (# State# RealWorld, () #)
[GblId, Arity=3, Caf=NoCafRefs, Str=<L,U(U)><S,U><S,U>]
Main.$wsat_worker
= \ (w_s8J4 :: Int)
(ww_s8J9 :: Int#)
(w1_s8J6 :: State# RealWorld) ->
case seq#
@ Int
@ RealWorld
(case w_s8J4 of { I# ww2_s8IY ->
joinrec {
$wsat_worker1_s8IU [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>m, Unf=OtherCon []]
$wsat_worker1_s8IU (ww3_s8IO :: Int#) (ww4_s8IS :: Int#)
= join {
lvl_s8NM :: Int
[LclId[JoinId(0)], Str=m, Unf=OtherCon []]
lvl_s8NM = GHC.Types.I# ww3_s8IO } in
joinrec {
$wfilterStep_s8IJ [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wfilterStep_s8IJ (ww5_s8IH :: Int#)
= case ># ww5_s8IH ww2_s8IY of {
__DEFAULT ->
case remInt# ww5_s8IH 2# of {
__DEFAULT -> jump $wfilterStep_s8IJ (+# ww5_s8IH 1#);
0# ->
jump $wsat_worker1_s8IU (+# ww3_s8IO ww5_s8IH) (+# ww5_s8IH 1#)
};
1# -> jump lvl_s8NM
}; } in
jump $wfilterStep_s8IJ ww4_s8IS; } in
jump $wsat_worker1_s8IU 0# 1#
})
w1_s8J6
of
{ (# ipv_s8NP, ipv3_s8NQ #) ->
case <=# ww_s8J9 0# of {
__DEFAULT -> Main.$wsat_worker w_s8J4 (-# ww_s8J9 1#) ipv_s8NP;
1# -> (# w1_s8J6, GHC.Tuple.() #)
}
}
end Rec }
-- RHS size: {terms: 10, types: 6, coercions: 0, joins: 0/0}
Main.main8 [InlPrag=NOUSERINLINE[0]]
:: Int
-> GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,U(U)><S(S),1*U(U)><S,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= \ (w_s8J4 [Occ=Once] :: Int)
(w1_s8J5 [Occ=Once!] :: GHC.Int.Int64)
(w2_s8J6 [Occ=Once] :: State# RealWorld) ->
case w1_s8J5 of { GHC.Int.I64# ww1_s8J9 [Occ=Once] ->
Main.$wsat_worker w_s8J4 ww1_s8J9 w2_s8J6
}}]
Main.main8
= \ (w_s8J4 :: Int)
(w1_s8J5 :: GHC.Int.Int64)
(w2_s8J6 :: State# RealWorld) ->
case w1_s8J5 of { GHC.Int.I64# ww1_s8J9 ->
Main.$wsat_worker w_s8J4 ww1_s8J9 w2_s8J6
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main18 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.main18 = "INLINE"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main17 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main17 = GHC.CString.unpackCString# Main.main18
-- RHS size: {terms: 5, types: 10, coercions: 0, joins: 0/0}
Main.main10
:: GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,A><S,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= \ _ [Occ=Dead] (eta_B1 [Occ=Once] :: State# RealWorld) ->
(# eta_B1, GHC.Tuple.() #)}]
Main.main10
= \ _ [Occ=Dead] (eta_B1 :: State# RealWorld) ->
(# eta_B1, GHC.Tuple.() #)
-- RHS size: {terms: 6, types: 11, coercions: 0, joins: 0/0}
Main.main9
:: GHC.Int.Int64
-> () -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,A><L,A><S,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=True)
Tmpl= \ _ [Occ=Dead]
_ [Occ=Dead]
(eta1_B1 [Occ=Once] :: State# RealWorld) ->
(# eta1_B1, GHC.Tuple.() #)}]
Main.main9
= \ _ [Occ=Dead] _ [Occ=Dead] (eta1_B1 :: State# RealWorld) ->
(# eta1_B1, GHC.Tuple.() #)
-- RHS size: {terms: 10, types: 6, coercions: 0, joins: 0/0}
Main.main7
:: ()
-> GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,A><S(S),1*U(U)><S,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=True)
Tmpl= \ _ [Occ=Dead]
(eta_B2 [Occ=Once] :: GHC.Int.Int64)
(eta1_B1 [Occ=Once] :: State# RealWorld) ->
Main.main8 Main.main_x eta_B2 eta1_B1}]
Main.main7
= \ _ [Occ=Dead]
(eta_B2 :: GHC.Int.Int64)
(eta1_B1 :: State# RealWorld) ->
case eta_B2 of { GHC.Int.I64# ww1_s8J9 ->
Main.main_$s$wsat_worker eta1_B1 ww1_s8J9 10000#
}
-- RHS size: {terms: 6, types: 2, coercions: 22, joins: 0/0}
Main.main6 :: Benchmarkable
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 60}]
Main.main6
= Criterion.Types.Benchmarkable
@ ()
((deepseq-1.4.3.0:Control.DeepSeq.rwhnf @ ())
`cast` (Sym (deepseq-1.4.3.0:Control.DeepSeq.N:NFData[0] <()>_N)
:: (() -> () :: *)
~R# (deepseq-1.4.3.0:Control.DeepSeq.NFData () :: Constraint)))
(Main.main10
`cast` (<GHC.Int.Int64>_R ->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> IO () :: *)))
(Main.main9
`cast` (<GHC.Int.Int64>_R
->_R <()>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> () -> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> () -> IO () :: *)))
(Main.main7
`cast` (<()>_R
->_R <GHC.Int.Int64>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (()
-> GHC.Int.Int64
-> State# RealWorld
-> (# State# RealWorld, () #) :: *)
~R# (() -> GHC.Int.Int64 -> IO () :: *)))
GHC.Types.False
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main16 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main16 = Criterion.Types.Benchmark Main.main17 Main.main6
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main15 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.main15 = "Skip "#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main14 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main14 = GHC.CString.unpackCString# Main.main15
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main13 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main13 = Criterion.Types.Benchmark Main.main14 Main.main6
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main12 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main12 = "go"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main11 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main11 = GHC.CString.unpackCString# Main.main12
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main5 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main5 = Criterion.Types.Benchmark Main.main11 Main.main6
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
Main.main4 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main4
= GHC.Types.: @ Benchmark Main.main5 (GHC.Types.[] @ Benchmark)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
Main.main3 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main3 = GHC.Types.: @ Benchmark Main.main13 Main.main4
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
Main.main2 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main2 = GHC.Types.: @ Benchmark Main.main16 Main.main3
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main1 :: State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 60}]
Main.main1 = Criterion.Main.defaultMain2 defaultConfig Main.main2
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
main :: IO ()
[GblId,
Arity=1,
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= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))}]
main
= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))
-- RHS size: {terms: 2, types: 1, coercions: 3, joins: 0/0}
Main.main19 :: State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
Main.main19
= GHC.TopHandler.runMainIO1
@ ()
(Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *)))
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
:Main.main :: IO ()
[GblId,
Arity=1,
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= Main.main19
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))}]
:Main.main
= Main.main19
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))
------ Local rules for imported ids --------
"SC:$wsat_worker0" [0]
forall (sc_s8PT :: State# RealWorld)
(sc1_s8PS :: Int#)
(sc2_s8PR :: Int#).
Main.$wsat_worker (GHC.Types.I# sc2_s8PR) sc1_s8PS sc_s8PT
= Main.main_$s$wsat_worker sc_s8PT sc1_s8PS sc2_s8PR
==================== Tidy Core ====================
2017-09-28 10:34:50.528257569 UTC
Result size of Tidy Core
= {terms: 612, types: 598, coercions: 53, joins: 9/12}
-- RHS size: {terms: 30, types: 37, coercions: 0, joins: 1/2}
sfilter [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8EL)
(@ s_s8EM)
(w_s8EN :: a_s8EL -> Bool)
(w1_s8EO [Occ=Once!] :: Stream s_s8EM a_s8EL) ->
case w1_s8EO of { Stream ww1_s8ER ww2_s8ES [Occ=Once] ->
let {
filterStep_s8uT [InlPrag=INLINE[2] (sat-args=1), Occ=Once]
:: s_s8EM -> Step s_s8EM a_s8EL
[LclId,
Arity=1,
Str=<L,U>,
Unf=Unf{Src=InlineStable, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= letrec {
filterStep_a4Y5 [Occ=LoopBreaker]
:: s_s8EM -> Step s_s8EM a_s8EL
[LclId, Arity=1, Unf=OtherCon []]
filterStep_a4Y5
= \ (s1_a3hH [Occ=Once] :: s_s8EM) ->
case ww1_s8ER s1_a3hH of {
Done -> Main.Done @ s_s8EM @ a_s8EL;
Yield x_a3hI ns_a3hJ [Occ=Once*] ->
case w_s8EN x_a3hI of {
False -> filterStep_a4Y5 ns_a3hJ;
True -> Main.Yield @ s_s8EM @ a_s8EL x_a3hI ns_a3hJ
}
}; } in
filterStep_a4Y5}]
filterStep_s8uT
= \ (eta_B1 [Occ=Once] :: s_s8EM) ->
joinrec {
filterStep1_s8uS [Occ=LoopBreakerT[1]]
:: s_s8EM -> Step s_s8EM a_s8EL
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
filterStep1_s8uS (s1_a3hH [Occ=Once] :: s_s8EM)
= case ww1_s8ER s1_a3hH of {
Done -> Main.Done @ s_s8EM @ a_s8EL;
Yield x_a3hI ns_a3hJ [Occ=Once*] ->
case w_s8EN x_a3hI of {
False -> jump filterStep1_s8uS ns_a3hJ;
True -> Main.Yield @ s_s8EM @ a_s8EL x_a3hI ns_a3hJ
}
}; } in
jump filterStep1_s8uS eta_B1 } in
Main.Stream @ s_s8EM @ a_s8EL filterStep_s8uT ww2_s8ES
}}]
sfilter
= \ (@ a_s8EL)
(@ s_s8EM)
(w_s8EN :: a_s8EL -> Bool)
(w1_s8EO :: Stream s_s8EM a_s8EL) ->
case w1_s8EO of { Stream ww1_s8ER ww2_s8ES ->
let {
filterStep_s8uT [InlPrag=INLINE[2] (sat-args=1)]
:: s_s8EM -> Step s_s8EM a_s8EL
[LclId,
Arity=1,
Str=<L,U>,
Unf=Unf{Src=InlineStable, TopLvl=False, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= letrec {
filterStep_a4Y5 [Occ=LoopBreaker] :: s_s8EM -> Step s_s8EM a_s8EL
[LclId, Arity=1, Unf=OtherCon []]
filterStep_a4Y5
= \ (s1_a3hH [Occ=Once] :: s_s8EM) ->
case ww1_s8ER s1_a3hH of {
Done -> Main.Done @ s_s8EM @ a_s8EL;
Yield x_a3hI ns_a3hJ [Occ=Once*] ->
case w_s8EN x_a3hI of {
False -> filterStep_a4Y5 ns_a3hJ;
True -> Main.Yield @ s_s8EM @ a_s8EL x_a3hI ns_a3hJ
}
}; } in
filterStep_a4Y5}]
filterStep_s8uT
= \ (eta_B1 :: s_s8EM) ->
joinrec {
filterStep1_s8uS [Occ=LoopBreaker] :: s_s8EM -> Step s_s8EM a_s8EL
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
filterStep1_s8uS (s1_a3hH :: s_s8EM)
= case ww1_s8ER s1_a3hH of wild_Xb {
Done -> Main.Done @ s_s8EM @ a_s8EL;
Yield x_a3hI ns_a3hJ ->
case w_s8EN x_a3hI of {
False -> jump filterStep1_s8uS ns_a3hJ;
True -> wild_Xb
}
}; } in
jump filterStep1_s8uS eta_B1 } in
Main.Stream @ s_s8EM @ a_s8EL filterStep_s8uT ww2_s8ES
}
-- RHS size: {terms: 26, types: 32, coercions: 0, joins: 0/1}
sfilter2 [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8EZ)
(@ s_s8F0)
(w_s8F1 [Occ=OnceL!] :: a_s8EZ -> Bool)
(w1_s8F2 [Occ=Once!] :: Stream s_s8F0 a_s8EZ) ->
case w1_s8F2 of
{ Stream ww1_s8F5 [Occ=OnceL!] ww2_s8F6 [Occ=Once] ->
Main.Stream
@ s_s8F0
@ a_s8EZ
(letrec {
filterStep_s8uP [Occ=LoopBreaker] :: s_s8F0 -> Step s_s8F0 a_s8EZ
[LclId, Arity=1, Str=<L,U>, Unf=OtherCon []]
filterStep_s8uP
= \ (s1_a3hO [Occ=Once] :: s_s8F0) ->
case ww1_s8F5 s1_a3hO of {
Done -> Main.Done @ s_s8F0 @ a_s8EZ;
Yield x_a3hP ns_a3hQ [Occ=Once*] ->
case w_s8F1 x_a3hP of {
False -> filterStep_s8uP ns_a3hQ;
True -> Main.Yield @ s_s8F0 @ a_s8EZ x_a3hP ns_a3hQ
}
}; } in
filterStep_s8uP)
ww2_s8F6
}}]
sfilter2
= \ (@ a_s8EZ)
(@ s_s8F0)
(w_s8F1 :: a_s8EZ -> Bool)
(w1_s8F2 :: Stream s_s8F0 a_s8EZ) ->
case w1_s8F2 of { Stream ww1_s8F5 ww2_s8F6 ->
Main.Stream
@ s_s8F0
@ a_s8EZ
(letrec {
filterStep_s8uP [Occ=LoopBreaker] :: s_s8F0 -> Step s_s8F0 a_s8EZ
[LclId, Arity=1, Str=<L,U>, Unf=OtherCon []]
filterStep_s8uP
= \ (s1_a3hO :: s_s8F0) ->
case ww1_s8F5 s1_a3hO of wild_Xb {
Done -> Main.Done @ s_s8F0 @ a_s8EZ;
Yield x_a3hP ns_a3hQ ->
case w_s8F1 x_a3hP of {
False -> filterStep_s8uP ns_a3hQ;
True -> wild_Xb
}
}; } in
filterStep_s8uP)
ww2_s8F6
}
-- RHS size: {terms: 28, types: 33, coercions: 0, joins: 1/1}
sfilter3 [InlPrag=NOUSERINLINE[0]]
:: forall a s. (a -> Bool) -> Stream s a -> Stream s a
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,C(U)><S,1*U(C(U),U)>m,
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_s8Fd)
(@ s_s8Fe)
(w_s8Ff [Occ=OnceL!] :: a_s8Fd -> Bool)
(w1_s8Fg [Occ=Once!] :: Stream s_s8Fe a_s8Fd) ->
case w1_s8Fg of
{ Stream ww1_s8Fj [Occ=OnceL!] ww2_s8Fk [Occ=Once] ->
Main.Stream
@ s_s8Fe
@ a_s8Fd
(\ (s1_a3hV [Occ=Once] :: s_s8Fe) ->
joinrec {
go_s8uN [Occ=LoopBreakerT[1]] :: s_s8Fe -> Step s_s8Fe a_s8Fd
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
go_s8uN (s2_a3hX [Occ=Once] :: s_s8Fe)
= case ww1_s8Fj s2_a3hX of {
Done -> Main.Done @ s_s8Fe @ a_s8Fd;
Yield x_a3hY ns_a3hZ [Occ=Once*] ->
case w_s8Ff x_a3hY of {
False -> jump go_s8uN ns_a3hZ;
True -> Main.Yield @ s_s8Fe @ a_s8Fd x_a3hY ns_a3hZ
}
}; } in
jump go_s8uN s1_a3hV)
ww2_s8Fk
}}]
sfilter3
= \ (@ a_s8Fd)
(@ s_s8Fe)
(w_s8Ff :: a_s8Fd -> Bool)
(w1_s8Fg :: Stream s_s8Fe a_s8Fd) ->
case w1_s8Fg of { Stream ww1_s8Fj ww2_s8Fk ->
Main.Stream
@ s_s8Fe
@ a_s8Fd
(\ (s1_a3hV :: s_s8Fe) ->
joinrec {
go_s8uN [Occ=LoopBreaker] :: s_s8Fe -> Step s_s8Fe a_s8Fd
[LclId[JoinId(1)], Arity=1, Str=<L,U>, Unf=OtherCon []]
go_s8uN (s2_a3hX :: s_s8Fe)
= case ww1_s8Fj s2_a3hX of wild_Xd {
Done -> Main.Done @ s_s8Fe @ a_s8Fd;
Yield x_a3hY ns_a3hZ ->
case w_s8Ff x_a3hY of {
False -> jump go_s8uN ns_a3hZ;
True -> wild_Xd
}
}; } in
jump go_s8uN s1_a3hV)
ww2_s8Fk
}
-- RHS size: {terms: 24, types: 14, coercions: 0, joins: 0/0}
fromTo [InlPrag=INLINE (sat-args=2)]
:: Int -> Int -> Stream Int Int
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,U><L,U(U)>m,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=False,boring_ok=False)
Tmpl= \ (from_a3i0 [Occ=Once] :: Int)
(to_a3i1 [Occ=OnceL] :: Int) ->
Main.Stream
@ Int
@ Int
(\ (i_a3i3 :: Int) ->
case GHC.Classes.gtInt i_a3i3 to_a3i1 of {
False ->
Main.Yield
@ Int
@ Int
i_a3i3
(case i_a3i3 of { I# x_a5le [Occ=Once] ->
GHC.Types.I# (+# x_a5le 1#)
});
True -> Main.Done @ Int @ Int
})
from_a3i0}]
fromTo
= \ (from_a3i0 :: Int) (to_a3i1 :: Int) ->
Main.Stream
@ Int
@ Int
(\ (i_a3i3 :: Int) ->
case i_a3i3 of wild_a5iZ { I# x_a5j1 ->
case to_a3i1 of { I# y_a5j5 ->
case ># x_a5j1 y_a5j5 of {
__DEFAULT ->
Main.Yield @ Int @ Int wild_a5iZ (GHC.Types.I# (+# x_a5j1 1#));
1# -> Main.Done @ Int @ Int
}
}
})
from_a3i0
-- RHS size: {terms: 29, types: 32, coercions: 0, joins: 1/1}
sfoldl [InlPrag=INLINE (sat-args=3)]
:: forall b a s. (b -> a -> b) -> b -> Stream s a -> b
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,C(C1(U))><S,1*U><S(C(S)L),1*U(C(U),U)>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=3,unsat_ok=False,boring_ok=False)
Tmpl= \ (@ b_a4V8)
(@ a_a4V9)
(@ s_a4Va)
(acc_a4j2 [Occ=OnceL!] :: b_a4V8 -> a_a4V9 -> b_a4V8)
(z_a4j3 [Occ=Once] :: b_a4V8)
(ds_d52s [Occ=Once!] :: Stream s_a4Va a_a4V9) ->
case ds_d52s of { Stream step_a4j4 [Occ=Once] s0_a4j5 [Occ=Once] ->
case step_a4j4 of step1_X4je { __DEFAULT ->
joinrec {
go_a4Ve [Occ=LoopBreakerT[2]] :: b_a4V8 -> s_a4Va -> b_a4V8
[LclId[JoinId(2)], Arity=2, Unf=OtherCon []]
go_a4Ve (y_a4j7 [Occ=Once] :: b_a4V8)
(s1_a4j8 [Occ=Once] :: s_a4Va)
= case y_a4j7 of y1_X4jl { __DEFAULT ->
case step1_X4je s1_a4j8 of {
Done -> y1_X4jl;
Yield x_a4j9 [Occ=Once] ns_a4ja [Occ=Once] ->
jump go_a4Ve (acc_a4j2 y1_X4jl x_a4j9) ns_a4ja
}
}; } in
jump go_a4Ve z_a4j3 s0_a4j5
}
}}]
sfoldl
= \ (@ b_a4V8)
(@ a_a4V9)
(@ s_a4Va)
(acc_a4j2 :: b_a4V8 -> a_a4V9 -> b_a4V8)
(z_a4j3 :: b_a4V8)
(ds_d52s :: Stream s_a4Va a_a4V9) ->
case ds_d52s of { Stream step_a4j4 s0_a4j5 ->
joinrec {
go_s8uL [Occ=LoopBreaker] :: b_a4V8 -> s_a4Va -> b_a4V8
[LclId[JoinId(2)], Arity=2, Str=<S,1*U><L,U>, Unf=OtherCon []]
go_s8uL (y_a4j7 :: b_a4V8) (s1_a4j8 :: s_a4Va)
= case y_a4j7 of y1_X4jp { __DEFAULT ->
case step_a4j4 s1_a4j8 of {
Done -> y1_X4jp;
Yield x_a4j9 ns_a4ja ->
jump go_s8uL (acc_a4j2 y1_X4jp x_a4j9) ns_a4ja
}
}; } in
jump go_s8uL z_a4j3 s0_a4j5
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.ssum1 :: Integer
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 100 0}]
Main.ssum1 = 0
-- RHS size: {terms: 9, types: 11, coercions: 0, joins: 0/0}
ssum :: forall a s. Num a => Stream s a -> a
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<L,U(1*C(C1(U)),A,A,A,A,A,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=False)
Tmpl= \ (@ a_a4VE) (@ s_a4VF) ($dNum_a4VH :: Num a_a4VE) ->
sfoldl
@ a_a4VE
@ a_a4VE
@ s_a4VF
(+ @ a_a4VE $dNum_a4VH)
(fromInteger @ a_a4VE $dNum_a4VH Main.ssum1)}]
ssum
= \ (@ a_a4VE) (@ s_a4VF) ($dNum_a4VH :: Num a_a4VE) ->
sfoldl
@ a_a4VE
@ a_a4VE
@ s_a4VF
(+ @ a_a4VE $dNum_a4VH)
(fromInteger @ a_a4VE $dNum_a4VH Main.ssum1)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$trModule4 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$trModule4 = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$trModule3 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$trModule3 = GHC.Types.TrNameS Main.$trModule4
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$trModule2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$trModule2 = "Main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$trModule1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$trModule1 = GHC.Types.TrNameS Main.$trModule2
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$trModule :: GHC.Types.Module
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.$trModule = GHC.Types.Module Main.$trModule3 Main.$trModule1
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep_r8Qj :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2]
$krep_r8Qj = GHC.Types.KindRepVar 1#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep1_r8Qk :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2]
$krep1_r8Qk = GHC.Types.KindRepVar 0#
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.$tcStep2 = "Step"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tcStep1 = GHC.Types.TrNameS Main.$tcStep2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tcStep
= GHC.Types.TyCon
12766381590924836876##
17532131051778711994##
Main.$trModule
Main.$tcStep1
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep2_r8Ql :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2]
$krep2_r8Ql
= GHC.Types.:
@ GHC.Types.KindRep $krep_r8Qj (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r8Qm :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2]
$krep3_r8Qm
= GHC.Types.: @ GHC.Types.KindRep $krep1_r8Qk $krep2_r8Ql
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1]
Main.$tc'Done1 = GHC.Types.KindRepTyConApp Main.$tcStep $krep3_r8Qm
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Done3 = "'Done"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Done2 = GHC.Types.TrNameS Main.$tc'Done3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Done :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Done
= GHC.Types.TyCon
12461457374452162227##
16535247372730198091##
Main.$trModule
Main.$tc'Done2
2#
Main.$tc'Done1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep4_r8Qn :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
$krep4_r8Qn = GHC.Types.KindRepFun $krep1_r8Qk Main.$tc'Done1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
Main.$tc'Yield1 = GHC.Types.KindRepFun $krep_r8Qj $krep4_r8Qn
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Yield3 = "'Yield"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Yield2 = GHC.Types.TrNameS Main.$tc'Yield3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Yield
= GHC.Types.TyCon
11605012626859213932##
10048296928662928533##
Main.$trModule
Main.$tc'Yield2
2#
Main.$tc'Yield1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream2 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tcStream2 = "Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tcStream1 = GHC.Types.TrNameS Main.$tcStream2
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tcStream
= GHC.Types.TyCon
4684828220733693542##
9271748289049993304##
Main.$trModule
Main.$tcStream1
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep5_r8Qo :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1]
$krep5_r8Qo = GHC.Types.KindRepTyConApp Main.$tcStream $krep3_r8Qm
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep6_r8Qp :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
$krep6_r8Qp = GHC.Types.KindRepFun $krep1_r8Qk $krep5_r8Qo
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4]
Main.$tc'Stream1 = GHC.Types.KindRepFun $krep4_r8Qn $krep6_r8Qp
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream3 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Stream3 = "'Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.$tc'Stream2 = GHC.Types.TrNameS Main.$tc'Stream3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stream :: GHC.Types.TyCon
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Stream
= GHC.Types.TyCon
3913242768984846722##
15904583103253483572##
Main.$trModule
Main.$tc'Stream2
2#
Main.$tc'Stream1
-- RHS size: {terms: 41, types: 14, coercions: 0, joins: 3/3}
filterTest3 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8FJ [Occ=Once!] :: Int) ->
case w_s8FJ of { I# ww1_s8FM [Occ=OnceL] ->
joinrec {
$wgo_s8FI [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[2]]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<L,U><S,U>m, Unf=OtherCon []]
$wgo_s8FI (ww2_s8FC [Occ=OnceL*] :: Int#)
(ww3_s8FG [Occ=Once] :: Int#)
= joinrec {
$wgo1_s8Fx [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[1]]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wgo1_s8Fx (ww4_s8Fv :: Int#)
= case ># ww4_s8Fv ww1_s8FM of {
__DEFAULT ->
case remInt# ww4_s8Fv 2# of {
__DEFAULT -> jump $wgo1_s8Fx (+# ww4_s8Fv 1#);
0# -> jump $wgo_s8FI (+# ww2_s8FC ww4_s8Fv) (+# ww4_s8Fv 1#)
};
1# -> GHC.Types.I# ww2_s8FC
}; } in
jump $wgo1_s8Fx ww3_s8FG; } in
jump $wgo_s8FI 0# 1#
}}]
filterTest3
= \ (w_s8FJ :: Int) ->
case w_s8FJ of { I# ww1_s8FM ->
joinrec {
$wgo_s8FI [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>m, Unf=OtherCon []]
$wgo_s8FI (ww2_s8FC :: Int#) (ww3_s8FG :: Int#)
= join {
lvl_s8L9 [Dmd=<L,U(U)>] :: Int
[LclId[JoinId(0)], Str=m, Unf=OtherCon []]
lvl_s8L9 = GHC.Types.I# ww2_s8FC } in
joinrec {
$wgo1_s8Fx [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wgo1_s8Fx (ww4_s8Fv :: Int#)
= case ># ww4_s8Fv ww1_s8FM of {
__DEFAULT ->
case remInt# ww4_s8Fv 2# of {
__DEFAULT -> jump $wgo1_s8Fx (+# ww4_s8Fv 1#);
0# -> jump $wgo_s8FI (+# ww2_s8FC ww4_s8Fv) (+# ww4_s8Fv 1#)
};
1# -> jump lvl_s8L9
}; } in
jump $wgo1_s8Fx ww3_s8FG; } in
jump $wgo_s8FI 0# 1#
}
-- RHS size: {terms: 50, types: 26, coercions: 0, joins: 1/2}
Main.$wfilterTest2 [InlPrag=NOUSERINLINE[0]] :: Int# -> Int#
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S,U>,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 187 0}]
Main.$wfilterTest2
= \ (ww_s8Gc :: Int#) ->
letrec {
$wfilterStep_s8FX [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Step Int Int
[LclId, Arity=1, Str=<S,U>, Unf=OtherCon []]
$wfilterStep_s8FX
= \ (ww1_s8FV :: Int#) ->
case ># ww1_s8FV ww_s8Gc of {
__DEFAULT ->
case remInt# ww1_s8FV 2# of {
__DEFAULT -> $wfilterStep_s8FX (+# ww1_s8FV 1#);
0# ->
Main.Yield
@ Int @ Int (GHC.Types.I# ww1_s8FV) (GHC.Types.I# (+# ww1_s8FV 1#))
};
1# -> Main.Done @ Int @ Int
}; } in
joinrec {
$wgo_s8G8 [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
$wgo_s8G8 (ww1_s8G2 :: Int#) (ww2_s8G6 :: Int#)
= case $wfilterStep_s8FX ww2_s8G6 of {
Done -> ww1_s8G2;
Yield x_a4j9 ns_a4ja ->
case x_a4j9 of { I# y_a5li ->
case ns_a4ja of { I# ww4_X8IM ->
jump $wgo_s8G8 (+# ww1_s8G2 y_a5li) ww4_X8IM
}
}
}; } in
jump $wgo_s8G8 0# 1#
-- RHS size: {terms: 10, types: 4, coercions: 0, joins: 0/0}
filterTest2 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8G9 [Occ=Once!] :: Int) ->
case w_s8G9 of { I# ww1_s8Gc [Occ=Once] ->
case Main.$wfilterTest2 ww1_s8Gc of ww2_s8Gg { __DEFAULT ->
GHC.Types.I# ww2_s8Gg
}
}}]
filterTest2
= \ (w_s8G9 :: Int) ->
case w_s8G9 of { I# ww1_s8Gc ->
case Main.$wfilterTest2 ww1_s8Gc of ww2_s8Gg { __DEFAULT ->
GHC.Types.I# ww2_s8Gg
}
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
filterTest1 [InlPrag=NOUSERINLINE[0]] :: Int -> Int
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S(S),1*U(U)>m,
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_s8Gz [Occ=Once!] :: Int) ->
case w_s8Gz of { I# ww1_s8GC [Occ=OnceL] ->
joinrec {
$wgo_s8Gy [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[2]]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<L,U><S,U>m, Unf=OtherCon []]
$wgo_s8Gy (ww2_s8Gs [Occ=OnceL*] :: Int#)
(ww3_s8Gw [Occ=Once] :: Int#)
= joinrec {
$wfilterStep_s8Gn [InlPrag=NOUSERINLINE[0], Occ=LoopBreakerT[1]]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wfilterStep_s8Gn (ww4_s8Gl :: Int#)
= case ># ww4_s8Gl ww1_s8GC of {
__DEFAULT ->
case remInt# ww4_s8Gl 2# of {
__DEFAULT -> jump $wfilterStep_s8Gn (+# ww4_s8Gl 1#);
0# -> jump $wgo_s8Gy (+# ww2_s8Gs ww4_s8Gl) (+# ww4_s8Gl 1#)
};
1# -> GHC.Types.I# ww2_s8Gs
}; } in
jump $wfilterStep_s8Gn ww3_s8Gw; } in
jump $wgo_s8Gy 0# 1#
}}]
filterTest1 = filterTest3
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main_x :: Int
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
Main.main_x = GHC.Types.I# 10000#
Rec {
-- RHS size: {terms: 60, types: 37, coercions: 0, joins: 2/2}
Main.main_$s$wgo33 [Occ=LoopBreaker]
:: State# RealWorld -> Int# -> Int -> (# State# RealWorld, () #)
[GblId, Arity=3, Caf=NoCafRefs, Str=<S,U><S,U><L,U(U)>]
Main.main_$s$wgo33
= \ (sc_s8Nt :: State# RealWorld)
(sc1_s8Ns :: Int#)
(sc2_s8Nr :: Int) ->
case seq#
@ Int
@ RealWorld
(case sc2_s8Nr of { I# ww1_s8FM ->
joinrec {
$wgo_s8FI [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int# -> Int
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>m, Unf=OtherCon []]
$wgo_s8FI (ww2_s8FC :: Int#) (ww3_s8FG :: Int#)
= joinrec {
$wgo1_s8Fx [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: Int# -> Int
[LclId[JoinId(1)], Arity=1, Str=<S,U>m, Unf=OtherCon []]
$wgo1_s8Fx (ww4_s8Fv :: Int#)
= case ># ww4_s8Fv ww1_s8FM of {
__DEFAULT ->
case remInt# ww4_s8Fv 2# of {
__DEFAULT -> jump $wgo1_s8Fx (+# ww4_s8Fv 1#);
0# -> jump $wgo_s8FI (+# ww2_s8FC ww4_s8Fv) (+# ww4_s8Fv 1#)
};
1# -> GHC.Types.I# ww2_s8FC
}; } in
jump $wgo1_s8Fx ww3_s8FG; } in
jump $wgo_s8FI 0# 1#
})
sc_s8Nt
of
{ (# ipv_s8Ld, ipv3_s8Le #) ->
case <=# sc1_s8Ns 0# of {
__DEFAULT -> Main.main_$s$wgo33 ipv_s8Ld (-# sc1_s8Ns 1#) sc2_s8Nr;
1# -> (# sc_s8Nt, GHC.Tuple.() #)
}
}
end Rec }
Rec {
-- RHS size: {terms: 31, types: 28, coercions: 0, joins: 0/0}
Main.main_$s$wgo1 [Occ=LoopBreaker]
:: State# RealWorld -> Int# -> Int -> (# State# RealWorld, () #)
[GblId, Arity=3, Caf=NoCafRefs, Str=<S,U><S,U><L,U(U)>]
Main.main_$s$wgo1
= \ (sc_s8Nq :: State# RealWorld)
(sc1_s8Np :: Int#)
(sc2_s8No :: Int) ->
case seq#
@ Int
@ RealWorld
(case sc2_s8No of { I# ww1_s8Gc ->
case Main.$wfilterTest2 ww1_s8Gc of ww2_s8Gg { __DEFAULT ->
GHC.Types.I# ww2_s8Gg
}
})
sc_s8Nq
of
{ (# ipv_s8Ld, ipv3_s8Le #) ->
case <=# sc1_s8Np 0# of {
__DEFAULT -> Main.main_$s$wgo1 ipv_s8Ld (-# sc1_s8Np 1#) sc2_s8No;
1# -> (# sc_s8Nq, GHC.Tuple.() #)
}
}
end Rec }
Rec {
-- RHS size: {terms: 26, types: 27, coercions: 0, joins: 0/0}
Main.$wgo33 [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: (Int -> Int)
-> Int -> Int# -> State# RealWorld -> (# State# RealWorld, () #)
[GblId, Arity=4, Caf=NoCafRefs, Str=<L,C(U)><L,U><S,U><S,U>]
Main.$wgo33
= \ (w_s8GI :: Int -> Int)
(w1_s8GJ :: Int)
(ww_s8GO :: Int#)
(w2_s8GL :: State# RealWorld) ->
case seq# @ Int @ RealWorld (w_s8GI w1_s8GJ) w2_s8GL of
{ (# ipv_s8Ld, ipv3_s8Le #) ->
case <=# ww_s8GO 0# of {
__DEFAULT -> Main.$wgo33 w_s8GI w1_s8GJ (-# ww_s8GO 1#) ipv_s8Ld;
1# -> (# w2_s8GL, GHC.Tuple.() #)
}
}
end Rec }
-- RHS size: {terms: 12, types: 8, coercions: 0, joins: 0/0}
Main.main8 [InlPrag=NOUSERINLINE[0]]
:: (Int -> Int)
-> Int
-> GHC.Int.Int64
-> State# RealWorld
-> (# State# RealWorld, () #)
[GblId,
Arity=4,
Caf=NoCafRefs,
Str=<L,C(U)><L,U><S(S),1*U(U)><S,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= \ (w_s8GI [Occ=Once] :: Int -> Int)
(w1_s8GJ [Occ=Once] :: Int)
(w2_s8GK [Occ=Once!] :: GHC.Int.Int64)
(w3_s8GL [Occ=Once] :: State# RealWorld) ->
case w2_s8GK of { GHC.Int.I64# ww1_s8GO [Occ=Once] ->
Main.$wgo33 w_s8GI w1_s8GJ ww1_s8GO w3_s8GL
}}]
Main.main8
= \ (w_s8GI :: Int -> Int)
(w1_s8GJ :: Int)
(w2_s8GK :: GHC.Int.Int64)
(w3_s8GL :: State# RealWorld) ->
case w2_s8GK of { GHC.Int.I64# ww1_s8GO ->
Main.$wgo33 w_s8GI w1_s8GJ ww1_s8GO w3_s8GL
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main20 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.main20 = "INLINE"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main19 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main19 = GHC.CString.unpackCString# Main.main20
-- RHS size: {terms: 5, types: 10, coercions: 0, joins: 0/0}
Main.main10
:: GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=2,
Caf=NoCafRefs,
Str=<L,A><S,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= \ _ [Occ=Dead] (eta_B1 [Occ=Once] :: State# RealWorld) ->
(# eta_B1, GHC.Tuple.() #)}]
Main.main10
= \ _ [Occ=Dead] (eta_B1 :: State# RealWorld) ->
(# eta_B1, GHC.Tuple.() #)
-- RHS size: {terms: 6, types: 11, coercions: 0, joins: 0/0}
Main.main9
:: GHC.Int.Int64
-> () -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,A><L,A><S,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=True)
Tmpl= \ _ [Occ=Dead]
_ [Occ=Dead]
(eta1_B1 [Occ=Once] :: State# RealWorld) ->
(# eta1_B1, GHC.Tuple.() #)}]
Main.main9
= \ _ [Occ=Dead] _ [Occ=Dead] (eta1_B1 :: State# RealWorld) ->
(# eta1_B1, GHC.Tuple.() #)
-- RHS size: {terms: 10, types: 6, coercions: 0, joins: 0/0}
Main.main7
:: ()
-> GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,A><S(S),1*U(U)><S,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= \ _ [Occ=Dead]
(eta_B2 [Occ=Once] :: GHC.Int.Int64)
(eta1_B1 [Occ=Once] :: State# RealWorld) ->
Main.main8 filterTest3 Main.main_x eta_B2 eta1_B1}]
Main.main7
= \ _ [Occ=Dead]
(eta_B2 :: GHC.Int.Int64)
(eta1_B1 :: State# RealWorld) ->
case eta_B2 of { GHC.Int.I64# ww1_s8GO ->
Main.main_$s$wgo33 eta1_B1 ww1_s8GO Main.main_x
}
-- RHS size: {terms: 6, types: 2, coercions: 22, joins: 0/0}
Main.main6 :: Benchmarkable
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 60}]
Main.main6
= Criterion.Types.Benchmarkable
@ ()
((deepseq-1.4.3.0:Control.DeepSeq.rwhnf @ ())
`cast` (Sym (deepseq-1.4.3.0:Control.DeepSeq.N:NFData[0] <()>_N)
:: (() -> () :: *)
~R# (deepseq-1.4.3.0:Control.DeepSeq.NFData () :: Constraint)))
(Main.main10
`cast` (<GHC.Int.Int64>_R ->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> IO () :: *)))
(Main.main9
`cast` (<GHC.Int.Int64>_R
->_R <()>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> () -> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> () -> IO () :: *)))
(Main.main7
`cast` (<()>_R
->_R <GHC.Int.Int64>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (()
-> GHC.Int.Int64
-> State# RealWorld
-> (# State# RealWorld, () #) :: *)
~R# (() -> GHC.Int.Int64 -> IO () :: *)))
GHC.Types.False
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main18 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main18 = Criterion.Types.Benchmark Main.main19 Main.main6
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main17 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main17 = "Skip"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main16 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main16 = GHC.CString.unpackCString# Main.main17
-- RHS size: {terms: 10, types: 6, coercions: 0, joins: 0/0}
Main.main15
:: ()
-> GHC.Int.Int64 -> State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=3,
Caf=NoCafRefs,
Str=<L,A><S(S),1*U(U)><S,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= \ _ [Occ=Dead]
(eta_B2 [Occ=Once] :: GHC.Int.Int64)
(eta1_B1 [Occ=Once] :: State# RealWorld) ->
Main.main8 filterTest2 Main.main_x eta_B2 eta1_B1}]
Main.main15
= \ _ [Occ=Dead]
(eta_B2 :: GHC.Int.Int64)
(eta1_B1 :: State# RealWorld) ->
case eta_B2 of { GHC.Int.I64# ww1_s8GX ->
Main.main_$s$wgo1 eta1_B1 ww1_s8GX Main.main_x
}
-- RHS size: {terms: 6, types: 2, coercions: 22, joins: 0/0}
Main.main14 :: Benchmarkable
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 60}]
Main.main14
= Criterion.Types.Benchmarkable
@ ()
((deepseq-1.4.3.0:Control.DeepSeq.rwhnf @ ())
`cast` (Sym (deepseq-1.4.3.0:Control.DeepSeq.N:NFData[0] <()>_N)
:: (() -> () :: *)
~R# (deepseq-1.4.3.0:Control.DeepSeq.NFData () :: Constraint)))
(Main.main10
`cast` (<GHC.Int.Int64>_R ->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> IO () :: *)))
(Main.main9
`cast` (<GHC.Int.Int64>_R
->_R <()>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Int.Int64
-> () -> State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (GHC.Int.Int64 -> () -> IO () :: *)))
(Main.main15
`cast` (<()>_R
->_R <GHC.Int.Int64>_R
->_R Sym (GHC.Types.N:IO[0] <()>_R)
:: (()
-> GHC.Int.Int64
-> State# RealWorld
-> (# State# RealWorld, () #) :: *)
~R# (() -> GHC.Int.Int64 -> IO () :: *)))
GHC.Types.False
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main13 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main13 = Criterion.Types.Benchmark Main.main16 Main.main14
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.main12 :: Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main12 = "go"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.main11 :: [Char]
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=True,
WorkFree=False, Expandable=True, Guidance=IF_ARGS [] 20 0}]
Main.main11 = GHC.CString.unpackCString# Main.main12
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main5 :: Benchmark
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main5 = Criterion.Types.Benchmark Main.main11 Main.main6
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
Main.main4 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main4
= GHC.Types.: @ Benchmark Main.main5 (GHC.Types.[] @ Benchmark)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
Main.main3 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main3 = GHC.Types.: @ Benchmark Main.main13 Main.main4
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
Main.main2 :: [Benchmark]
[GblId,
Str=m2,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.main2 = GHC.Types.: @ Benchmark Main.main18 Main.main3
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.main1 :: State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 60}]
Main.main1 = Criterion.Main.defaultMain2 defaultConfig Main.main2
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
main :: IO ()
[GblId,
Arity=1,
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= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))}]
main
= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))
-- RHS size: {terms: 2, types: 1, coercions: 3, joins: 0/0}
Main.main21 :: State# RealWorld -> (# State# RealWorld, () #)
[GblId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
Main.main21
= GHC.TopHandler.runMainIO1
@ ()
(Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *)))
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
:Main.main :: IO ()
[GblId,
Arity=1,
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= Main.main21
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))}]
:Main.main
= Main.main21
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (State# RealWorld -> (# State# RealWorld, () #) :: *)
~R# (IO () :: *))
------ Local rules for imported ids --------
"SC:$wgo330" [0]
forall (sc_s8Nq :: State# RealWorld)
(sc1_s8Np :: Int#)
(sc2_s8No :: Int).
Main.$wgo33 filterTest2 sc2_s8No sc1_s8Np sc_s8Nq
= Main.main_$s$wgo1 sc_s8Nq sc1_s8Np sc2_s8No
"SC:$wgo331" [0]
forall (sc_s8Nt :: State# RealWorld)
(sc1_s8Ns :: Int#)
(sc2_s8Nr :: Int).
Main.$wgo33 filterTest3 sc2_s8Nr sc1_s8Ns sc_s8Nt
= Main.main_$s$wgo33 sc_s8Nt sc1_s8Ns sc2_s8Nr
{-# LANGUAGE BangPatterns #-}
module Main where
import GHC.Exts
import Criterion.Main
main :: IO ()
main = defaultMain [b1, b2, b3] where
b1 = bench "INLINE" $ whnf filterTest1 x
b2 = bench "Skip " $ whnf filterTest2 x
b3 = bench "go" $ whnf filterTest3 x
x = 10000
data Stream s a = Stream (s -> Step s a) s
data Step s a = Done | Yield a s
sfilter :: (a -> Bool) -> Stream s a -> Stream s a
sfilter pred (Stream step s0) = Stream filterStep s0 where
{-# INLINE [2] filterStep #-}
filterStep s =
case step s of
Done -> Done
Yield x ns
| pred x -> Yield x ns
| otherwise -> filterStep ns
sfilter2 :: (a -> Bool) -> Stream s a -> Stream s a
sfilter2 pred (Stream step s0) = Stream filterStep s0 where
filterStep s =
case step s of
Done -> Done
Yield x ns
| pred x -> Yield x ns
| otherwise -> filterStep ns
sfilter3 :: (a -> Bool) -> Stream s a -> Stream s a
sfilter3 pred (Stream step s0) = Stream filterStep s0 where
filterStep s =
let go s =
case step s of
Done -> Done
Yield x ns
| pred x -> Yield x ns
| otherwise -> go ns
in go s
fromTo :: Int -> Int -> Stream Int Int
{-# INLINE fromTo #-}
fromTo from to = Stream step from where
step i
| i > to = Done
| otherwise = Yield i (i + 1)
sfoldl :: (b -> a -> b) -> b -> Stream s a -> b
{-# INLINE sfoldl #-}
sfoldl acc z (Stream !step s0) = oneShot go z s0 where
go !y s = case step s of
Done -> y
Yield x ns -> go (acc y x) ns
ssum :: (Num a) => Stream s a -> a
ssum = sfoldl (+) 0
filterTest1 :: Int -> Int
filterTest1 n = ssum $ sfilter even (fromTo 1 n)
filterTest2 :: Int -> Int
filterTest2 n = ssum $ sfilter2 even (fromTo 1 n)
filterTest3 :: Int -> Int
filterTest3 n = ssum $ sfilter3 even (fromTo 1 n)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment