Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
==================== Tidy Core ====================
2018-02-23 13:10:24.831160667 UTC
Result size of Tidy Core
= {terms: 763, types: 933, coercions: 17, joins: 10/34}
-- RHS size: {terms: 13, types: 16, coercions: 0, joins: 0/0}
Main.$WMkStream [InlPrag=INLINE[2]]
:: forall a s. (s -> Step s a) -> s -> Stream a
[GblId[DataConWrapper],
Arity=2,
Caf=NoCafRefs,
Str=<S,U><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=False)
Tmpl= \ (@ a_aX6)
(@ s_aX7)
(dt_a26w [Occ=Once] :: s_aX7 -> Step s_aX7 a_aX6[sk:1])
(dt_a26x [Occ=Once] :: s_aX7) ->
case dt_a26w of dt_X26B { __DEFAULT ->
case dt_a26x of dt_X26D { __DEFAULT ->
Main.MkStream @ a_aX6 @ s_aX7 dt_X26B dt_X26D
}
}}]
Main.$WMkStream
= \ (@ a_aX6)
(@ s_aX7)
(dt_a26w [Occ=Once] :: s_aX7 -> Step s_aX7 a_aX6[sk:1])
(dt_a26x [Occ=Once] :: s_aX7) ->
case dt_a26w of dt_X26B { __DEFAULT ->
case dt_a26x of dt_X26D { __DEFAULT ->
Main.MkStream @ a_aX6 @ s_aX7 dt_X26B dt_X26D
}
}
-- RHS size: {terms: 10, types: 9, coercions: 0, joins: 0/0}
Main.$WYield [InlPrag=INLINE[2]] :: forall s a. s -> a -> Step s a
[GblId[DataConWrapper],
Arity=2,
Caf=NoCafRefs,
Str=<S,U><L,U>m1,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=2,unsat_ok=True,boring_ok=False)
Tmpl= \ (@ s_aX8)
(@ a_aX9)
(dt_a25L [Occ=Once] :: s_aX8[sk:1])
(dt_a25M [Occ=Once] :: a_aX9[sk:1]) ->
case dt_a25L of dt_X25Q { __DEFAULT ->
Main.Yield @ s_aX8 @ a_aX9 dt_X25Q dt_a25M
}}]
Main.$WYield
= \ (@ s_aX8)
(@ a_aX9)
(dt_a25L [Occ=Once] :: s_aX8[sk:1])
(dt_a25M [Occ=Once] :: a_aX9[sk:1]) ->
case dt_a25L of dt_X25Q { __DEFAULT ->
Main.Yield @ s_aX8 @ a_aX9 dt_X25Q dt_a25M
}
-- RHS size: {terms: 8, types: 8, coercions: 0, joins: 0/0}
Main.$WSkip [InlPrag=INLINE[2]] :: forall s a. s -> Step s a
[GblId[DataConWrapper],
Arity=1,
Caf=NoCafRefs,
Str=<S,U>m2,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=False)
Tmpl= \ (@ s_aX8) (@ a_aX9) (dt_a25U [Occ=Once] :: s_aX8[sk:1]) ->
case dt_a25U of dt_X25Y { __DEFAULT ->
Main.Skip @ s_aX8 @ a_aX9 dt_X25Y
}}]
Main.$WSkip
= \ (@ s_aX8) (@ a_aX9) (dt_a25U [Occ=Once] :: s_aX8[sk:1]) ->
case dt_a25U of dt_X25Y { __DEFAULT ->
Main.Skip @ s_aX8 @ a_aX9 dt_X25Y
}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$trModule4 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
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 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
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_r4JQ :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep_r4JQ = GHC.Types.KindRepVar 1#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep1_r4JR :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep1_r4JR = GHC.Types.KindRepVar 0#
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep2 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
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_r4JS :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep2_r4JS
= GHC.Types.:
@ GHC.Types.KindRep $krep_r4JQ (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep3_r4JT :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep3_r4JT
= GHC.Types.: @ GHC.Types.KindRep $krep1_r4JR $krep2_r4JS
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []]
Main.$tc'Stop1 = GHC.Types.KindRepTyConApp Main.$tcStep $krep3_r4JT
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop3 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Stop3 = "'Stop"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop2 :: 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'Stop2 = GHC.Types.TrNameS Main.$tc'Stop3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop :: 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'Stop
= GHC.Types.TyCon
10304924157230869525##
14179721940744301925##
Main.$trModule
Main.$tc'Stop2
2#
Main.$tc'Stop1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
Main.$tc'Skip1 = GHC.Types.KindRepFun $krep1_r4JR Main.$tc'Stop1
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip3 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
Main.$tc'Skip3 = "'Skip"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip2 :: 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'Skip2 = GHC.Types.TrNameS Main.$tc'Skip3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip :: 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'Skip
= GHC.Types.TyCon
3094536593620165717##
4027393797195985287##
Main.$trModule
Main.$tc'Skip2
2#
Main.$tc'Skip1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep4_r4JU :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
$krep4_r4JU = GHC.Types.KindRepFun $krep_r4JQ Main.$tc'Stop1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
Main.$tc'Yield1 = GHC.Types.KindRepFun $krep1_r4JR $krep4_r4JU
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield3 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
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: 3, types: 2, coercions: 0, joins: 0/0}
$krep5_r4JV :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep5_r4JV
= GHC.Types.:
@ GHC.Types.KindRep $krep1_r4JR (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep6_r4JW :: [GHC.Types.KindRep]
[GblId, Caf=NoCafRefs, Str=m2, Unf=OtherCon []]
$krep6_r4JW
= GHC.Types.: @ GHC.Types.KindRep $krep_r4JQ $krep5_r4JV
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep7_r4JX :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []]
$krep7_r4JX = GHC.Types.KindRepTyConApp Main.$tcStep $krep6_r4JW
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep8_r4JY :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
$krep8_r4JY = GHC.Types.KindRepFun $krep_r4JQ $krep7_r4JX
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream2 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
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$*Arr*
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep9_r4JZ :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m1, Unf=OtherCon []]
$krep9_r4JZ = GHC.Types.KindRepTyConApp Main.$tcStream $krep5_r4JV
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep10_r4K0 :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
$krep10_r4K0 = GHC.Types.KindRepFun $krep_r4JQ $krep9_r4JZ
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream1 [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[GblId, Caf=NoCafRefs, Str=m4, Unf=OtherCon []]
Main.$tc'MkStream1 = GHC.Types.KindRepFun $krep8_r4JY $krep10_r4K0
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream3 :: GHC.Prim.Addr#
[GblId,
Caf=NoCafRefs,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 0}]
Main.$tc'MkStream3 = "'MkStream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream2 :: 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'MkStream2 = GHC.Types.TrNameS Main.$tc'MkStream3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream :: 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'MkStream
= GHC.Types.TyCon
10664554724138110797##
9028015683034061031##
Main.$trModule
Main.$tc'MkStream2
2#
Main.$tc'MkStream1
-- RHS size: {terms: 23, types: 7, coercions: 0, joins: 1/1}
Main.$wgoal [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Main.$wgoal
= \ (ww_s4xW :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4H2 [Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
$s$wgo_s4H2 (sc_s4H1 :: GHC.Prim.Int#) (sc1_s4H0 :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4H1 ww_s4xW of {
__DEFAULT -> sc1_s4H0;
1# ->
jump $s$wgo_s4H2
(GHC.Prim.+# sc_s4H1 1#)
(GHC.Prim.+# sc1_s4H0 (GHC.Prim.*# sc_s4H1 sc_s4H1))
}; } in
jump $s$wgo_s4H2 1# 0#
-- RHS size: {terms: 94, types: 62, coercions: 0, joins: 3/6}
Main.$wex1 [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Main.$wex1
= \ (ww_s4ym :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4GE
:: (Bool -> Step Bool Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<C(S),C(U)><S,U><S,U>]
$s$wgo_s4GE (sc_s4GD :: Bool -> Step Bool Int)
(sc1_s4GC :: GHC.Prim.Int#)
(sc2_s4GB :: GHC.Prim.Int#)
= case sc_s4GD GHC.Types.True of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4GP
sc_s4GD sB'_a20q sc1_s4GC (GHC.Prim.+# sc2_s4GB y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4GP sc_s4GD sB'_a20p sc1_s4GC sc2_s4GB;
Stop -> jump $s$wgo1_s4GA sc1_s4GC sc2_s4GB
};
$s$wgo1_s4GA [Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
$s$wgo1_s4GA (sc_s4Gz :: GHC.Prim.Int#) (sc1_s4Gy :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4Gz ww_s4ym of {
__DEFAULT -> sc1_s4Gy;
1# ->
let {
lvl1_s4qe :: GHC.Prim.Int#
[LclId]
lvl1_s4qe = GHC.Prim.*# sc_s4Gz sc_s4Gz } in
let {
lvl2_s4oi :: Int
[LclId, Unf=OtherCon []]
lvl2_s4oi = GHC.Types.I# lvl1_s4qe } in
let {
lvl3_s4nI :: Step Bool Int
[LclId, Unf=OtherCon []]
lvl3_s4nI = Main.Yield @ Bool @ Int GHC.Types.False lvl2_s4oi } in
jump $s$wgo_s4GE
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> lvl3_s4nI
})
(GHC.Prim.+# sc_s4Gz 1#)
sc1_s4Gy
};
$s$wgo2_s4GP [Occ=LoopBreaker]
:: (Bool -> Step Bool Int)
-> Bool -> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<C(S),C(U)><L,U><S,U><S,U>,
Unf=OtherCon []]
$s$wgo2_s4GP (sc_s4GH :: Bool -> Step Bool Int)
(sc1_s4GI :: Bool)
(sc2_s4GG :: GHC.Prim.Int#)
(sc3_s4GF :: GHC.Prim.Int#)
= case sc_s4GH sc1_s4GI of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4GP
sc_s4GH sB'_a20q sc2_s4GG (GHC.Prim.+# sc3_s4GF y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4GP sc_s4GH sB'_a20p sc2_s4GG sc3_s4GF;
Stop -> jump $s$wgo1_s4GA sc2_s4GG sc3_s4GF
}; } in
jump $s$wgo1_s4GA 1# 0#
-- RHS size: {terms: 3, types: 6, coercions: 0, joins: 0/0}
lvl_r4K1 :: (Bool, Maybe (Stream Int))
[GblId, Caf=NoCafRefs, Str=m, Unf=OtherCon []]
lvl_r4K1 = (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
-- RHS size: {terms: 153, types: 248, coercions: 0, joins: 3/11}
Main.$wex2 [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Main.$wex2
= \ (ww_s4yM :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4Gc
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<C(S),C(U)><S,U><S,U>]
$s$wgo_s4Gc (sc_s4Gb
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc1_s4Ga :: GHC.Prim.Int#)
(sc2_s4G9 :: GHC.Prim.Int#)
= case sc_s4Gb (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4Gn
sc_s4Gb sB'_a20q sc1_s4Ga (GHC.Prim.+# sc2_s4G9 y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4Gn sc_s4Gb sB'_a20p sc1_s4Ga sc2_s4G9;
Stop -> jump $s$wgo1_s4G8 sc1_s4Ga sc2_s4G9
};
$s$wgo1_s4G8 [Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
$s$wgo1_s4G8 (sc_s4G7 :: GHC.Prim.Int#) (sc1_s4G6 :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4G7 ww_s4yM of {
__DEFAULT -> sc1_s4G6;
1# ->
let {
lvl1_s4qy :: GHC.Prim.Int#
[LclId]
lvl1_s4qy = GHC.Prim.*# sc_s4G7 sc_s4G7 } in
let {
lvl2_s4oJ :: Int
[LclId, Unf=OtherCon []]
lvl2_s4oJ = GHC.Types.I# lvl1_s4qy } in
let {
lvl3_s4nK :: Step Bool Int
[LclId, Unf=OtherCon []]
lvl3_s4nK = Main.Yield @ Bool @ Int GHC.Types.False lvl2_s4oJ } in
let {
lvl4_s4Ed :: Bool -> Step Bool Int
[LclId, Arity=1, Str=<S,1*U>, Unf=OtherCon []]
lvl4_s4Ed
= \ (ds_X2HZ :: Bool) ->
case ds_X2HZ of {
False -> Main.Stop @ Bool @ Int;
True -> lvl3_s4nK
} } in
let {
lvl5_s4D7 :: Stream Int
[LclId, Unf=OtherCon []]
lvl5_s4D7
= Main.MkStream @ Int @ Bool lvl4_s4Ed GHC.Types.True } in
let {
lvl6_s4D8 :: Maybe (Stream Int)
[LclId, Unf=OtherCon []]
lvl6_s4D8 = GHC.Base.Just @ (Stream Int) lvl5_s4D7 } in
let {
lvl7_s4D9 :: (Bool, Maybe (Stream Int))
[LclId, Unf=OtherCon []]
lvl7_s4D9 = (GHC.Types.False, lvl6_s4D8) } in
let {
lvl8_s4CD :: Step (Bool, Maybe (Stream Int)) Int
[LclId, Unf=OtherCon []]
lvl8_s4CD
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl7_s4D9 } in
jump $s$wgo_s4Gc
(\ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds1_X2GM) ->
case ds1_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl8_s4CD
};
Just ds2_d2Ex ->
case ds2_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(GHC.Prim.+# sc_s4G7 1#)
sc1_s4G6
};
$s$wgo2_s4Gn [Occ=LoopBreaker]
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> (Bool, Maybe (Stream Int))
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<C(S),C(U)><L,U><S,U><S,U>,
Unf=OtherCon []]
$s$wgo2_s4Gn (sc_s4Gf
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc1_s4Gg :: (Bool, Maybe (Stream Int)))
(sc2_s4Ge :: GHC.Prim.Int#)
(sc3_s4Gd :: GHC.Prim.Int#)
= case sc_s4Gf sc1_s4Gg of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4Gn
sc_s4Gf sB'_a20q sc2_s4Ge (GHC.Prim.+# sc3_s4Gd y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4Gn sc_s4Gf sB'_a20p sc2_s4Ge sc3_s4Gd;
Stop -> jump $s$wgo1_s4G8 sc2_s4Ge sc3_s4Gd
}; } in
jump $s$wgo1_s4G8 1# 0#
-- RHS size: {terms: 210, types: 376, coercions: 0, joins: 3/16}
Main.$wex3 [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=1, Caf=NoCafRefs, Str=<S,U>, Unf=OtherCon []]
Main.$wex3
= \ (ww_s4zc :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4FK
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<C(S),C(U)><S,U><S,U>]
$s$wgo_s4FK (sc_s4FJ
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc1_s4FI :: GHC.Prim.Int#)
(sc2_s4FH :: GHC.Prim.Int#)
= case sc_s4FJ (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4FV
sc_s4FJ sB'_a20q sc1_s4FI (GHC.Prim.+# sc2_s4FH y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4FV sc_s4FJ sB'_a20p sc1_s4FI sc2_s4FH;
Stop -> jump $s$wgo1_s4FG sc1_s4FI sc2_s4FH
};
$s$wgo1_s4FG [Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><S,U>, Unf=OtherCon []]
$s$wgo1_s4FG (sc_s4FF :: GHC.Prim.Int#) (sc1_s4FE :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4FF ww_s4zc of {
__DEFAULT -> sc1_s4FE;
1# ->
let {
lvl1_s4qZ :: GHC.Prim.Int#
[LclId]
lvl1_s4qZ = GHC.Prim.*# sc_s4FF sc_s4FF } in
let {
lvl2_s4po :: Int
[LclId, Unf=OtherCon []]
lvl2_s4po = GHC.Types.I# lvl1_s4qZ } in
let {
lvl3_s4nM :: Step Bool Int
[LclId, Unf=OtherCon []]
lvl3_s4nM = Main.Yield @ Bool @ Int GHC.Types.False lvl2_s4po } in
let {
lvl4_s4Eq :: Bool -> Step Bool Int
[LclId, Arity=1, Str=<S,1*U>, Unf=OtherCon []]
lvl4_s4Eq
= \ (ds_X2Io :: Bool) ->
case ds_X2Io of {
False -> Main.Stop @ Bool @ Int;
True -> lvl3_s4nM
} } in
let {
lvl5_s4Dq :: Stream Int
[LclId, Unf=OtherCon []]
lvl5_s4Dq
= Main.MkStream @ Int @ Bool lvl4_s4Eq GHC.Types.True } in
let {
lvl6_s4Dr :: Maybe (Stream Int)
[LclId, Unf=OtherCon []]
lvl6_s4Dr = GHC.Base.Just @ (Stream Int) lvl5_s4Dq } in
let {
lvl7_s4Ds :: (Bool, Maybe (Stream Int))
[LclId, Unf=OtherCon []]
lvl7_s4Ds = (GHC.Types.False, lvl6_s4Dr) } in
let {
lvl8_s4CF :: Step (Bool, Maybe (Stream Int)) Int
[LclId, Unf=OtherCon []]
lvl8_s4CF
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl7_s4Ds } in
let {
lvl9_s4DA
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int
[LclId, Arity=1, Str=<S(LS),1*U(U,1*U)>, Unf=OtherCon []]
lvl9_s4DA
= \ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds1_X2GM) ->
case ds1_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl8_s4CF
};
Just ds2_d2Ex ->
case ds2_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
} } in
let {
lvl10_s4DB :: Stream Int
[LclId, Unf=OtherCon []]
lvl10_s4DB
= Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) lvl9_s4DA lvl_r4K1 } in
let {
lvl11_s4DC :: Maybe (Stream Int)
[LclId, Unf=OtherCon []]
lvl11_s4DC = GHC.Base.Just @ (Stream Int) lvl10_s4DB } in
let {
lvl12_s4DD :: (Bool, Maybe (Stream Int))
[LclId, Unf=OtherCon []]
lvl12_s4DD = (GHC.Types.False, lvl11_s4DC) } in
let {
lvl13_s4CH :: Step (Bool, Maybe (Stream Int)) Int
[LclId, Unf=OtherCon []]
lvl13_s4CH
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl12_s4DD } in
jump $s$wgo_s4FK
(\ (ds_X2Gf :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gf of { (sA_X22D, ds1_X2GO) ->
case ds1_X2GO of {
Nothing ->
case sA_X22D of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl13_s4CH
};
Just ds2_d2Ex ->
case ds2_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(GHC.Prim.+# sc_s4FF 1#)
sc1_s4FE
};
$s$wgo2_s4FV [Occ=LoopBreaker]
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> (Bool, Maybe (Stream Int))
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<C(S),C(U)><L,U><S,U><S,U>,
Unf=OtherCon []]
$s$wgo2_s4FV (sc_s4FN
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc1_s4FO :: (Bool, Maybe (Stream Int)))
(sc2_s4FM :: GHC.Prim.Int#)
(sc3_s4FL :: GHC.Prim.Int#)
= case sc_s4FN sc1_s4FO of {
Yield sB'_a20q b_a20r ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $s$wgo2_s4FV
sc_s4FN sB'_a20q sc2_s4FM (GHC.Prim.+# sc3_s4FL y_a2Uu)
};
Skip sB'_a20p ->
jump $s$wgo2_s4FV sc_s4FN sB'_a20p sc2_s4FM sc3_s4FL;
Stop -> jump $s$wgo1_s4FG sc2_s4FM sc3_s4FL
}; } in
jump $s$wgo1_s4FG 1# 0#
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
Main.main2 :: String
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 90 30}]
Main.main2
= case Main.$wex3 10# of ww_s4zg { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4zg (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
Main.main3 :: String
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 90 30}]
Main.main3
= case Main.$wex2 10# of ww_s4yQ { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4yQ (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
Main.main4 :: String
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 90 30}]
Main.main4
= case Main.$wex1 10# of ww_s4yq { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4yq (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
Main.main5 :: String
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 90 30}]
Main.main5
= case Main.$wgoal 10# of ww_s4y0 { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4y0 (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 27, types: 35, coercions: 8, joins: 0/0}
Main.main1
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId,
Arity=1,
Str=<S,U>,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 190 0}]
Main.main1
= \ (s_a2WX :: GHC.Prim.State# GHC.Prim.RealWorld) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout Main.main5 GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
s_a2WX
of
{ (# ipv_a2X0, ipv1_a2X1 #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout Main.main4 GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_a2X0
of
{ (# ipv2_X2YY, ipv3_X2Z0 #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout Main.main3 GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv2_X2YY
of
{ (# ipv4_X2Z3, ipv5_X2Z5 #) ->
((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout Main.main2 GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv4_X2Z3
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
main :: IO ()
[GblId,
Arity=1,
Str=<S,U>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)
Tmpl= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))}]
main
= Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
-- RHS size: {terms: 2, types: 1, coercions: 3, joins: 0/0}
Main.main6
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
Main.main6
= GHC.TopHandler.runMainIO1
@ ()
(Main.main1
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.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.main6
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))}]
:Main.main
= Main.main6
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
==================== Specialise ====================
2018-02-23 13:10:24.423592133 UTC
Result size of Specialise
= {terms: 874, types: 1,123, coercions: 17, joins: 4/7}
-- RHS size: {terms: 12, types: 9, coercions: 0, joins: 0/0}
singletonS [InlPrag=INLINE (sat-args=1)] :: Int -> Stream Int
[LclId,
Arity=1,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=False,boring_ok=False)
Tmpl= \ (n_aXe [Occ=OnceL] :: Int) ->
Main.$WMkStream
@ Int
@ Bool
(\ (ds_d2Fl [Occ=Once!] :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> Main.$WYield @ Bool @ Int GHC.Types.False n_aXe
})
GHC.Types.True}]
singletonS
= \ (n_aXe :: Int) ->
Main.$WMkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> Main.$WYield @ Bool @ Int GHC.Types.False n_aXe
})
GHC.Types.True
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UV :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
$trModule_s2UV = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UW :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$trModule_s2UW = GHC.Types.TrNameS $trModule_s2UV
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UX :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
$trModule_s2UX = "Main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UY :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$trModule_s2UY = GHC.Types.TrNameS $trModule_s2UX
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$trModule :: GHC.Types.Module
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
Main.$trModule = GHC.Types.Module $trModule_s2UW $trModule_s2UY
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DN [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 30 0}]
$krep_a2DN = GHC.Types.$WKindRepVar (GHC.Types.I# 1#)
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DP [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 30 0}]
$krep_a2DP = GHC.Types.$WKindRepVar (GHC.Types.I# 0#)
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcStep_s2UZ :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 0}]
$tcStep_s2UZ = "Step"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcStep_s2V0 :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tcStep_s2V0 = GHC.Types.TrNameS $tcStep_s2UZ
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep :: GHC.Types.TyCon
[LclIdX,
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
$tcStep_s2V0
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep_s2V1 :: [GHC.Types.KindRep]
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_s2V1
= GHC.Types.:
@ GHC.Types.KindRep $krep_a2DN (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_s2V2 :: [GHC.Types.KindRep]
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_s2V2 = GHC.Types.: @ GHC.Types.KindRep $krep_a2DP $krep_s2V1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DU [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DU = GHC.Types.KindRepTyConApp Main.$tcStep $krep_s2V2
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Stop_s2V3 :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
$tc'Stop_s2V3 = "'Stop"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Stop_s2V4 :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tc'Stop_s2V4 = GHC.Types.TrNameS $tc'Stop_s2V3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop :: GHC.Types.TyCon
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Stop
= GHC.Types.TyCon
10304924157230869525##
14179721940744301925##
Main.$trModule
$tc'Stop_s2V4
2#
$krep_a2DU
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DV [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DV = GHC.Types.KindRepFun $krep_a2DP $krep_a2DU
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Skip_s2V5 :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
$tc'Skip_s2V5 = "'Skip"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Skip_s2V6 :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tc'Skip_s2V6 = GHC.Types.TrNameS $tc'Skip_s2V5
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip :: GHC.Types.TyCon
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'Skip
= GHC.Types.TyCon
3094536593620165717##
4027393797195985287##
Main.$trModule
$tc'Skip_s2V6
2#
$krep_a2DV
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DT [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DT = GHC.Types.KindRepFun $krep_a2DN $krep_a2DU
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DS [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DS = GHC.Types.KindRepFun $krep_a2DP $krep_a2DT
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Yield_s2V7 :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
$tc'Yield_s2V7 = "'Yield"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Yield_s2V8 :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tc'Yield_s2V8 = GHC.Types.TrNameS $tc'Yield_s2V7
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield :: GHC.Types.TyCon
[LclIdX,
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
$tc'Yield_s2V8
2#
$krep_a2DS
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep_s2V9 :: [GHC.Types.KindRep]
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_s2V9
= GHC.Types.:
@ GHC.Types.KindRep $krep_a2DP (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_s2Va :: [GHC.Types.KindRep]
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_s2Va = GHC.Types.: @ GHC.Types.KindRep $krep_a2DN $krep_s2V9
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DO [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DO = GHC.Types.KindRepTyConApp Main.$tcStep $krep_s2Va
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DM [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DM = GHC.Types.KindRepFun $krep_a2DN $krep_a2DO
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcStream_s2Vb :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 0}]
$tcStream_s2Vb = "Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcStream_s2Vc :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tcStream_s2Vc = GHC.Types.TrNameS $tcStream_s2Vb
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream :: GHC.Types.TyCon
[LclIdX,
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
$tcStream_s2Vc
0#
GHC.Types.krep$*Arr*
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep_s2Vd :: [GHC.Types.KindRep]
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_s2Vd
= GHC.Types.:
@ GHC.Types.KindRep $krep_a2DP (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DR [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DR = GHC.Types.KindRepTyConApp Main.$tcStream $krep_s2Vd
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DQ [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DQ = GHC.Types.KindRepFun $krep_a2DN $krep_a2DR
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DL [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 30}]
$krep_a2DL = GHC.Types.KindRepFun $krep_a2DM $krep_a2DQ
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'MkStream_s2Ve :: GHC.Prim.Addr#
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 40 0}]
$tc'MkStream_s2Ve = "'MkStream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'MkStream_s2Vf :: GHC.Types.TrName
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
$tc'MkStream_s2Vf = GHC.Types.TrNameS $tc'MkStream_s2Ve
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream :: GHC.Types.TyCon
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 70}]
Main.$tc'MkStream
= GHC.Types.TyCon
10664554724138110797##
9028015683034061031##
Main.$trModule
$tc'MkStream_s2Vf
2#
$krep_a2DL
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
g_s2Vr :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
g_s2Vr = GHC.Types.I# 1#
-- RHS size: {terms: 70, types: 58, coercions: 0, joins: 1/1}
goal [InlPrag=NOINLINE] :: Int -> Int
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 455 0}]
goal
= \ (x_X2GB :: Int) ->
case case Main.$WMkStream
@ Int
@ Int
(\ (i_aXj :: Int) ->
case GHC.Classes.ltInt i_aXj x_X2GB of {
False -> Main.Stop @ Int @ Int;
True ->
Main.$WYield
@ Int
@ Int
(case i_aXj of { GHC.Types.I# x_a2Uq ->
GHC.Types.I# (GHC.Prim.+# x_a2Uq 1#)
})
i_aXj
})
g_s2Vr
of
{ MkStream @ s_a29a step_a20b s0_a20c ->
Main.$WMkStream
@ Int
@ s_a29a
(\ (s_a20e :: s_a29a) ->
case step_a20b s_a20e of {
Yield s'_a20g a_a20h ->
Main.$WYield
@ s_a29a @ Int s'_a20g (GHC.Num.$fNumInt_$c* a_a20h a_a20h);
Skip s'_a20f -> Main.$WSkip @ s_a29a @ Int s'_a20f;
Stop -> Main.Stop @ s_a29a @ Int
})
s0_a20c
}
of
{ MkStream @ s_a29x step_a201 s_a202 ->
joinrec {
go_s4nC [Occ=LoopBreaker] :: SPEC -> Int -> s_a29x -> Int
[LclId[JoinId(3)], Arity=3]
go_s4nC (sPEC_a204 :: SPEC) (acc_a205 :: Int) (s_a206 :: s_a29x)
= case sPEC_a204 of sPEC_X20f { __DEFAULT ->
case step_a201 s_a206 of {
Yield s'_a207 a_a208 ->
jump go_s4nC
sPEC_X20f (GHC.Num.$fNumInt_$c+ acc_a205 a_a208) s'_a207;
Skip s'_a209 -> jump go_s4nC sPEC_X20f acc_a205 s'_a209;
Stop -> acc_a205
}
}; } in
jump go_s4nC GHC.Types.SPEC (GHC.Types.I# 0#) s_a202
}
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
g_s2VC :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
g_s2VC = GHC.Types.I# 1#
-- RHS size: {terms: 127, types: 176, coercions: 0, joins: 1/2}
ex1 [InlPrag=NOINLINE] :: Int -> Int
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=NEVER}]
ex1
= \ (x_X2GL :: Int) ->
case case Main.$WMkStream
@ Int
@ Int
(\ (i_aXj :: Int) ->
case GHC.Classes.ltInt i_aXj x_X2GL of {
False -> Main.Stop @ Int @ Int;
True ->
Main.$WYield
@ Int
@ Int
(case i_aXj of { GHC.Types.I# x_a2Uq ->
GHC.Types.I# (GHC.Prim.+# x_a2Uq 1#)
})
i_aXj
})
g_s2VC
of
{ MkStream @ s_a280 stepA_a20j s0_a20k ->
Main.$WMkStream
@ Int
@ (s_a280, Maybe (Stream Int))
(\ (ds_d2E1 :: (s_a280, Maybe (Stream Int))) ->
case ds_d2E1 of { (sA_a20m, ds_d2Ew) ->
case ds_d2Ew of {
Nothing ->
case stepA_a20j sA_a20m of {
Yield sA'_a20u a_a20v ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20u,
GHC.Base.Just
@ (Stream Int)
(let {
n_s4ny :: Int
[LclId]
n_s4ny
= case a_a20v of { GHC.Types.I# x_a2Vk ->
GHC.Types.I# (GHC.Prim.*# x_a2Vk x_a2Vk)
} } in
Main.$WMkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> Main.$WYield @ Bool @ Int GHC.Types.False n_s4ny
})
GHC.Types.True));
Skip sA'_a20t ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20t, GHC.Base.Nothing @ (Stream Int));
Stop -> Main.Stop @ (s_a280, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_a20k, GHC.Base.Nothing @ (Stream Int))
}
of
{ MkStream @ s_a29x step_a201 s_a202 ->
joinrec {
go_s4nA [Occ=LoopBreaker] :: SPEC -> Int -> s_a29x -> Int
[LclId[JoinId(3)], Arity=3]
go_s4nA (sPEC_a204 :: SPEC) (acc_a205 :: Int) (s_a206 :: s_a29x)
= case sPEC_a204 of sPEC_X20f { __DEFAULT ->
case step_a201 s_a206 of {
Yield s'_a207 a_a208 ->
jump go_s4nA
sPEC_X20f (GHC.Num.$fNumInt_$c+ acc_a205 a_a208) s'_a207;
Skip s'_a209 -> jump go_s4nA sPEC_X20f acc_a205 s'_a209;
Stop -> acc_a205
}
}; } in
jump go_s4nA GHC.Types.SPEC (GHC.Types.I# 0#) s_a202
}
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
g_s2VY :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
g_s2VY = GHC.Types.I# 1#
-- RHS size: {terms: 189, types: 309, coercions: 0, joins: 1/2}
ex2 [InlPrag=NOINLINE] :: Int -> Int
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=NEVER}]
ex2
= \ (x_X2GV :: Int) ->
case case Main.$WMkStream
@ Int
@ Int
(\ (i_aXj :: Int) ->
case GHC.Classes.ltInt i_aXj x_X2GV of {
False -> Main.Stop @ Int @ Int;
True ->
Main.$WYield
@ Int
@ Int
(case i_aXj of { GHC.Types.I# x_a2Uq ->
GHC.Types.I# (GHC.Prim.+# x_a2Uq 1#)
})
i_aXj
})
g_s2VY
of
{ MkStream @ s_a280 stepA_a20j s0_a20k ->
Main.$WMkStream
@ Int
@ (s_a280, Maybe (Stream Int))
(\ (ds_d2E1 :: (s_a280, Maybe (Stream Int))) ->
case ds_d2E1 of { (sA_a20m, ds_d2Ew) ->
case ds_d2Ew of {
Nothing ->
case stepA_a20j sA_a20m of {
Yield sA'_a20u a_a20v ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20u,
GHC.Base.Just
@ (Stream Int)
(case singletonS a_a20v of
{ MkStream @ s_X2a8 stepA_X22s s0_X22u ->
Main.$WMkStream
@ Int
@ (s_X2a8, Maybe (Stream Int))
(\ (ds_X2Gd :: (s_X2a8, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM) ->
case ds_X2GM of {
Nothing ->
case stepA_X22s sA_X22B of {
Yield sA'_X22T a_X22V ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA'_X22T,
GHC.Base.Just
@ (Stream Int)
(let {
n_s4nu :: Int
[LclId]
n_s4nu
= case a_a20v of { GHC.Types.I# x_a2Vk ->
case a_X22V of { GHC.Types.I# y_a2Vo ->
GHC.Types.I# (GHC.Prim.*# x_a2Vk y_a2Vo)
}
} } in
Main.$WMkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True ->
Main.$WYield
@ Bool @ Int GHC.Types.False n_s4nu
})
GHC.Types.True));
Skip sA'_a20t ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA'_a20t, GHC.Base.Nothing @ (Stream Int));
Stop -> Main.Stop @ (s_X2a8, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_X22u, GHC.Base.Nothing @ (Stream Int))
}));
Skip sA'_a20t ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20t, GHC.Base.Nothing @ (Stream Int));
Stop -> Main.Stop @ (s_a280, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_a20k, GHC.Base.Nothing @ (Stream Int))
}
of
{ MkStream @ s_a29x step_a201 s_a202 ->
joinrec {
go_s4nw [Occ=LoopBreaker] :: SPEC -> Int -> s_a29x -> Int
[LclId[JoinId(3)], Arity=3]
go_s4nw (sPEC_a204 :: SPEC) (acc_a205 :: Int) (s_a206 :: s_a29x)
= case sPEC_a204 of sPEC_X20f { __DEFAULT ->
case step_a201 s_a206 of {
Yield s'_a207 a_a208 ->
jump go_s4nw
sPEC_X20f (GHC.Num.$fNumInt_$c+ acc_a205 a_a208) s'_a207;
Skip s'_a209 -> jump go_s4nw sPEC_X20f acc_a205 s'_a209;
Stop -> acc_a205
}
}; } in
jump go_s4nw GHC.Types.SPEC (GHC.Types.I# 0#) s_a202
}
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
g_s2Wq :: Int
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
g_s2Wq = GHC.Types.I# 1#
-- RHS size: {terms: 248, types: 440, coercions: 0, joins: 1/2}
ex3 [InlPrag=NOINLINE] :: Int -> Int
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=NEVER}]
ex3
= \ (x_X2H5 :: Int) ->
case case Main.$WMkStream
@ Int
@ Int
(\ (i_aXj :: Int) ->
case GHC.Classes.ltInt i_aXj x_X2H5 of {
False -> Main.Stop @ Int @ Int;
True ->
Main.$WYield
@ Int
@ Int
(case i_aXj of { GHC.Types.I# x_a2Uq ->
GHC.Types.I# (GHC.Prim.+# x_a2Uq 1#)
})
i_aXj
})
g_s2Wq
of
{ MkStream @ s_a280 stepA_a20j s0_a20k ->
Main.$WMkStream
@ Int
@ (s_a280, Maybe (Stream Int))
(\ (ds_d2E1 :: (s_a280, Maybe (Stream Int))) ->
case ds_d2E1 of { (sA_a20m, ds_d2Ew) ->
case ds_d2Ew of {
Nothing ->
case stepA_a20j sA_a20m of {
Yield sA'_a20u a_a20v ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20u,
GHC.Base.Just
@ (Stream Int)
(case singletonS a_a20v of
{ MkStream @ s_X2aa stepA_X22u s0_X22w ->
Main.$WMkStream
@ Int
@ (s_X2aa, Maybe (Stream Int))
(\ (ds_X2Gf :: (s_X2aa, Maybe (Stream Int))) ->
case ds_X2Gf of { (sA_X22D, ds_X2GO) ->
case ds_X2GO of {
Nothing ->
case stepA_X22u sA_X22D of {
Yield sA'_X22V a_X22X ->
Main.$WSkip
@ (s_X2aa, Maybe (Stream Int))
@ Int
(sA'_X22V,
GHC.Base.Just
@ (Stream Int)
(case singletonS a_X22X of
{ MkStream @ s_X2a8 stepA_X22s s0_X252 ->
Main.$WMkStream
@ Int
@ (s_X2a8, Maybe (Stream Int))
(\ (ds_X2Gd :: (s_X2a8, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM) ->
case ds_X2GM of {
Nothing ->
case stepA_X22s sA_X22B of {
Yield sA'_X22T a_X25J ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA'_X22T,
GHC.Base.Just
@ (Stream Int)
(let {
n_s4nq :: Int
[LclId]
n_s4nq
= case a_a20v of
{ GHC.Types.I# x_a2Vk ->
case a_X25J of
{ GHC.Types.I# y_a2Vo ->
GHC.Types.I#
(GHC.Prim.*#
x_a2Vk y_a2Vo)
}
} } in
Main.$WMkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False ->
Main.Stop @ Bool @ Int;
True ->
Main.$WYield
@ Bool
@ Int
GHC.Types.False
n_s4nq
})
GHC.Types.True));
Skip sA'_a20t ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA'_a20t,
GHC.Base.Nothing @ (Stream Int));
Stop ->
Main.Stop
@ (s_X2a8, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int
@ s_a28c
stepB_a20n
sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int
@ s_a28c
stepB_a20n
sB'_a20p));
Stop ->
Main.$WSkip
@ (s_X2a8, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_X252, GHC.Base.Nothing @ (Stream Int))
}));
Skip sA'_a20t ->
Main.$WSkip
@ (s_X2aa, Maybe (Stream Int))
@ Int
(sA'_a20t, GHC.Base.Nothing @ (Stream Int));
Stop -> Main.Stop @ (s_X2aa, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_X2aa, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_X2aa, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream
@ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.$WSkip
@ (s_X2aa, Maybe (Stream Int))
@ Int
(sA_X22D, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_X22w, GHC.Base.Nothing @ (Stream Int))
}));
Skip sA'_a20t ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA'_a20t, GHC.Base.Nothing @ (Stream Int));
Stop -> Main.Stop @ (s_a280, Maybe (Stream Int)) @ Int
};
Just ds_d2Ex ->
case ds_d2Ex of { MkStream @ s_a28c stepB_a20n sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.$WYield
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m,
GHC.Base.Just
@ (Stream Int)
(Main.$WMkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.$WSkip
@ (s_a280, Maybe (Stream Int))
@ Int
(sA_a20m, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
(s0_a20k, GHC.Base.Nothing @ (Stream Int))
}
of
{ MkStream @ s_a29x step_a201 s_a202 ->
joinrec {
go_s4ns [Occ=LoopBreaker] :: SPEC -> Int -> s_a29x -> Int
[LclId[JoinId(3)], Arity=3]
go_s4ns (sPEC_a204 :: SPEC) (acc_a205 :: Int) (s_a206 :: s_a29x)
= case sPEC_a204 of sPEC_X20f { __DEFAULT ->
case step_a201 s_a206 of {
Yield s'_a207 a_a208 ->
jump go_s4ns
sPEC_X20f (GHC.Num.$fNumInt_$c+ acc_a205 a_a208) s'_a207;
Skip s'_a209 -> jump go_s4ns sPEC_X20f acc_a205 s'_a209;
Stop -> acc_a205
}
}; } in
jump go_s4ns GHC.Types.SPEC (GHC.Types.I# 0#) s_a202
}
-- RHS size: {terms: 47, types: 39, coercions: 8, joins: 0/0}
main_s2Xz
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 470 0}]
main_s2Xz
= \ (s_a2WX :: GHC.Prim.State# GHC.Prim.RealWorld) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout
(GHC.Show.showSignedInt
GHC.Show.$fShow(,)1
(goal (GHC.Types.I# 10#))
(GHC.Types.[] @ Char))
GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
s_a2WX
of
{ (# ipv_a2X0, ipv1_a2X1 #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout
(GHC.Show.showSignedInt
GHC.Show.$fShow(,)1 (ex1 (GHC.Types.I# 10#)) (GHC.Types.[] @ Char))
GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_a2X0
of
{ (# ipv_X2YY, ipv1_X2Z0 #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout
(GHC.Show.showSignedInt
GHC.Show.$fShow(,)1 (ex2 (GHC.Types.I# 10#)) (GHC.Types.[] @ Char))
GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_X2YY
of
{ (# ipv_X2Z3, ipv1_X2Z5 #) ->
((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout
(GHC.Show.showSignedInt
GHC.Show.$fShow(,)1 (ex3 (GHC.Types.I# 10#)) (GHC.Types.[] @ Char))
GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_X2Z3
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
main :: IO ()
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
main
= main_s2Xz
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
-- RHS size: {terms: 2, types: 1, coercions: 3, joins: 0/0}
main_s4l3
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[LclId,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
main_s4l3
= GHC.TopHandler.runMainIO1
@ ()
(main_s2Xz
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *)))
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
:Main.main :: IO ()
[LclIdX,
Arity=1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)}]
:Main.main
= main_s4l3
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
==================== SpecConstr ====================
2018-02-23 13:10:24.721607792 UTC
Result size of SpecConstr
= {terms: 1,235, types: 1,553, coercions: 17, joins: 14/62}
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UV :: GHC.Prim.Addr#
[LclId]
$trModule_s2UV = "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UW :: GHC.Types.TrName
[LclId, Str=m1]
$trModule_s2UW = GHC.Types.TrNameS $trModule_s2UV
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UX :: GHC.Prim.Addr#
[LclId]
$trModule_s2UX = "Main"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$trModule_s2UY :: GHC.Types.TrName
[LclId, Str=m1]
$trModule_s2UY = GHC.Types.TrNameS $trModule_s2UX
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
Main.$trModule :: GHC.Types.Module
[LclIdX, Str=m]
Main.$trModule = GHC.Types.Module $trModule_s2UW $trModule_s2UY
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep_a2DN [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m2]
$krep_a2DN = GHC.Types.KindRepVar 1#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$krep_a2DP [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m2]
$krep_a2DP = GHC.Types.KindRepVar 0#
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcStep_s2UZ :: GHC.Prim.Addr#
[LclId]
$tcStep_s2UZ = "Step"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcStep_s2V0 :: GHC.Types.TrName
[LclId, Str=m1]
$tcStep_s2V0 = GHC.Types.TrNameS $tcStep_s2UZ
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStep :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tcStep
= GHC.Types.TyCon
12766381590924836876##
17532131051778711994##
Main.$trModule
$tcStep_s2V0
0#
GHC.Types.krep$*->*->*
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep_s2V1 :: [GHC.Types.KindRep]
[LclId, Str=m2]
$krep_s2V1
= GHC.Types.:
@ GHC.Types.KindRep $krep_a2DN (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_s2V2 :: [GHC.Types.KindRep]
[LclId, Str=m2]
$krep_s2V2 = GHC.Types.: @ GHC.Types.KindRep $krep_a2DP $krep_s2V1
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DU [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m1]
$krep_a2DU = GHC.Types.KindRepTyConApp Main.$tcStep $krep_s2V2
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Stop_s2V3 :: GHC.Prim.Addr#
[LclId]
$tc'Stop_s2V3 = "'Stop"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Stop_s2V4 :: GHC.Types.TrName
[LclId, Str=m1]
$tc'Stop_s2V4 = GHC.Types.TrNameS $tc'Stop_s2V3
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Stop :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tc'Stop
= GHC.Types.TyCon
10304924157230869525##
14179721940744301925##
Main.$trModule
$tc'Stop_s2V4
2#
$krep_a2DU
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DV [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DV = GHC.Types.KindRepFun $krep_a2DP $krep_a2DU
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Skip_s2V5 :: GHC.Prim.Addr#
[LclId]
$tc'Skip_s2V5 = "'Skip"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Skip_s2V6 :: GHC.Types.TrName
[LclId, Str=m1]
$tc'Skip_s2V6 = GHC.Types.TrNameS $tc'Skip_s2V5
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Skip :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tc'Skip
= GHC.Types.TyCon
3094536593620165717##
4027393797195985287##
Main.$trModule
$tc'Skip_s2V6
2#
$krep_a2DV
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DT [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DT = GHC.Types.KindRepFun $krep_a2DN $krep_a2DU
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DS [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DS = GHC.Types.KindRepFun $krep_a2DP $krep_a2DT
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'Yield_s2V7 :: GHC.Prim.Addr#
[LclId]
$tc'Yield_s2V7 = "'Yield"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'Yield_s2V8 :: GHC.Types.TrName
[LclId, Str=m1]
$tc'Yield_s2V8 = GHC.Types.TrNameS $tc'Yield_s2V7
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'Yield :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tc'Yield
= GHC.Types.TyCon
11605012626859213932##
10048296928662928533##
Main.$trModule
$tc'Yield_s2V8
2#
$krep_a2DS
-- RHS size: {terms: 3, types: 2, coercions: 0, joins: 0/0}
$krep_s2V9 :: [GHC.Types.KindRep]
[LclId, Str=m2]
$krep_s2V9
= GHC.Types.:
@ GHC.Types.KindRep $krep_a2DP (GHC.Types.[] @ GHC.Types.KindRep)
-- RHS size: {terms: 3, types: 1, coercions: 0, joins: 0/0}
$krep_s2Va :: [GHC.Types.KindRep]
[LclId, Str=m2]
$krep_s2Va = GHC.Types.: @ GHC.Types.KindRep $krep_a2DN $krep_s2V9
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DO [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m1]
$krep_a2DO = GHC.Types.KindRepTyConApp Main.$tcStep $krep_s2Va
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DM [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DM = GHC.Types.KindRepFun $krep_a2DN $krep_a2DO
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tcStream_s2Vb :: GHC.Prim.Addr#
[LclId]
$tcStream_s2Vb = "Stream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tcStream_s2Vc :: GHC.Types.TrName
[LclId, Str=m1]
$tcStream_s2Vc = GHC.Types.TrNameS $tcStream_s2Vb
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tcStream :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tcStream
= GHC.Types.TyCon
4684828220733693542##
9271748289049993304##
Main.$trModule
$tcStream_s2Vc
0#
GHC.Types.krep$*Arr*
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DR [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m1]
$krep_a2DR = GHC.Types.KindRepTyConApp Main.$tcStream $krep_s2V9
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DQ [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DQ = GHC.Types.KindRepFun $krep_a2DN $krep_a2DR
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0}
$krep_a2DL [InlPrag=NOUSERINLINE[~]] :: GHC.Types.KindRep
[LclId, Str=m4]
$krep_a2DL = GHC.Types.KindRepFun $krep_a2DM $krep_a2DQ
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0}
$tc'MkStream_s2Ve :: GHC.Prim.Addr#
[LclId]
$tc'MkStream_s2Ve = "'MkStream"#
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0}
$tc'MkStream_s2Vf :: GHC.Types.TrName
[LclId, Str=m1]
$tc'MkStream_s2Vf = GHC.Types.TrNameS $tc'MkStream_s2Ve
-- RHS size: {terms: 7, types: 0, coercions: 0, joins: 0/0}
Main.$tc'MkStream :: GHC.Types.TyCon
[LclIdX, Str=m]
Main.$tc'MkStream
= GHC.Types.TyCon
10664554724138110797##
9028015683034061031##
Main.$trModule
$tc'MkStream_s2Vf
2#
$krep_a2DL
-- RHS size: {terms: 49, types: 16, coercions: 0, joins: 2/2}
$wgoal_s4y1 [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[LclId, Arity=1, Str=<S,U>]
$wgoal_s4y1
= \ (ww_s4xW :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4H2 :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><L,U>]
$s$wgo_s4H2 (sc_s4H1 [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4H0 :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4H1 ww_s4xW of {
__DEFAULT -> sc_s4H0;
1# ->
jump $wgo_s4xS
GHC.Types.SPEC
(GHC.Prim.+# sc_s4H0 (GHC.Prim.*# sc_s4H1 sc_s4H1))
(GHC.Prim.+# sc_s4H1 1#)
};
$wgo_s4xS [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: SPEC -> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)],
Arity=3,
Str=<S,1*U><L,U><S,U>m,
RULES: "SC:$wgo0" [0]
forall (sc_s4H1 :: GHC.Prim.Int#) (sc_s4H0 :: GHC.Prim.Int#).
$wgo_s4xS GHC.Types.SPEC sc_s4H0 sc_s4H1
= jump $s$wgo_s4H2 sc_s4H1 sc_s4H0]
$wgo_s4xS (w_s4xH [Dmd=<S,1*U>] :: SPEC)
(ww_s4xM :: GHC.Prim.Int#)
(ww_s4xQ [Dmd=<S,U>] :: GHC.Prim.Int#)
= case w_s4xH of sPEC_X20f { __DEFAULT ->
case GHC.Prim.<# ww_s4xQ ww_s4xW of {
__DEFAULT -> ww_s4xM;
1# ->
jump $wgo_s4xS
sPEC_X20f
(GHC.Prim.+# ww_s4xM (GHC.Prim.*# ww_s4xQ ww_s4xQ))
(GHC.Prim.+# ww_s4xQ 1#)
}
}; } in
jump $wgo_s4xS GHC.Types.SPEC 0# 1#
-- RHS size: {terms: 197, types: 150, coercions: 0, joins: 4/10}
$wex1_s4yr [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[LclId, Arity=1, Str=<S,U>]
$wex1_s4yr
= \ (ww_s4ym :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4GP
:: (Bool -> Step Bool Int)
-> Bool -> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(4)], Arity=4, Str=<L,U><L,U><S,U><L,U>]
$s$wgo_s4GP (sc_s4GH :: Bool -> Step Bool Int)
(sc_s4GI :: Bool)
(sc_s4GG [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4GF :: GHC.Prim.Int#)
= case sc_s4GH sc_s4GI of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yi
GHC.Types.SPEC
(GHC.Prim.+# sc_s4GF y_a2Uu)
sc_s4GG
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ Bool sc_s4GH sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yi
GHC.Types.SPEC
sc_s4GF
sc_s4GG
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ Bool sc_s4GH sB'_a20p));
Stop ->
jump $wgo_s4yi
GHC.Types.SPEC sc_s4GF sc_s4GG (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4GE
:: (Bool -> Step Bool Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<L,U><S,U><L,U>]
$s$wgo_s4GE (sc_s4GD :: Bool -> Step Bool Int)
(sc_s4GC [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4GB :: GHC.Prim.Int#)
= case sc_s4GD GHC.Types.True of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yi
GHC.Types.SPEC
(GHC.Prim.+# sc_s4GB y_a2Uu)
sc_s4GC
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ Bool sc_s4GD sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yi
GHC.Types.SPEC
sc_s4GB
sc_s4GC
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ Bool sc_s4GD sB'_a20p));
Stop ->
jump $wgo_s4yi
GHC.Types.SPEC sc_s4GB sc_s4GC (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4GA :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><L,U>]
$s$wgo_s4GA (sc_s4Gz [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4Gy :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4Gz ww_s4ym of {
__DEFAULT -> sc_s4Gy;
1# ->
jump $wgo_s4yi
GHC.Types.SPEC
sc_s4Gy
(GHC.Prim.+# sc_s4Gz 1#)
(GHC.Base.Just
@ (Stream Int)
(let {
lvl_s4qe :: GHC.Prim.Int#
[LclId]
lvl_s4qe = GHC.Prim.*# sc_s4Gz sc_s4Gz } in
let {
lvl_s4oi :: Int
[LclId]
lvl_s4oi = GHC.Types.I# lvl_s4qe } in
let {
lvl_s4nI :: Step Bool Int
[LclId]
lvl_s4nI = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4oi } in
Main.MkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nI
})
GHC.Types.True))
};
$wgo_s4yi [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: SPEC
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> Maybe (Stream Int)
-> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<S,1*U><L,U><S,U><S,1*U>m,
RULES: "SC:$wgo2" [0]
forall (sc_s4GH :: Bool -> Step Bool Int)
(sc_s4GI :: Bool)
(sc_s4GG :: GHC.Prim.Int#)
(sc_s4GF :: GHC.Prim.Int#).
$wgo_s4yi GHC.Types.SPEC
sc_s4GF
sc_s4GG
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ Bool sc_s4GH sc_s4GI))
= jump $s$wgo_s4GP sc_s4GH sc_s4GI sc_s4GG sc_s4GF
"SC:$wgo1" [0]
forall (sc_s4GD :: Bool -> Step Bool Int)
(sc_s4GC :: GHC.Prim.Int#)
(sc_s4GB :: GHC.Prim.Int#).
$wgo_s4yi GHC.Types.SPEC
sc_s4GB
sc_s4GC
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ Bool sc_s4GD GHC.Types.True))
= jump $s$wgo_s4GE sc_s4GD sc_s4GC sc_s4GB
"SC:$wgo0" [0]
forall (sc_s4Gz :: GHC.Prim.Int#) (sc_s4Gy :: GHC.Prim.Int#).
$wgo_s4yi GHC.Types.SPEC
sc_s4Gy
sc_s4Gz
(GHC.Base.Nothing @ (Stream Int))
= jump $s$wgo_s4GA sc_s4Gz sc_s4Gy]
$wgo_s4yi (w_s4y2 [Dmd=<S,1*U>] :: SPEC)
(ww_s4y7 :: GHC.Prim.Int#)
(ww_s4ye [Dmd=<S,U>] :: GHC.Prim.Int#)
(ww_s4yg [Dmd=<S,1*U>] :: Maybe (Stream Int))
= case w_s4y2 of sPEC_X20f { __DEFAULT ->
case ww_s4yg of {
Nothing ->
case GHC.Prim.<# ww_s4ye ww_s4ym of {
__DEFAULT -> ww_s4y7;
1# ->
jump $wgo_s4yi
sPEC_X20f
ww_s4y7
(GHC.Prim.+# ww_s4ye 1#)
(GHC.Base.Just
@ (Stream Int)
(let {
lvl_s4qe :: GHC.Prim.Int#
[LclId]
lvl_s4qe = GHC.Prim.*# ww_s4ye ww_s4ye } in
let {
lvl_s4oi :: Int
[LclId]
lvl_s4oi = GHC.Types.I# lvl_s4qe } in
let {
lvl_s4nI :: Step Bool Int
[LclId]
lvl_s4nI = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4oi } in
Main.MkStream
@ Int
@ Bool
(\ (ds_d2Fl :: Bool) ->
case ds_d2Fl of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nI
})
GHC.Types.True))
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yi
sPEC_X20f
(GHC.Prim.+# ww_s4y7 y_a2Uu)
ww_s4ye
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yi
sPEC_X20f
ww_s4y7
ww_s4ye
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
jump $wgo_s4yi
sPEC_X20f ww_s4y7 ww_s4ye (GHC.Base.Nothing @ (Stream Int))
}
}
}
}; } in
jump $wgo_s4yi
GHC.Types.SPEC 0# 1# (GHC.Base.Nothing @ (Stream Int))
-- RHS size: {terms: 3, types: 6, coercions: 0, joins: 0/0}
lvl_s4CE :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4CE = (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
-- RHS size: {terms: 313, types: 476, coercions: 0, joins: 4/20}
$wex2_s4yR [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[LclId, Arity=1, Str=<S,U>]
$wex2_s4yR
= \ (ww_s4yM :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4Gn
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> (Bool, Maybe (Stream Int))
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> GHC.Prim.Int#
[LclId[JoinId(4)], Arity=4, Str=<L,U><L,U><S,U><L,U>]
$s$wgo_s4Gn (sc_s4Gf
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4Gg :: (Bool, Maybe (Stream Int)))
(sc_s4Ge [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4Gd :: GHC.Prim.Int#)
= case sc_s4Gf sc_s4Gg of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yI
GHC.Types.SPEC
(GHC.Prim.+# sc_s4Gd y_a2Uu)
sc_s4Ge
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4Gf sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yI
GHC.Types.SPEC
sc_s4Gd
sc_s4Ge
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4Gf sB'_a20p));
Stop ->
jump $wgo_s4yI
GHC.Types.SPEC sc_s4Gd sc_s4Ge (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4Gc
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<L,U><S,U><L,U>]
$s$wgo_s4Gc (sc_s4Gb
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4Ga [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4G9 :: GHC.Prim.Int#)
= case sc_s4Gb (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yI
GHC.Types.SPEC
(GHC.Prim.+# sc_s4G9 y_a2Uu)
sc_s4Ga
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4Gb sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yI
GHC.Types.SPEC
sc_s4G9
sc_s4Ga
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4Gb sB'_a20p));
Stop ->
jump $wgo_s4yI
GHC.Types.SPEC sc_s4G9 sc_s4Ga (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4G8 :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><L,U>]
$s$wgo_s4G8 (sc_s4G7 [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4G6 :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4G7 ww_s4yM of {
__DEFAULT -> sc_s4G6;
1# ->
let {
lvl_s4qy :: GHC.Prim.Int#
[LclId]
lvl_s4qy = GHC.Prim.*# sc_s4G7 sc_s4G7 } in
let {
lvl_s4oJ :: Int
[LclId]
lvl_s4oJ = GHC.Types.I# lvl_s4qy } in
let {
lvl_s4nK :: Step Bool Int
[LclId]
lvl_s4nK = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4oJ } in
let {
lvl_s4Ed :: Bool -> Step Bool Int
[LclId, Arity=1]
lvl_s4Ed
= \ (ds_X2HZ :: Bool) ->
case ds_X2HZ of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nK
} } in
let {
lvl_s4D7 :: Stream Int
[LclId]
lvl_s4D7 = Main.MkStream @ Int @ Bool lvl_s4Ed GHC.Types.True } in
let {
lvl_s4D8 :: Maybe (Stream Int)
[LclId]
lvl_s4D8 = GHC.Base.Just @ (Stream Int) lvl_s4D7 } in
let {
lvl_s4D9 :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4D9 = (GHC.Types.False, lvl_s4D8) } in
let {
lvl_s4CD :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CD
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4D9 } in
jump $wgo_s4yI
GHC.Types.SPEC
sc_s4G6
(GHC.Prim.+# sc_s4G7 1#)
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
(\ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM [Dmd=<S,U>]) ->
case ds_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CD
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
lvl_s4CE))
};
$wgo_s4yI [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: SPEC
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> Maybe (Stream Int)
-> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<S,1*U><L,U><S,U><S,1*U>m,
RULES: "SC:$wgo2" [0]
forall (sc_s4Gf
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4Gg :: (Bool, Maybe (Stream Int)))
(sc_s4Ge :: GHC.Prim.Int#)
(sc_s4Gd :: GHC.Prim.Int#).
$wgo_s4yI GHC.Types.SPEC
sc_s4Gd
sc_s4Ge
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4Gf sc_s4Gg))
= jump $s$wgo_s4Gn sc_s4Gf sc_s4Gg sc_s4Ge sc_s4Gd
"SC:$wgo1" [0]
forall (sc_s4Gb
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4Ga :: GHC.Prim.Int#)
(sc_s4G9 :: GHC.Prim.Int#).
$wgo_s4yI GHC.Types.SPEC
sc_s4G9
sc_s4Ga
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
sc_s4Gb
(GHC.Types.True, GHC.Base.Nothing @ (Stream Int))))
= jump $s$wgo_s4Gc sc_s4Gb sc_s4Ga sc_s4G9
"SC:$wgo0" [0]
forall (sc_s4G7 :: GHC.Prim.Int#) (sc_s4G6 :: GHC.Prim.Int#).
$wgo_s4yI GHC.Types.SPEC
sc_s4G6
sc_s4G7
(GHC.Base.Nothing @ (Stream Int))
= jump $s$wgo_s4G8 sc_s4G7 sc_s4G6]
$wgo_s4yI (w_s4ys [Dmd=<S,1*U>] :: SPEC)
(ww_s4yx :: GHC.Prim.Int#)
(ww_s4yE [Dmd=<S,U>] :: GHC.Prim.Int#)
(ww_s4yG [Dmd=<S,1*U>] :: Maybe (Stream Int))
= case w_s4ys of sPEC_X20f { __DEFAULT ->
case ww_s4yG of {
Nothing ->
case GHC.Prim.<# ww_s4yE ww_s4yM of {
__DEFAULT -> ww_s4yx;
1# ->
let {
lvl_s4qy :: GHC.Prim.Int#
[LclId]
lvl_s4qy = GHC.Prim.*# ww_s4yE ww_s4yE } in
let {
lvl_s4oJ :: Int
[LclId]
lvl_s4oJ = GHC.Types.I# lvl_s4qy } in
let {
lvl_s4nK :: Step Bool Int
[LclId]
lvl_s4nK = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4oJ } in
let {
lvl_s4Ed :: Bool -> Step Bool Int
[LclId, Arity=1]
lvl_s4Ed
= \ (ds_X2HZ :: Bool) ->
case ds_X2HZ of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nK
} } in
let {
lvl_s4D7 :: Stream Int
[LclId]
lvl_s4D7 = Main.MkStream @ Int @ Bool lvl_s4Ed GHC.Types.True } in
let {
lvl_s4D8 :: Maybe (Stream Int)
[LclId]
lvl_s4D8 = GHC.Base.Just @ (Stream Int) lvl_s4D7 } in
let {
lvl_s4D9 :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4D9 = (GHC.Types.False, lvl_s4D8) } in
let {
lvl_s4CD :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CD
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4D9 } in
jump $wgo_s4yI
sPEC_X20f
ww_s4yx
(GHC.Prim.+# ww_s4yE 1#)
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
(\ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM [Dmd=<S,U>]) ->
case ds_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CD
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
lvl_s4CE))
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4yI
sPEC_X20f
(GHC.Prim.+# ww_s4yx y_a2Uu)
ww_s4yE
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4yI
sPEC_X20f
ww_s4yx
ww_s4yE
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
jump $wgo_s4yI
sPEC_X20f ww_s4yx ww_s4yE (GHC.Base.Nothing @ (Stream Int))
}
}
}
}; } in
jump $wgo_s4yI
GHC.Types.SPEC 0# 1# (GHC.Base.Nothing @ (Stream Int))
-- RHS size: {terms: 427, types: 732, coercions: 0, joins: 4/30}
$wex3_s4zh [InlPrag=NOINLINE] :: GHC.Prim.Int# -> GHC.Prim.Int#
[LclId, Arity=1, Str=<S,U>]
$wex3_s4zh
= \ (ww_s4zc :: GHC.Prim.Int#) ->
joinrec {
$s$wgo_s4FV
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> (Bool, Maybe (Stream Int))
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> GHC.Prim.Int#
[LclId[JoinId(4)], Arity=4, Str=<L,U><L,U><S,U><L,U>]
$s$wgo_s4FV (sc_s4FN
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4FO :: (Bool, Maybe (Stream Int)))
(sc_s4FM [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4FL :: GHC.Prim.Int#)
= case sc_s4FN sc_s4FO of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4z8
GHC.Types.SPEC
(GHC.Prim.+# sc_s4FL y_a2Uu)
sc_s4FM
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4FN sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4z8
GHC.Types.SPEC
sc_s4FL
sc_s4FM
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4FN sB'_a20p));
Stop ->
jump $wgo_s4z8
GHC.Types.SPEC sc_s4FL sc_s4FM (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4FK
:: ((Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
-> GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(3)], Arity=3, Str=<L,U><S,U><L,U>]
$s$wgo_s4FK (sc_s4FJ
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4FI [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4FH :: GHC.Prim.Int#)
= case sc_s4FJ (GHC.Types.True, GHC.Base.Nothing @ (Stream Int))
of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4z8
GHC.Types.SPEC
(GHC.Prim.+# sc_s4FH y_a2Uu)
sc_s4FI
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4FJ sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4z8
GHC.Types.SPEC
sc_s4FH
sc_s4FI
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4FJ sB'_a20p));
Stop ->
jump $wgo_s4z8
GHC.Types.SPEC sc_s4FH sc_s4FI (GHC.Base.Nothing @ (Stream Int))
};
$s$wgo_s4FG :: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[LclId[JoinId(2)], Arity=2, Str=<S,U><L,U>]
$s$wgo_s4FG (sc_s4FF [Dmd=<S,U>] :: GHC.Prim.Int#)
(sc_s4FE :: GHC.Prim.Int#)
= case GHC.Prim.<# sc_s4FF ww_s4zc of {
__DEFAULT -> sc_s4FE;
1# ->
let {
lvl_s4qZ :: GHC.Prim.Int#
[LclId]
lvl_s4qZ = GHC.Prim.*# sc_s4FF sc_s4FF } in
let {
lvl_s4po :: Int
[LclId]
lvl_s4po = GHC.Types.I# lvl_s4qZ } in
let {
lvl_s4nM :: Step Bool Int
[LclId]
lvl_s4nM = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4po } in
let {
lvl_s4Eq :: Bool -> Step Bool Int
[LclId, Arity=1]
lvl_s4Eq
= \ (ds_X2Io :: Bool) ->
case ds_X2Io of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nM
} } in
let {
lvl_s4Dq :: Stream Int
[LclId]
lvl_s4Dq = Main.MkStream @ Int @ Bool lvl_s4Eq GHC.Types.True } in
let {
lvl_s4Dr :: Maybe (Stream Int)
[LclId]
lvl_s4Dr = GHC.Base.Just @ (Stream Int) lvl_s4Dq } in
let {
lvl_s4Ds :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4Ds = (GHC.Types.False, lvl_s4Dr) } in
let {
lvl_s4CF :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CF
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4Ds } in
let {
lvl_s4DA
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int
[LclId, Arity=1]
lvl_s4DA
= \ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM [Dmd=<S,U>]) ->
case ds_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CF
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
} } in
let {
lvl_s4DB :: Stream Int
[LclId]
lvl_s4DB
= Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) lvl_s4DA lvl_s4CE } in
let {
lvl_s4DC :: Maybe (Stream Int)
[LclId]
lvl_s4DC = GHC.Base.Just @ (Stream Int) lvl_s4DB } in
let {
lvl_s4DD :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4DD = (GHC.Types.False, lvl_s4DC) } in
let {
lvl_s4CH :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CH
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4DD } in
jump $wgo_s4z8
GHC.Types.SPEC
sc_s4FE
(GHC.Prim.+# sc_s4FF 1#)
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
(\ (ds_X2Gf :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gf of { (sA_X22D, ds_X2GO [Dmd=<S,U>]) ->
case ds_X2GO of {
Nothing ->
case sA_X22D of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CH
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
lvl_s4CE))
};
$wgo_s4z8 [InlPrag=NOUSERINLINE[0], Occ=LoopBreaker]
:: SPEC
-> GHC.Prim.Int#
-> GHC.Prim.Int#
-> Maybe (Stream Int)
-> GHC.Prim.Int#
[LclId[JoinId(4)],
Arity=4,
Str=<S,1*U><L,U><S,U><S,1*U>m,
RULES: "SC:$wgo2" [0]
forall (sc_s4FN
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4FO :: (Bool, Maybe (Stream Int)))
(sc_s4FM :: GHC.Prim.Int#)
(sc_s4FL :: GHC.Prim.Int#).
$wgo_s4z8 GHC.Types.SPEC
sc_s4FL
sc_s4FM
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) sc_s4FN sc_s4FO))
= jump $s$wgo_s4FV sc_s4FN sc_s4FO sc_s4FM sc_s4FL
"SC:$wgo1" [0]
forall (sc_s4FJ
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int)
(sc_s4FI :: GHC.Prim.Int#)
(sc_s4FH :: GHC.Prim.Int#).
$wgo_s4z8 GHC.Types.SPEC
sc_s4FH
sc_s4FI
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
sc_s4FJ
(GHC.Types.True, GHC.Base.Nothing @ (Stream Int))))
= jump $s$wgo_s4FK sc_s4FJ sc_s4FI sc_s4FH
"SC:$wgo0" [0]
forall (sc_s4FF :: GHC.Prim.Int#) (sc_s4FE :: GHC.Prim.Int#).
$wgo_s4z8 GHC.Types.SPEC
sc_s4FE
sc_s4FF
(GHC.Base.Nothing @ (Stream Int))
= jump $s$wgo_s4FG sc_s4FF sc_s4FE]
$wgo_s4z8 (w_s4yS [Dmd=<S,1*U>] :: SPEC)
(ww_s4yX :: GHC.Prim.Int#)
(ww_s4z4 [Dmd=<S,U>] :: GHC.Prim.Int#)
(ww_s4z6 [Dmd=<S,1*U>] :: Maybe (Stream Int))
= case w_s4yS of sPEC_X20f { __DEFAULT ->
case ww_s4z6 of {
Nothing ->
case GHC.Prim.<# ww_s4z4 ww_s4zc of {
__DEFAULT -> ww_s4yX;
1# ->
let {
lvl_s4qZ :: GHC.Prim.Int#
[LclId]
lvl_s4qZ = GHC.Prim.*# ww_s4z4 ww_s4z4 } in
let {
lvl_s4po :: Int
[LclId]
lvl_s4po = GHC.Types.I# lvl_s4qZ } in
let {
lvl_s4nM :: Step Bool Int
[LclId]
lvl_s4nM = Main.Yield @ Bool @ Int GHC.Types.False lvl_s4po } in
let {
lvl_s4Eq :: Bool -> Step Bool Int
[LclId, Arity=1]
lvl_s4Eq
= \ (ds_X2Io :: Bool) ->
case ds_X2Io of {
False -> Main.Stop @ Bool @ Int;
True -> lvl_s4nM
} } in
let {
lvl_s4Dq :: Stream Int
[LclId]
lvl_s4Dq = Main.MkStream @ Int @ Bool lvl_s4Eq GHC.Types.True } in
let {
lvl_s4Dr :: Maybe (Stream Int)
[LclId]
lvl_s4Dr = GHC.Base.Just @ (Stream Int) lvl_s4Dq } in
let {
lvl_s4Ds :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4Ds = (GHC.Types.False, lvl_s4Dr) } in
let {
lvl_s4CF :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CF
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4Ds } in
let {
lvl_s4DA
:: (Bool, Maybe (Stream Int))
-> Step (Bool, Maybe (Stream Int)) Int
[LclId, Arity=1]
lvl_s4DA
= \ (ds_X2Gd :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gd of { (sA_X22B, ds_X2GM [Dmd=<S,U>]) ->
case ds_X2GM of {
Nothing ->
case sA_X22B of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CF
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22B, GHC.Base.Nothing @ (Stream Int))
}
}
}
} } in
let {
lvl_s4DB :: Stream Int
[LclId]
lvl_s4DB
= Main.MkStream
@ Int @ (Bool, Maybe (Stream Int)) lvl_s4DA lvl_s4CE } in
let {
lvl_s4DC :: Maybe (Stream Int)
[LclId]
lvl_s4DC = GHC.Base.Just @ (Stream Int) lvl_s4DB } in
let {
lvl_s4DD :: (Bool, Maybe (Stream Int))
[LclId]
lvl_s4DD = (GHC.Types.False, lvl_s4DC) } in
let {
lvl_s4CH :: Step (Bool, Maybe (Stream Int)) Int
[LclId]
lvl_s4CH
= Main.Skip @ (Bool, Maybe (Stream Int)) @ Int lvl_s4DD } in
jump $wgo_s4z8
sPEC_X20f
ww_s4yX
(GHC.Prim.+# ww_s4z4 1#)
(GHC.Base.Just
@ (Stream Int)
(Main.MkStream
@ Int
@ (Bool, Maybe (Stream Int))
(\ (ds_X2Gf :: (Bool, Maybe (Stream Int))) ->
case ds_X2Gf of { (sA_X22D, ds_X2GO [Dmd=<S,U>]) ->
case ds_X2GO of {
Nothing ->
case sA_X22D of {
False -> Main.Stop @ (Bool, Maybe (Stream Int)) @ Int;
True -> lvl_s4CH
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r ->
Main.Yield
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
b_a20r;
Skip sB'_a20p ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D,
GHC.Base.Just
@ (Stream Int)
(Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
Main.Skip
@ (Bool, Maybe (Stream Int))
@ Int
(sA_X22D, GHC.Base.Nothing @ (Stream Int))
}
}
}
})
lvl_s4CE))
};
Just ds_d2Ex [Dmd=<S,U>] ->
case ds_d2Ex of
{ MkStream @ s_a28c stepB_a20n [Dmd=<C(S),U>] sB_a20o ->
case stepB_a20n sB_a20o of {
Yield sB'_a20q b_a20r [Dmd=<S(S),U(U)>] ->
case b_a20r of { GHC.Types.I# y_a2Uu ->
jump $wgo_s4z8
sPEC_X20f
(GHC.Prim.+# ww_s4yX y_a2Uu)
ww_s4z4
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20q))
};
Skip sB'_a20p ->
jump $wgo_s4z8
sPEC_X20f
ww_s4yX
ww_s4z4
(GHC.Base.Just
@ (Stream Int) (Main.MkStream @ Int @ s_a28c stepB_a20n sB'_a20p));
Stop ->
jump $wgo_s4z8
sPEC_X20f ww_s4yX ww_s4z4 (GHC.Base.Nothing @ (Stream Int))
}
}
}
}; } in
jump $wgo_s4z8
GHC.Types.SPEC 0# 1# (GHC.Base.Nothing @ (Stream Int))
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
lvl_s4CM :: String
[LclId]
lvl_s4CM
= case $wex3_s4zh 10# of ww_s4zg { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4zg (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
lvl_s4CL :: String
[LclId]
lvl_s4CL
= case $wex2_s4yR 10# of ww_s4yQ { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4yQ (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
lvl_s4CK :: String
[LclId]
lvl_s4CK
= case $wex1_s4yr 10# of ww_s4yq { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4yq (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 13, types: 12, coercions: 0, joins: 0/0}
lvl_s4CJ :: String
[LclId]
lvl_s4CJ
= case $wgoal_s4y1 10# of ww_s4y0 { __DEFAULT ->
case GHC.Show.$wshowSignedInt 0# ww_s4y0 (GHC.Types.[] @ Char) of
{ (# ww5_a2Xs, ww6_a2Xt #) ->
GHC.Types.: @ Char ww5_a2Xs ww6_a2Xt
}
}
-- RHS size: {terms: 27, types: 35, coercions: 8, joins: 0/0}
main_s2Xz
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[LclId, Arity=1, Str=<S,U>]
main_s2Xz
= \ (s_a2WX [Dmd=<S,U>] :: GHC.Prim.State# GHC.Prim.RealWorld) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout lvl_s4CJ GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
s_a2WX
of
{ (# ipv_a2X0 [Dmd=<S,U>], ipv1_a2X1 [Dmd=<L,A>] #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout lvl_s4CK GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_a2X0
of
{ (# ipv_X2YY [Dmd=<S,U>], ipv1_X2Z0 [Dmd=<L,A>] #) ->
case ((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout lvl_s4CL GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_X2YY
of
{ (# ipv_X2Z3 [Dmd=<S,U>], ipv1_X2Z5 [Dmd=<L,A>] #) ->
((GHC.IO.Handle.Text.hPutStr'
GHC.IO.Handle.FD.stdout lvl_s4CM GHC.Types.True)
`cast` (GHC.Types.N:IO[0] <()>_R
:: (IO () :: *)
~R# (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)))
ipv_X2Z3
}
}
}
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
main :: IO ()
[LclIdX,
Arity=1,
Str=<S,U>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=0,unsat_ok=True,boring_ok=True)
Tmpl= main_s2Xz
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))}]
main
= main_s2Xz
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
-- RHS size: {terms: 2, types: 1, coercions: 3, joins: 0/0}
main_s4l3
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[LclId, Arity=1]
main_s4l3
= GHC.TopHandler.runMainIO1
@ ()
(main_s2Xz
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *)))
-- RHS size: {terms: 1, types: 0, coercions: 3, joins: 0/0}
:Main.main :: IO ()
[LclIdX,
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_s4l3
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))}]
:Main.main
= main_s4l3
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
{-# LANGUAGE ExistentialQuantification, BangPatterns #-}
import GHC.Types (SPEC(..))
data Step s a
= Yield !s a
| Skip !s
| Stop
data Stream a
= forall s. MkStream !(s -> Step s a) !s
singletonS :: Int -> Stream Int
singletonS n = MkStream step True
where
step True = Yield False n
step False = Stop
{-# INLINE singletonS #-}