projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use -framework-path flags during the cc phase. Fixes trac #1975.
[ghc-hetmet.git]
/
compiler
/
main
/
HscTypes.lhs
diff --git
a/compiler/main/HscTypes.lhs
b/compiler/main/HscTypes.lhs
index
7aacf95
..
7ad34ac
100644
(file)
--- a/
compiler/main/HscTypes.lhs
+++ b/
compiler/main/HscTypes.lhs
@@
-14,6
+14,7
@@
module HscTypes (
ModDetails(..), emptyModDetails,
ModGuts(..), CoreModule(..), CgGuts(..), ModImports(..), ForeignStubs(..),
ModDetails(..), emptyModDetails,
ModGuts(..), CoreModule(..), CgGuts(..), ModImports(..), ForeignStubs(..),
+ ImportedMods,
ModSummary(..), ms_mod_name, showModMsg, isBootSummary,
msHsFilePath, msHiFilePath, msObjFilePath,
ModSummary(..), ms_mod_name, showModMsg, isBootSummary,
msHsFilePath, msHiFilePath, msObjFilePath,
@@
-95,7
+96,7
@@
import Type
import Class ( Class, classSelIds, classATs, classTyCon )
import TyCon
import Class ( Class, classSelIds, classATs, classTyCon )
import TyCon
-import DataCon ( DataCon, dataConImplicitIds )
+import DataCon ( DataCon, dataConImplicitIds, dataConWrapId )
import PrelNames ( gHC_PRIM )
import Packages hiding ( Version(..) )
import DynFlags ( DynFlags(..), isOneShot, HscTarget (..) )
import PrelNames ( gHC_PRIM )
import Packages hiding ( Version(..) )
import DynFlags ( DynFlags(..), isOneShot, HscTarget (..) )
@@
-283,7
+284,7
@@
lookupIfaceByModule dflags hpt pit mod
-- (a) In OneShot mode, even home-package modules accumulate in the PIT
-- (b) Even in Batch (--make) mode, there is *one* case where a home-package
-- module is in the PIT, namely GHC.Prim when compiling the base package.
-- (a) In OneShot mode, even home-package modules accumulate in the PIT
-- (b) Even in Batch (--make) mode, there is *one* case where a home-package
-- module is in the PIT, namely GHC.Prim when compiling the base package.
--- We could eliminate (b) if we wanted, by making GHC.Prim belong to a packake
+-- We could eliminate (b) if we wanted, by making GHC.Prim belong to a package
-- of its own, but it doesn't seem worth the bother.
\end{code}
-- of its own, but it doesn't seem worth the bother.
\end{code}
@@
-509,6
+510,8
@@
emptyModDetails = ModDetails { md_types = emptyTypeEnv,
-- being compiled right now. Once it is compiled, a ModIface and
-- ModDetails are extracted and the ModGuts is dicarded.
-- being compiled right now. Once it is compiled, a ModIface and
-- ModDetails are extracted and the ModGuts is dicarded.
+type ImportedMods = ModuleEnv (Module, [(ModuleName, Bool, SrcSpan)])
+
data ModGuts
= ModGuts {
mg_module :: !Module,
data ModGuts
= ModGuts {
mg_module :: !Module,
@@
-516,9
+519,9
@@
data ModGuts
mg_exports :: ![AvailInfo], -- What it exports
mg_deps :: !Dependencies, -- What is below it, directly or
-- otherwise
mg_exports :: ![AvailInfo], -- What it exports
mg_deps :: !Dependencies, -- What is below it, directly or
-- otherwise
- mg_dir_imps :: ![Module], -- Directly-imported modules; used to
+ mg_dir_imps :: !ImportedMods, -- Directly-imported modules; used to
-- generate initialisation code
-- generate initialisation code
- mg_usages :: ![Usage], -- Version info for what it needed
+ mg_used_names:: !NameSet, -- What it needed (used in mkIface)
mg_rdr_env :: !GlobalRdrEnv, -- Top-level lexical environment
mg_rdr_env :: !GlobalRdrEnv, -- Top-level lexical environment
@@
-557,7
+560,9
@@
data CoreModule
-- Type environment for types declared in this module
cm_types :: !TypeEnv,
-- Declarations
-- Type environment for types declared in this module
cm_types :: !TypeEnv,
-- Declarations
- cm_binds :: [CoreBind]
+ cm_binds :: [CoreBind],
+ -- Imports
+ cm_imports :: ![Module]
}
instance Outputable CoreModule where
}
instance Outputable CoreModule where
@@
-956,8
+961,9
@@
tyThingDataCon (ADataCon dc) = dc
tyThingDataCon other = pprPanic "tyThingDataCon" (pprTyThing other)
tyThingId :: TyThing -> Id
tyThingDataCon other = pprPanic "tyThingDataCon" (pprTyThing other)
tyThingId :: TyThing -> Id
-tyThingId (AnId id) = id
-tyThingId other = pprPanic "tyThingId" (pprTyThing other)
+tyThingId (AnId id) = id
+tyThingId (ADataCon dc) = dataConWrapId dc
+tyThingId other = pprPanic "tyThingId" (pprTyThing other)
\end{code}
%************************************************************************
\end{code}
%************************************************************************
@@
-1478,7
+1484,9
@@
data Unlinked
| BCOs CompiledByteCode ModBreaks
#ifndef GHCI
| BCOs CompiledByteCode ModBreaks
#ifndef GHCI
-data CompiledByteCode
+data CompiledByteCode = CompiledByteCodeUndefined
+_unused :: CompiledByteCode
+_unused = CompiledByteCodeUndefined
#endif
instance Outputable Unlinked where
#endif
instance Outputable Unlinked where