1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
4 import BasicLit(BasicLit)
6 import Class(Class, ClassOp)
7 import CmdLineOpts(GlobalSwitch)
8 import CostCentre(CostCentre)
11 import HsMatches(GRHS, GRHSsAndBinds)
14 import IdEnv(IdEnv(..))
18 import NameTypes(FullName, ShortName)
19 import Outputable(ExportFlag, NamedThing(..), Outputable(..))
20 import PreludePS(_PackedString)
21 import PreludeRatio(Ratio(..))
22 import Pretty(Delay, PprStyle, Pretty(..), PrettyRep)
23 import PrimKind(PrimKind)
24 import PrimOps(PrimOp)
27 import TyVar(TyVar, TyVarTemplate)
28 import TyVarEnv(TyVarEnv(..))
29 import UniType(SigmaType(..), TauType(..), ThetaType(..), UniType)
31 import UniqSet(UniqSet(..))
33 class NamedThing a where
34 getExportFlag :: a -> ExportFlag
35 isLocallyDefined :: a -> Bool
36 getOrigName :: a -> (_PackedString, _PackedString)
37 getOccurrenceName :: a -> _PackedString
38 getInformingModules :: a -> [_PackedString]
39 getSrcLoc :: a -> SrcLoc
40 getTheUnique :: a -> Unique
42 getType :: a -> UniType
43 fromPreludeCore :: a -> Bool
44 class Outputable a where
45 ppr :: PprStyle -> a -> Int -> Bool -> PrettyRep
54 data GRHSsAndBinds a b
57 type IdEnv a = UniqFM a
64 type PlainStgAtom = StgAtom Id
65 type PlainStgBinding = StgBinding Id Id
66 type PlainStgCaseAlternatives = StgCaseAlternatives Id Id
67 type PlainStgCaseDefault = StgCaseDefault Id Id
68 type PlainStgExpr = StgExpr Id Id
69 type PlainStgLiveVars = UniqFM Id
70 type PlainStgProgram = [StgBinding Id Id]
71 type PlainStgRhs = StgRhs Id Id
73 type Pretty = Int -> Bool -> PrettyRep
78 data StgAtom a = StgVarAtom a | StgLitAtom BasicLit
79 data StgBinderInfo = NoStgBinderInfo | StgBinderInfo Bool Bool Bool Bool Bool
80 data StgBinding a b = StgNonRec a (StgRhs a b) | StgRec [(a, StgRhs a b)]
81 data StgCaseAlternatives a b = StgAlgAlts UniType [(Id, [a], [Bool], StgExpr a b)] (StgCaseDefault a b) | StgPrimAlts UniType [(BasicLit, StgExpr a b)] (StgCaseDefault a b)
82 data StgCaseDefault a b = StgNoDefault | StgBindDefault a Bool (StgExpr a b)
83 data StgExpr a b = StgApp (StgAtom b) [StgAtom b] (UniqFM b) | StgConApp Id [StgAtom b] (UniqFM b) | StgPrimApp PrimOp [StgAtom b] (UniqFM b) | StgCase (StgExpr a b) (UniqFM b) (UniqFM b) Unique (StgCaseAlternatives a b) | StgLet (StgBinding a b) (StgExpr a b) | StgLetNoEscape (UniqFM b) (UniqFM b) (StgBinding a b) (StgExpr a b) | StgSCC UniType CostCentre (StgExpr a b)
84 type StgLiveVars a = UniqFM a
85 data StgRhs a b = StgRhsClosure CostCentre StgBinderInfo [b] UpdateFlag [a] (StgExpr a b) | StgRhsCon CostCentre Id [StgAtom b]
89 type TyVarEnv a = UniqFM a
90 type SigmaType = UniType
91 type TauType = UniType
92 type ThetaType = [(Class, UniType)]
95 type UniqSet a = UniqFM a
97 data UpdateFlag = ReEntrant | Updatable | SingleEntry
98 collectExportedStgBinders :: [StgBinding Id Id] -> [Id]
99 combineStgBinderInfo :: StgBinderInfo -> StgBinderInfo -> StgBinderInfo
100 getAtomKind :: StgAtom Id -> PrimKind
101 isLitLitStgAtom :: StgAtom a -> Bool
102 pprPlainStgBinding :: PprStyle -> StgBinding Id Id -> Int -> Bool -> PrettyRep
103 stgArgOcc :: StgBinderInfo
104 stgArity :: StgRhs Id Id -> Int
105 stgFakeFunAppOcc :: StgBinderInfo
106 stgNoUpdHeapOcc :: StgBinderInfo
107 stgNormalOcc :: StgBinderInfo
108 stgStdHeapOcc :: StgBinderInfo
109 stgUnsatOcc :: StgBinderInfo
118 instance Eq TyVarTemplate
121 instance Ord BasicLit
125 instance Ord PrimKind
128 instance Ord TyVarTemplate
130 instance NamedThing Class
131 instance NamedThing a => NamedThing (InPat a)
132 instance NamedThing Id
133 instance NamedThing FullName
134 instance NamedThing ShortName
135 instance NamedThing TyCon
136 instance NamedThing TyVar
137 instance NamedThing TyVarTemplate
138 instance (Outputable a, Outputable b) => Outputable (a, b)
139 instance (Outputable a, Outputable b, Outputable c) => Outputable (a, b, c)
140 instance Outputable BasicLit
141 instance Outputable Bool
142 instance Outputable Class
143 instance Outputable ClassOp
144 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Binds a b)
145 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (Expr a b)
146 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (GRHS a b)
147 instance (NamedThing a, Outputable a, NamedThing b, Outputable b) => Outputable (GRHSsAndBinds a b)
148 instance Outputable a => Outputable (InPat a)
149 instance Outputable Id
150 instance Outputable FullName
151 instance Outputable ShortName
152 instance Outputable PrimKind
153 instance Outputable PrimOp
154 instance Outputable a => Outputable (StgAtom a)
155 instance (Outputable a, Outputable b, Ord b) => Outputable (StgBinding a b)
156 instance (Outputable a, Outputable b, Ord b) => Outputable (StgExpr a b)
157 instance (Outputable a, Outputable b, Ord b) => Outputable (StgRhs a b)
158 instance Outputable UpdateFlag
159 instance Outputable TyCon
160 instance Outputable TyVar
161 instance Outputable TyVarTemplate
162 instance Outputable UniType
163 instance Outputable a => Outputable [a]