1 Things which are ubiquitous in the GHC compiler.
6 import FastString(FastString)
8 import BasicTypes ( Module(..), Arity(..) )
10 import BinderInfo ( BinderInfo )
11 import CgBindery ( CgIdInfo )
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 ( OccName, Name, ExportFlag, NamedThing(..) )
35 import Outputable ( Outputable(..), PprStyle )
36 import PragmaInfo ( PragmaInfo )
38 import PrimOp ( PrimOp )
39 import PrimRep ( PrimRep )
40 import SMRep ( SMRep )
41 import SrcLoc ( SrcLoc )
42 import TcType ( TcMaybe )
43 import TyCon ( TyCon )
44 import TyVar ( GenTyVar, TyVar(..) )
45 import Type ( GenType, Type(..) )
46 import UniqFM ( UniqFM )
47 import UniqSupply ( UniqSupply )
48 import Unique ( Unique, Uniquable(..) )
49 import Usage ( GenUsage, Usage(..) )
50 import Util ( Ord3(..) )
52 -- All the classes in GHC go; life is just too short
53 -- to try to contain their visibility.
55 class NamedThing a where
56 getOccName :: a -> OccName
61 class Outputable a where
62 ppr :: PprStyle -> a -> Doc
63 class Uniquable a where
64 uniqueOf :: a -> Unique
66 -- For datatypes, we ubiquitize those types that (a) are
67 -- used everywhere and (b) the compiler doesn't lose much
68 -- optimisation-wise by not seeing their pragma-gunk.
89 data GenCoreBinder a b c
90 data GenCoreBinding a b c d
91 data GenCoreCaseAlts a b c d
92 data GenCoreCaseDefault a b c d
93 data GenCoreExpr a b c d
94 data GenId a -- NB: fails the optimisation criterion
96 data GenTyVar a -- NB: fails the optimisation criterion
101 data InstancePragmas a
115 data PrimRep -- NB: an enumeration
116 data SimplifierSwitch
128 data UnfoldingGuidance
129 data Unique -- NB: fails the optimisation criterion
131 -- don't get clever and unexpand some of these synonyms
132 -- (GHC 0.26 will barf)
133 type Module = FastString
135 type Class = GenClass (GenTyVar (GenUsage Unique)) Unique
136 type ClassOp = GenClassOp (GenType (GenTyVar (GenUsage Unique)) Unique)
137 type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique)
138 type Type = GenType (GenTyVar (GenUsage Unique)) Unique
139 type TyVar = GenTyVar (GenUsage Unique)
140 type Usage = GenUsage Unique
142 -- These are here only for SPECIALIZing in FiniteMap (ToDo:move?)
149 -- specializing in UniqFM, UniqSet
150 instance Uniquable Unique
151 instance Uniquable Name
152 -- specializing in Name