Skip to content

Instantly share code, notes, and snippets.

@snoyberg
Created May 19, 2017 15:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save snoyberg/a26b4086834f7e5c39d75c55729f6c46 to your computer and use it in GitHub Desktop.
Save snoyberg/a26b4086834f7e5c39d75c55729f6c46 to your computer and use it in GitHub Desktop.
==================== Tidy Core ====================
2017-05-19 15:09:30.881667 UTC
Result size of Tidy Core = {terms: 81, types: 43, coercions: 9}
-- RHS size: {terms: 2, types: 0, coercions: 0}
Main.$trModule2 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=DmdType m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
Main.$trModule2 = GHC.Types.TrNameS "main"#
-- RHS size: {terms: 2, types: 0, coercions: 0}
Main.$trModule1 :: GHC.Types.TrName
[GblId,
Caf=NoCafRefs,
Str=DmdType m1,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 30 20}]
Main.$trModule1 = GHC.Types.TrNameS "Main"#
-- RHS size: {terms: 3, types: 0, coercions: 0}
Main.$trModule :: GHC.Types.Module
[GblId,
Caf=NoCafRefs,
Str=DmdType 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.$trModule2 Main.$trModule1
Rec {
-- RHS size: {terms: 16, types: 3, coercions: 0}
Main.$wgo1 [InlPrag=[0], Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType <S,1*U><S,U>]
Main.$wgo1 =
\ (w_s6VY :: GHC.Prim.Int#)
(ww_s6W2 [OS=OneShot] :: GHC.Prim.Int#) ->
case w_s6VY of wild_Xn {
__DEFAULT ->
Main.$wgo1 (GHC.Prim.+# wild_Xn 1#) (GHC.Prim.+# ww_s6W2 wild_Xn);
10000000# -> GHC.Prim.+# ww_s6W2 10000000#
}
end Rec }
Rec {
-- RHS size: {terms: 16, types: 3, coercions: 0}
Main.$wgo [InlPrag=[0], Occ=LoopBreaker]
:: GHC.Prim.Int# -> GHC.Prim.Int# -> GHC.Prim.Int#
[GblId, Arity=2, Caf=NoCafRefs, Str=DmdType <S,1*U><S,U>]
Main.$wgo =
\ (w_s6W8 :: GHC.Prim.Int#) (ww_s6Wc :: GHC.Prim.Int#) ->
case w_s6W8 of wild_Xv {
__DEFAULT ->
Main.$wgo (GHC.Prim.+# wild_Xv 1#) (GHC.Prim.+# ww_s6Wc 1#);
10000000# -> GHC.Prim.+# ww_s6Wc 1#
}
end Rec }
-- RHS size: {terms: 22, types: 4, coercions: 0}
Main.main2 :: String
[GblId,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 133 0}]
Main.main2 =
case Main.$wgo1 1# 0# of ww_s6W6 { __DEFAULT ->
case Main.$wgo 1# 0# of ww1_s6Wg { __DEFAULT ->
case GHC.Prim./##
(GHC.Prim.int2Double# ww_s6W6) (GHC.Prim.int2Double# ww1_s6Wg)
of wild2_a4tC { __DEFAULT ->
GHC.Float.$w$sshowSignedFloat
GHC.Float.$fShowDouble_$sshowFloat
GHC.Show.shows22
wild2_a4tC
(GHC.Types.[] @ Char)
}
}
}
-- RHS size: {terms: 6, types: 2, coercions: 0}
Main.main1
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId,
Arity=1,
Str=DmdType <S,U>,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [0] 40 0}]
Main.main1 =
\ (eta_a4ud [OS=OneShot] :: GHC.Prim.State# GHC.Prim.RealWorld) ->
GHC.IO.Handle.Text.hPutStr2
GHC.IO.Handle.FD.stdout Main.main2 GHC.Types.True eta_a4ud
-- RHS size: {terms: 1, types: 0, coercions: 3}
main :: IO ()
[GblId,
Arity=1,
Str=DmdType <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}
Main.main3
:: GHC.Prim.State# GHC.Prim.RealWorld
-> (# GHC.Prim.State# GHC.Prim.RealWorld, () #)
[GblId,
Arity=1,
Str=DmdType,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 20 60}]
Main.main3 =
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}
:Main.main :: IO ()
[GblId,
Arity=1,
Str=DmdType,
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.main3
`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.main3
`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