1 Things which are ubiquitous in the GHC compiler.
6 import PreludePS(_PackedString)
9 import BinderInfo ( BinderInfo )
10 import CgBindery ( CgIdInfo )
11 import CharSeq ( CSeq )
12 import CLabel ( CLabel )
13 import Class ( GenClass, GenClassOp, Class(..), ClassOp )
14 import ClosureInfo ( ClosureInfo, LambdaFormInfo )
15 import CmdLineOpts ( SimplifierSwitch, SwitchResult )
16 import CoreSyn ( GenCoreArg, GenCoreBinder, GenCoreBinding, GenCoreExpr,
17 GenCoreCaseAlts, GenCoreCaseDefault, Coercion
19 import CoreUnfold ( Unfolding, UnfoldingGuidance )
20 import CostCentre ( CostCentre )
21 import FieldLabel ( FieldLabel )
22 import FiniteMap ( FiniteMap )
23 import HeapOffs ( HeapOffset )
24 import HsPat ( OutPat )
25 import HsPragmas ( ClassOpPragmas, ClassPragmas, DataPragmas, GenPragmas, InstancePragmas )
26 import Id ( StrictnessMark, GenId, Id(..) )
27 import IdInfo ( IdInfo, ArityInfo, DeforestInfo, StrictnessInfo, UpdateInfo )
28 import Demand ( Demand )
30 import Literal ( Literal )
31 import MachRegs ( Reg )
32 import Maybes ( MaybeErr )
33 import MatchEnv ( MatchEnv )
34 import Name ( Module(..), OccName, Name, ExportFlag, NamedThing(..) )
35 import Outputable ( Outputable(..) )
36 import PprStyle ( PprStyle )
37 import PragmaInfo ( PragmaInfo )
38 import Pretty ( PrettyRep )
39 import PrimOp ( PrimOp )
40 import PrimRep ( PrimRep )
41 import SMRep ( SMRep )
42 import SrcLoc ( SrcLoc )
43 import TcType ( TcMaybe )
44 import TyCon ( TyCon, Arity(..) )
45 import TyVar ( GenTyVar, TyVar(..) )
46 import Type ( GenType, Type(..) )
47 import UniqFM ( UniqFM, Uniquable(..) )
48 import UniqSupply ( UniqSupply )
49 import Unique ( Unique )
50 import Usage ( GenUsage, Usage(..) )
51 import Util ( Ord3(..) )
53 -- All the classes in GHC go; life is just too short
54 -- to try to contain their visibility.
56 class NamedThing a where
57 getOccName :: a -> OccName
62 class Outputable a where
63 ppr :: PprStyle -> a -> Int -> Bool -> PrettyRep
64 class Uniquable a where
65 uniqueOf :: a -> Unique
67 -- For datatypes, we ubiquitize those types that (a) are
68 -- used everywhere and (b) the compiler doesn't lose much
69 -- optimisation-wise by not seeing their pragma-gunk.
91 data GenCoreBinder a b c
92 data GenCoreBinding a b c d
93 data GenCoreCaseAlts a b c d
94 data GenCoreCaseDefault a b c d
95 data GenCoreExpr a b c d
96 data GenId a -- NB: fails the optimisation criterion
98 data GenTyVar a -- NB: fails the optimisation criterion
103 data InstancePragmas a
117 data PrimRep -- NB: an enumeration
118 data SimplifierSwitch
121 data StrictnessInfo bdee
130 data UnfoldingGuidance
131 data Unique -- NB: fails the optimisation criterion
133 -- don't get clever and unexpand some of these synonyms
134 -- (GHC 0.26 will barf)
135 type Module = _PackedString
137 type Class = GenClass (GenTyVar (GenUsage Unique)) Unique
138 type ClassOp = GenClassOp (GenType (GenTyVar (GenUsage Unique)) Unique)
139 type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique)
140 type Type = GenType (GenTyVar (GenUsage Unique)) Unique
141 type TyVar = GenTyVar (GenUsage Unique)
142 type Usage = GenUsage Unique
144 -- These are here only for SPECIALIZing in FiniteMap (ToDo:move?)
151 -- specializing in UniqFM, UniqSet
152 instance Uniquable Unique
153 instance Uniquable Name
154 -- specializing in Name