1 Things which are ubiquitous in the GHC compiler.
6 --import PreludePS(_PackedString)
7 import FastString(FastString)
9 import BasicTypes ( Module(..), Arity(..) )
11 import BinderInfo ( BinderInfo )
12 import CgBindery ( CgIdInfo )
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 ( OccName, Name, ExportFlag, NamedThing(..) )
36 import Outputable ( Outputable(..), PprStyle )
37 import PragmaInfo ( PragmaInfo )
39 import PrimOp ( PrimOp )
40 import PrimRep ( PrimRep )
41 import SMRep ( SMRep )
42 import SrcLoc ( SrcLoc )
43 import TcType ( TcMaybe )
44 import TyCon ( TyCon )
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 -> Doc
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.
90 data GenCoreBinder a b c
91 data GenCoreBinding a b c d
92 data GenCoreCaseAlts a b c d
93 data GenCoreCaseDefault a b c d
94 data GenCoreExpr a b c d
95 data GenId a -- NB: fails the optimisation criterion
97 data GenTyVar a -- NB: fails the optimisation criterion
102 data InstancePragmas a
116 data PrimRep -- NB: an enumeration
117 data SimplifierSwitch
120 data StrictnessInfo bdee
129 data UnfoldingGuidance
130 data Unique -- NB: fails the optimisation criterion
132 -- don't get clever and unexpand some of these synonyms
133 -- (GHC 0.26 will barf)
134 type Module = FastString
136 type Class = GenClass (GenTyVar (GenUsage Unique)) Unique
137 type ClassOp = GenClassOp (GenType (GenTyVar (GenUsage Unique)) Unique)
138 type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique)
139 type Type = GenType (GenTyVar (GenUsage Unique)) Unique
140 type TyVar = GenTyVar (GenUsage Unique)
141 type Usage = GenUsage Unique
143 -- These are here only for SPECIALIZing in FiniteMap (ToDo:move?)
150 -- specializing in UniqFM, UniqSet
151 instance Uniquable Unique
152 instance Uniquable Name
153 -- specializing in Name