Skip to content

Instantly share code, notes, and snippets.

@angerman
Created November 28, 2017 12:35
Show Gist options
  • Save angerman/e4c0f36b9ec7a97c7089e7888328bcf3 to your computer and use it in GitHub Desktop.
Save angerman/e4c0f36b9ec7a97c7089e7888328bcf3 to your computer and use it in GitHub Desktop.
==================== Tidy Core ====================
2017-11-28 12:35:17.812664 UTC
Result size of Tidy Core
= {terms: 121, types: 172, coercions: 9, joins: 0/0}
-- RHS size: {terms: 3, types: 3, coercions: 0, joins: 0/0}
f [InlPrag=NOINLINE] :: forall a. a -> a
[GblId,
Arity=1,
Caf=NoCafRefs,
Str=<S,1*U>,
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)
Tmpl= \ (@ a_a2CI) (x_a1by [Occ=Once] :: a_a2CI) -> x_a1by}]
f = \ (@ a_a2CI) (x_a1by :: a_a2CI) -> x_a1by
-- 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}
y :: Word64
[GblId,
Caf=NoCafRefs,
Str=m,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 10 20}]
y = GHC.Word.W64# 128L##
-- RHS size: {terms: 27, types: 47, coercions: 0, joins: 0/0}
Main.main_z :: Word64
[GblId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 130 20}]
Main.main_z
= case f @ Word64 y of { GHC.Word.W64# ww1_a2Sy ->
case {__pkg_ccall ghc-prim-0.5.2.0 Word64#
-> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SC
ww1_a2Sy GHC.Prim.realWorld#
of
{ (# ds1_a2SI, ds2_a2SJ #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Word64#
-> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SH
ww1_a2Sy GHC.Prim.realWorld#
of
{ (# ds4_a2SO, ds5_a2SP #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Int64#
-> Int64# -> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SN
ds5_a2SP ds2_a2SJ GHC.Prim.realWorld#
of
{ (# ds6_a2SU, ds3_a2SV #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Int64#
-> State# RealWorld -> (# State# RealWorld, Word64# #)}_a2ST
ds3_a2SV GHC.Prim.realWorld#
of
{ (# ds7_a2SZ, ds8_a2T0 #) ->
GHC.Word.W64# ds8_a2T0
}
}
}
}
}
-- RHS size: {terms: 13, types: 13, 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.main_z of { GHC.Word.W64# ww1_a3qk ->
case GHC.Show.$w$cshowsPrec4
0#
(integer-simple-0.1.1.1:GHC.Integer.Type.word64ToInteger ww1_a3qk)
(GHC.Types.[] @ Char)
of
{ (# ww3_a3qo, ww4_a3qp #) ->
GHC.Types.: @ Char ww3_a3qo ww4_a3qp
}
}
-- RHS size: {terms: 36, types: 58, 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 [] 150 0}]
Main.main3
= case Main.main_z of { GHC.Word.W64# x_a3pI ->
case {__pkg_ccall ghc-prim-0.5.2.0 Word64#
-> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SC
128L## GHC.Prim.realWorld#
of
{ (# ds1_a2SI, ds2_a2SJ #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Word64#
-> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SH
128L## GHC.Prim.realWorld#
of
{ (# ds4_a2SO, ds5_a2SP #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Int64#
-> Int64# -> State# RealWorld -> (# State# RealWorld, Int64# #)}_a2SN
ds5_a2SP ds2_a2SJ GHC.Prim.realWorld#
of
{ (# ds6_a2SU, ds3_a2SV #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Int64#
-> State# RealWorld -> (# State# RealWorld, Word64# #)}_a2ST
ds3_a2SV GHC.Prim.realWorld#
of
{ (# ds7_a2SZ, ds8_a2T0 #) ->
case {__pkg_ccall ghc-prim-0.5.2.0 Word64#
-> Word64# -> State# RealWorld -> (# State# RealWorld, Int# #)}_a3pM
x_a3pI ds8_a2T0 GHC.Prim.realWorld#
of
{ (# ds11_a3pR, ds12_a3pS #) ->
case ds12_a3pS of {
__DEFAULT -> GHC.Show.$fShowBool4;
1# -> GHC.Show.$fShowBool2
}
}
}
}
}
}
}
-- RHS size: {terms: 13, types: 13, coercions: 0, 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] 90 0}]
Main.main1
= \ (s_a2Tn :: GHC.Prim.State# GHC.Prim.RealWorld) ->
case GHC.IO.Handle.Text.hPutStr2
GHC.IO.Handle.FD.stdout Main.main3 GHC.Types.True s_a2Tn
of
{ (# ipv_a2Tq, ipv1_a2Tr #) ->
GHC.IO.Handle.Text.hPutStr2
GHC.IO.Handle.FD.stdout Main.main2 GHC.Types.True ipv_a2Tq
}
-- 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.main4
:: 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.main4
= 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.main4
`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.main4
`cast` (Sym (GHC.Types.N:IO[0] <()>_R)
:: (GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #) :: *)
~R# (IO () :: *))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment