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
19 import CoreUnfold ( UnfoldingDetails, UnfoldingGuidance )
20 import CostCentre ( CostCentre )
21 import FieldLabel ( FieldLabel )
22 import FiniteMap ( FiniteMap )
23 import HeapOffs ( HeapOffset )
24 import HsCore ( UnfoldingCoreExpr )
25 import HsPat ( OutPat )
26 import HsPragmas ( ClassOpPragmas, ClassPragmas, DataPragmas, GenPragmas, InstancePragmas )
27 import Id ( StrictnessMark, GenId, Id(..) )
28 import IdInfo ( IdInfo, OptIdInfo(..), ArityInfo, DeforestInfo, Demand, StrictnessInfo, UpdateInfo )
30 import Literal ( Literal )
31 import Maybes ( MaybeErr )
32 import MatchEnv ( MatchEnv )
33 import Name ( Module(..), RdrName, Name, ExportFlag, NamedThing(..) )
34 import Outputable ( Outputable(..) )
35 import PprStyle ( PprStyle )
36 import PragmaInfo ( PragmaInfo )
37 import Pretty ( PrettyRep )
38 import PrimOp ( PrimOp )
39 import PrimRep ( PrimRep )
40 import RnHsSyn ( RnName )
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
58 class OptIdInfo a where
60 getInfo :: IdInfo -> a
61 addInfo :: IdInfo -> a -> IdInfo
62 ppInfo :: PprStyle -> (Id -> Id) -> a -> Int -> Bool -> PrettyRep
65 class Outputable a where
66 ppr :: PprStyle -> a -> Int -> Bool -> PrettyRep
67 class Uniquable a where
68 uniqueOf :: a -> Unique
70 -- For datatypes, we ubiquitize those types that (a) are
71 -- used everywhere and (b) the compiler doesn't lose much
72 -- optimisation-wise by not seeing their pragma-gunk.
93 data GenCoreBinder a b c
94 data GenCoreBinding a b c d
95 data GenCoreCaseAlts a b c d
96 data GenCoreCaseDefault a b c d
97 data GenCoreExpr a b c d
98 data GenId a -- NB: fails the optimisation criterion
100 data GenTyVar a -- NB: fails the optimisation criterion
105 data InstancePragmas a
112 data RdrName = Unqual _PackedString | Qual _PackedString _PackedString
118 data PrimRep -- NB: an enumeration
120 data SimplifierSwitch
128 data UnfoldingCoreExpr a
132 data UnfoldingDetails
133 data UnfoldingGuidance
134 data Unique -- NB: fails the optimisation criterion
136 -- don't get clever and unexpand some of these synonyms
137 -- (GHC 0.26 will barf)
138 type Module = _PackedString
140 type Class = GenClass (GenTyVar (GenUsage Unique)) Unique
141 type ClassOp = GenClassOp (GenType (GenTyVar (GenUsage Unique)) Unique)
142 type Id = GenId (GenType (GenTyVar (GenUsage Unique)) Unique)
143 type Type = GenType (GenTyVar (GenUsage Unique)) Unique
144 type TyVar = GenTyVar (GenUsage Unique)
145 type Usage = GenUsage Unique