diff options
| author | simonpj <unknown> | 2004-10-20 13:34:27 +0000 |
|---|---|---|
| committer | simonpj <unknown> | 2004-10-20 13:34:27 +0000 |
| commit | f4c9d2b23bd63b48566e0ca3b13c8bdfc4cd0c0b (patch) | |
| tree | 5846dd1900d943e153e0b494a315112ced4c9707 /ghc/compiler/rename/RnNames.lhs | |
| parent | ca23a0493febcc04f6f2fda5a221ad7350ad8bec (diff) | |
| download | haskell-f4c9d2b23bd63b48566e0ca3b13c8bdfc4cd0c0b.tar.gz | |
[project @ 2004-10-20 13:34:04 by simonpj]
---------------------------------
Fix a bug in usage recording
---------------------------------
As a result of the new stuff on hi-boot-file consistency checking, I
accidentally caused Foo.hi to record a usage line for module Foo, and
this in turn caused rather nasty bad things to happen. In particular,
there were occasional crashes of form
ghc-6.3: panic! (the `impossible' happened, GHC version 6.3.20041017):
forkM Constructor Var.TcTyVar{d r1B9}
At least I think that's why the crash happened.
Anyway, it was certainly a bug, and this commit fixes it. The main
payload of this fix is in Desugar.lhs; the rest is comments and
tidying.
Diffstat (limited to 'ghc/compiler/rename/RnNames.lhs')
| -rw-r--r-- | ghc/compiler/rename/RnNames.lhs | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/ghc/compiler/rename/RnNames.lhs b/ghc/compiler/rename/RnNames.lhs index 8b5013e69b..4dfcc13eea 100644 --- a/ghc/compiler/rename/RnNames.lhs +++ b/ghc/compiler/rename/RnNames.lhs @@ -200,10 +200,13 @@ importsFromImportDecl this_mod (dependent_mods, dependent_pkgs) | isHomeModule imp_mod = -- Imported module is from the home package - -- Take its dependent modules and - -- (a) remove this_mod (might be there as a hi-boot) - -- (b) add imp_mod itself + -- Take its dependent modules and add imp_mod itself -- Take its dependent packages unchanged + -- NB: (dep_mods deps) might include a hi-boot file for the module being + -- compiled, CM. Do *not* filter this out (as we used to), because when + -- we've finished dealing with the direct imports we want to know if any + -- of them depended on CM.hi-boot, in which case we should do the hi-boot + -- consistency check. See LoadIface.loadHiBootInterface ((imp_mod_name, want_boot) : dep_mods deps, dep_pkgs deps) | otherwise |
