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