1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
|
{-# GHC_PRAGMA INTERFACE VERSION 5 #-}
interface SimplEnv where
import BasicLit(BasicLit)
import BinderInfo(BinderInfo(..), DuplicationDanger, FunOrArg, InsideSCC)
import CmdLineOpts(GlobalSwitch, SimplifierSwitch, SwitchResult)
import CoreSyn(CoreArg, CoreAtom, CoreBinding, CoreCaseAlternatives, CoreCaseDefault, CoreExpr)
import CostCentre(CostCentre)
import FiniteMap(FiniteMap)
import Id(Id)
import IdEnv(IdEnv(..))
import IdInfo(StrictnessInfo)
import MagicUFs(MagicUnfoldingFun)
import Maybes(Labda)
import Outputable(Outputable)
import PreludePS(_PackedString)
import PreludeRatio(Ratio(..))
import Pretty(PrettyRep)
import PrimKind(PrimKind)
import PrimOps(PrimOp)
import TyVar(TyVar)
import TyVarEnv(TyVarEnv(..), nullTyVarEnv)
import UniType(UniType)
import UniqFM(UniqFM)
import Unique(Unique)
data BasicLit
data BinderInfo = DeadCode | ManyOcc Int | OneOcc FunOrArg DuplicationDanger InsideSCC Int Int
data DuplicationDanger
data FunOrArg
data InsideSCC
data GlobalSwitch
data SimplifierSwitch
data CoreAtom a
data CoreCaseAlternatives a b
data CoreExpr a b
data EnclosingCcDetails = NoEnclosingCcDetails | EnclosingCC CostCentre
data FormSummary = WhnfForm | BottomForm | OtherForm
data Id
type IdEnv a = UniqFM a
data IdVal = InlineIt (UniqFM IdVal) (UniqFM UniType) (CoreExpr (Id, BinderInfo) Id) | ItsAnAtom (CoreAtom Id)
type InAlts = CoreCaseAlternatives (Id, BinderInfo) Id
type InArg = CoreArg Id
type InAtom = CoreAtom Id
type InBinder = (Id, BinderInfo)
type InBinding = CoreBinding (Id, BinderInfo) Id
type InDefault = CoreCaseDefault (Id, BinderInfo) Id
type InExpr = CoreExpr (Id, BinderInfo) Id
type InId = Id
type InIdEnv = UniqFM IdVal
type InType = UniType
type InTypeEnv = UniqFM UniType
type InUniType = UniType
data MagicUnfoldingFun
data Labda a
type OutAlts = CoreCaseAlternatives Id Id
type OutArg = CoreArg Id
type OutAtom = CoreAtom Id
type OutBinder = Id
type OutBinding = CoreBinding Id Id
type OutDefault = CoreCaseDefault Id Id
type OutExpr = CoreExpr Id Id
type OutId = Id
type OutType = UniType
type OutUniType = UniType
data SimplEnv
type SwitchChecker a = a -> SwitchResult
data SwitchResult
data TyVar
type TyVarEnv a = UniqFM a
data UnfoldConApp
data UnfoldEnv
data UnfoldItem
data UnfoldingDetails = NoUnfoldingDetails | LiteralForm BasicLit | OtherLiteralForm [BasicLit] | ConstructorForm Id [UniType] [CoreAtom Id] | OtherConstructorForm [Id] | GeneralForm Bool FormSummary (CoreExpr (Id, BinderInfo) Id) UnfoldingGuidance | MagicForm _PackedString MagicUnfoldingFun | IWantToBeINLINEd UnfoldingGuidance
data UnfoldingGuidance = UnfoldNever | UnfoldAlways | EssentialUnfolding | UnfoldIfGoodArgs Int Int [Bool] Int | BadUnfolding
data UniType
data UniqFM a
data Unique
extendIdEnvWithAtom :: SimplEnv -> (Id, BinderInfo) -> CoreAtom Id -> SimplEnv
extendIdEnvWithAtomList :: SimplEnv -> [((Id, BinderInfo), CoreAtom Id)] -> SimplEnv
extendIdEnvWithClone :: SimplEnv -> (Id, BinderInfo) -> Id -> SimplEnv
extendIdEnvWithClones :: SimplEnv -> [(Id, BinderInfo)] -> [Id] -> SimplEnv
extendIdEnvWithInlining :: SimplEnv -> SimplEnv -> (Id, BinderInfo) -> CoreExpr (Id, BinderInfo) Id -> SimplEnv
extendTyEnv :: SimplEnv -> TyVar -> UniType -> SimplEnv
extendTyEnvList :: SimplEnv -> [(TyVar, UniType)] -> SimplEnv
extendUnfoldEnvGivenConstructor :: SimplEnv -> Id -> Id -> [Id] -> SimplEnv
extendUnfoldEnvGivenFormDetails :: SimplEnv -> Id -> UnfoldingDetails -> SimplEnv
extendUnfoldEnvGivenRhs :: SimplEnv -> (Id, BinderInfo) -> Id -> CoreExpr Id Id -> SimplEnv
filterUnfoldEnvForInlines :: SimplEnv -> SimplEnv
getSwitchChecker :: SimplEnv -> SimplifierSwitch -> SwitchResult
lookForConstructor :: SimplEnv -> Id -> [UniType] -> [CoreAtom Id] -> Labda Id
lookupId :: SimplEnv -> Id -> Labda IdVal
lookupUnfolding :: SimplEnv -> Id -> UnfoldingDetails
mkFormSummary :: StrictnessInfo -> CoreExpr a Id -> FormSummary
nullInEnvs :: (UniqFM UniType, UniqFM IdVal)
nullSimplEnv :: (SimplifierSwitch -> SwitchResult) -> SimplEnv
nullTyVarEnv :: UniqFM a
pprSimplEnv :: SimplEnv -> Int -> Bool -> PrettyRep
replaceInEnvs :: SimplEnv -> (UniqFM UniType, UniqFM IdVal) -> SimplEnv
setEnclosingCC :: SimplEnv -> EnclosingCcDetails -> SimplEnv
simplTy :: SimplEnv -> UniType -> UniType
simplTyInId :: SimplEnv -> Id -> Id
switchIsSet :: SimplEnv -> SimplifierSwitch -> Bool
instance Eq UnfoldConApp
instance Ord UnfoldConApp
instance Outputable FormSummary
instance Outputable UnfoldingGuidance
|