diff options
author | simonpj <unknown> | 2005-01-18 12:19:12 +0000 |
---|---|---|
committer | simonpj <unknown> | 2005-01-18 12:19:12 +0000 |
commit | ac80e0dececb68ed6385e3b34765fd8f9c019767 (patch) | |
tree | eaa2449523a33595fb3602b8154ff7f361df5a10 /ghc/compiler/rename | |
parent | 43d5a248f604acf6ad4d743ed7c002580c44aa8f (diff) | |
download | haskell-ac80e0dececb68ed6385e3b34765fd8f9c019767.tar.gz |
[project @ 2005-01-18 12:18:11 by simonpj]
------------------------
Reorganisation of hi-boot files
------------------------
The main point of this commit is to arrange that in the Compilation
Manager's dependendency graph, hi-boot files are proper nodes. This
is important to make sure that we compile everything in the right
order. It's a step towards hs-boot files.
* The fundamental change is that CompManager.ModSummary has a new
field, ms_boot :: IsBootInterface
I also tided up CompManager a bit. No change to the Basic Plan.
ModSummary is now exported abstractly from CompManager (was concrete)
* Hi-boot files now have import declarations. The idea is they are
compulsory, so that the dependency analyser can find them
* I changed an invariant: the Compilation Manager used to ensure that
hscMain was given a HomePackageTable only for the modules 'below' the
one being compiled. This was really only important for instances and
rules, and it was a bit inconvenient. So I moved the filter to the
compiler itself: see HscTypes.hptInstances and hptRules.
* Module Packages.hs now defines
data PackageIdH
= HomePackage -- The "home" package is the package
-- curently being compiled
| ExtPackage PackageId -- An "external" package is any other package
It was just a Maybe type before, so this makes it a bit clearer.
* I tried to add a bit better location info to the IfM monad, so that
errors in interfaces come with a slightly more helpful error message.
See the if_loc field in TcRnTypes --- and follow-on consequences
* Changed Either to Maybes.MaybeErr in a couple of places (more perspicuous)
Diffstat (limited to 'ghc/compiler/rename')
-rw-r--r-- | ghc/compiler/rename/RnNames.lhs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ghc/compiler/rename/RnNames.lhs b/ghc/compiler/rename/RnNames.lhs index 5b426fedf1..8ae1e5375e 100644 --- a/ghc/compiler/rename/RnNames.lhs +++ b/ghc/compiler/rename/RnNames.lhs @@ -38,9 +38,9 @@ import HscTypes ( GenAvailInfo(..), AvailInfo, GhciMode(..), IfaceExport, HomePackageTable, PackageIfaceTable, availNames, unQualInScope, Deprecs(..), ModIface(..), Dependencies(..), - lookupIface, ExternalPackageState(..), - IfacePackage(..) + lookupIface, ExternalPackageState(..) ) +import Packages ( PackageIdH(..) ) import RdrName ( RdrName, rdrNameOcc, setRdrNameSpace, GlobalRdrEnv, mkGlobalRdrEnv, GlobalRdrElt(..), emptyGlobalRdrEnv, plusGlobalRdrEnv, globalRdrEnvElts, @@ -199,7 +199,7 @@ importsFromImportDecl this_mod (dependent_mods, dependent_pkgs) = case mi_package iface of - ThisPackage -> + HomePackage -> -- Imported module is from the home package -- Take its dependent modules and add imp_mod itself -- Take its dependent packages unchanged @@ -213,7 +213,7 @@ importsFromImportDecl this_mod -- check. See LoadIface.loadHiBootInterface ((imp_mod_name, want_boot) : dep_mods deps, dep_pkgs deps) - ExternalPackage pkg -> + ExtPackage pkg -> -- Imported module is from another package -- Dump the dependent modules -- Add the package imp_mod comes from to the dependent packages |