Nota Bene: all Names defined in here should come from the base package
-* ModuleNames for prelude modules,
+ - ModuleNames for prelude modules,
e.g. pREL_BASE_Name :: ModuleName
-* Modules for prelude modules
+ - Modules for prelude modules
e.g. pREL_Base :: Module
-* Uniques for Ids, DataCons, TyCons and Classes that the compiler
- "knows about" in some way
+ - Uniques for Ids, DataCons, TyCons and Classes that the compiler
+ "knows about" in some way
e.g. intTyConKey :: Unique
minusClassOpKey :: Unique
-* Names for Ids, DataCons, TyCons and Classes that the compiler
- "knows about" in some way
+ - Names for Ids, DataCons, TyCons and Classes that the compiler
+ "knows about" in some way
e.g. intTyConName :: Name
minusName :: Name
- One of these Names contains
+ One of these Names contains
(a) the module and occurrence name of the thing
(b) its Unique
- The may way the compiler "knows about" one of these things is
- where the type checker or desugarer needs to look it up. For
- example, when desugaring list comprehensions the desugarer
- needs to conjure up 'foldr'. It does this by looking up
- foldrName in the environment.
+ The may way the compiler "knows about" one of these things is
+ where the type checker or desugarer needs to look it up. For
+ example, when desugaring list comprehensions the desugarer
+ needs to conjure up 'foldr'. It does this by looking up
+ foldrName in the environment.
-* RdrNames for Ids, DataCons etc that the compiler may emit into
- generated code (e.g. for deriving). It's not necessary to know
- the uniques for these guys, only their names
+ - RdrNames for Ids, DataCons etc that the compiler may emit into
+ generated code (e.g. for deriving). It's not necessary to know
+ the uniques for these guys, only their names
\begin{code}
pRELUDE :: Module
pRELUDE = mkBaseModule_ pRELUDE_NAME
-gHC_PRIM, gHC_BOOL, gHC_ORDERING, gHC_GENERICS, gHC_BASE, gHC_ENUM,
+gHC_PRIM, gHC_BOOL, gHC_UNIT, gHC_ORDERING, gHC_GENERICS, gHC_BASE, gHC_ENUM,
gHC_SHOW, gHC_READ, gHC_NUM, gHC_INTEGER, gHC_LIST, gHC_PARR,
dATA_TUP, dATA_EITHER, dATA_STRING, gHC_PACK, gHC_CONC, gHC_IO_BASE,
gHC_ST, gHC_ARR, gHC_STABLE, gHC_ADDR, gHC_PTR, gHC_ERR, gHC_REAL,
gHC_FLOAT, gHC_TOP_HANDLER, sYSTEM_IO, dYNAMIC, tYPEABLE, gENERICS,
dOTNET, rEAD_PREC, lEX, gHC_INT, gHC_WORD, mONAD, mONAD_FIX, aRROW,
- gHC_DESUGAR, rANDOM, gHC_EXTS :: Module
+ gHC_DESUGAR, rANDOM, gHC_EXTS, cONTROL_EXCEPTION :: Module
gHC_PRIM = mkPrimModule (fsLit "GHC.Prim") -- Primitive types and values
+gHC_UNIT = mkPrimModule (fsLit "GHC.Unit")
gHC_BOOL = mkPrimModule (fsLit "GHC.Bool")
gHC_ORDERING = mkPrimModule (fsLit "GHC.Ordering")
gHC_GENERICS = mkPrimModule (fsLit "GHC.Generics")
gHC_DESUGAR = mkBaseModule (fsLit "GHC.Desugar")
rANDOM = mkBaseModule (fsLit "System.Random")
gHC_EXTS = mkBaseModule (fsLit "GHC.Exts")
+cONTROL_EXCEPTION = mkBaseModule (fsLit "Control.Exception")
mAIN, rOOT_MAIN :: Module
mAIN = mkMainModule_ mAIN_NAME
\begin{code}
mkTupleModule :: Boxity -> Arity -> Module
-mkTupleModule Boxed 0 = gHC_BASE
+mkTupleModule Boxed 0 = gHC_UNIT
mkTupleModule Boxed _ = dATA_TUP
mkTupleModule Unboxed _ = gHC_PRIM
\end{code}