1 Breaks the IdInfo/<everything> loops.
6 --import PreludePS ( _PackedString )
7 import FastString ( FastString )
8 import PreludeStdIO ( Maybe )
10 import BinderInfo ( BinderInfo )
11 import CoreSyn ( CoreExpr(..), GenCoreExpr, GenCoreArg )
12 import CoreUnfold ( Unfolding(..), UnfoldingGuidance(..), mkUnfolding,
13 SimpleUnfolding(..), FormSummary(..), noUnfolding )
14 import CoreUtils ( unTagBinders )
15 import Id ( externallyVisibleId, isDataCon, isWorkerId, isWrapperId,
16 unfoldingUnfriendlyId, getIdInfo, nmbrId, pprId, idName,
17 nullIdEnv, lookupIdEnv, IdEnv(..),
21 import CostCentre ( CostCentre,
22 noCostCentre, subsumedCosts, cafifyCC,
23 useCurrentCostCentre, dontCareCostCentre,
24 overheadCostCentre, preludeCafsCostCentre,
25 preludeDictsCostCentre, mkAllCafsCC,
26 mkAllDictsCC, mkUserCC
28 import IdInfo ( IdInfo, DemandInfo )
29 import SpecEnv ( SpecEnv, nullSpecEnv, isNullSpecEnv )
30 import Literal ( Literal )
31 import MagicUFs ( mkMagicUnfoldingFun, MagicUnfoldingFun )
32 import OccurAnal ( occurAnalyseGlobalExpr )
33 import Outputable ( Outputable(..), PprStyle )
34 import PprType ( pprParendGenType )
35 import PragmaInfo ( PragmaInfo )
37 import Type ( GenType )
38 import TyVar ( GenTyVar )
39 import UniqFM ( UniqFM )
40 import Unique ( Unique )
41 import Usage ( GenUsage )
42 import Util ( Ord3(..) )
43 import WwLib ( mAX_WORKER_ARGS )
44 import StdIdInfo ( addStandardIdInfo ) -- Used in Id, but StdIdInfo needs lots of stuff from Id
46 addStandardIdInfo :: Id -> Id
48 nullSpecEnv :: SpecEnv
49 isNullSpecEnv :: SpecEnv -> Bool
51 -- occurAnalyseGlobalExpr :: GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique)) (GenId (GenType (GenTyVar (GenUsage Unique)) Unique)) (GenTyVar (GenUsage Unique)) Unique -> GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique), BinderInfo) (GenId (GenType (GenTyVar (GenUsage Unique)) Unique)) (GenTyVar (GenUsage Unique)) Unique
52 -- unTagBinders :: GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique), a) b c d -> GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique)) b c d
54 externallyVisibleId :: Id -> Bool
55 isDataCon :: GenId ty -> Bool
56 isWorkerId :: GenId ty -> Bool
57 pprId :: Outputable ty => PprStyle -> GenId ty -> Doc
58 mkMagicUnfoldingFun :: Unique -> MagicUnfoldingFun
62 type IdEnv a = UniqFM a
63 type CoreExpr = GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique))
64 (GenId (GenType (GenTyVar (GenUsage Unique)) Unique))
65 (GenTyVar (GenUsage Unique)) Unique
67 instance Outputable UnfoldingGuidance
69 instance Outputable Unique
70 instance Eq (GenTyVar a)
71 instance Ord3 (GenTyVar a)
72 instance Outputable (GenTyVar a)
73 instance (Outputable a) => Outputable (GenId a)
74 instance (Eq a, Outputable a, Eq b, Outputable b) => Outputable (GenType a b)
78 data MagicUnfoldingFun
79 data FormSummary = VarForm | ValueForm | BottomForm | OtherForm
83 -- | CoreUnfolding SimpleUnfolding
84 -- | MagicUnfolding Unique MagicUnfoldingFun
87 noUnfolding :: Unfolding
88 mkUnfolding :: PragmaInfo -> CoreExpr -> Unfolding
90 -- data SimpleUnfolding = SimpleUnfolding FormSummary UnfoldingGuidance (GenCoreExpr (GenId (GenType (GenTyVar (GenUsage Unique)) Unique), BinderInfo) (GenId (GenType (GenTyVar (GenUsage Unique)) Unique)) (GenTyVar (GenUsage Unique)) Unique)
93 data UnfoldingGuidance
96 | UnfoldIfGoodArgs Int Int [Bool] Int
100 noCostCentre :: CostCentre
101 subsumedCosts :: CostCentre
102 useCurrentCostCentre :: CostCentre
103 dontCareCostCentre :: CostCentre
104 overheadCostCentre :: CostCentre
105 preludeCafsCostCentre :: CostCentre
106 preludeDictsCostCentre :: Bool -> CostCentre
107 mkAllCafsCC :: FastString -> FastString -> CostCentre
108 mkAllDictsCC :: FastString -> FastString -> Bool -> CostCentre
109 mkUserCC :: FastString -> FastString -> FastString -> CostCentre
110 cafifyCC :: CostCentre -> CostCentre