Last active
October 24, 2018 04:04
-
-
Save chessai/f492fc46dc52f49fbd230acbffdbec6b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{-# LANGUAGE BangPatterns #-} | |
{-# LANGUAGE MagicHash #-} | |
module Strict (idInt, idIntCon) where | |
import GHC.Types | |
idIntCon :: Int -> Int | |
idIntCon (I# x) = (I# x) | |
idInt :: Int -> Int | |
idInt !x = x |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================== Tidy Core ==================== | |
Result size of Tidy Core | |
= {terms: 20, types: 11, coercions: 0, joins: 0/0} | |
-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0} | |
idIntCon :: Int -> Int | |
[GblId, Arity=1, Caf=NoCafRefs] | |
idIntCon = \ (ds_dWX :: Int) -> ds_dWX | |
-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0} | |
idInt :: Int -> Int | |
[GblId, Arity=1, Caf=NoCafRefs] | |
idInt = \ (x_aVL :: Int) -> x_aVL | |
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} | |
$trModule1_rWS :: GHC.Prim.Addr# | |
[GblId, Caf=NoCafRefs] | |
$trModule1_rWS = "main"# | |
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} | |
$trModule2_rXb :: TrName | |
[GblId, Caf=NoCafRefs] | |
$trModule2_rXb = GHC.Types.TrNameS $trModule1_rWS | |
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} | |
$trModule3_rXc :: GHC.Prim.Addr# | |
[GblId, Caf=NoCafRefs] | |
$trModule3_rXc = "Strict"# | |
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} | |
$trModule4_rXd :: TrName | |
[GblId, Caf=NoCafRefs] | |
$trModule4_rXd = GHC.Types.TrNameS $trModule3_rXc | |
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} | |
Strict.$trModule :: Module | |
[GblId, Caf=NoCafRefs] | |
Strict.$trModule = GHC.Types.Module $trModule2_rXb $trModule4_rXd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
==================== Tidy Core ==================== | |
Result size of Tidy Core | |
= {terms: 19, types: 10, coercions: 0, joins: 0/0} | |
-- RHS size: {terms: 2, types: 1, coercions: 0, joins: 0/0} | |
idIntCon :: Int -> Int | |
[GblId, | |
Arity=1, | |
Caf=NoCafRefs, | |
Str=<S,1*U(U)>m, | |
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, | |
WorkFree=True, Expandable=True, | |
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True) | |
Tmpl= \ (ds_dYf [Occ=Once] :: Int) -> ds_dYf}] | |
idIntCon = \ (ds_dYf :: Int) -> ds_dYf | |
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} | |
idInt :: Int -> Int | |
[GblId, | |
Arity=1, | |
Caf=NoCafRefs, | |
Str=<S,1*U(U)>m, | |
Unf=Unf{Src=InlineStable, TopLvl=True, Value=True, ConLike=True, | |
WorkFree=True, Expandable=True, | |
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True) | |
Tmpl= \ (x_aX0 [Occ=Once] :: Int) -> x_aX0}] | |
idInt = idIntCon | |
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} | |
Strict.$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}] | |
Strict.$trModule4 = "main"# | |
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} | |
Strict.$trModule3 :: 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}] | |
Strict.$trModule3 = GHC.Types.TrNameS Strict.$trModule4 | |
-- RHS size: {terms: 1, types: 0, coercions: 0, joins: 0/0} | |
Strict.$trModule2 :: 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}] | |
Strict.$trModule2 = "Strict"# | |
-- RHS size: {terms: 2, types: 0, coercions: 0, joins: 0/0} | |
Strict.$trModule1 :: 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}] | |
Strict.$trModule1 = GHC.Types.TrNameS Strict.$trModule2 | |
-- RHS size: {terms: 3, types: 0, coercions: 0, joins: 0/0} | |
Strict.$trModule :: 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}] | |
Strict.$trModule | |
= GHC.Types.Module Strict.$trModule3 Strict.$trModule1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment