From: sof Date: Tue, 19 Jan 1999 11:39:44 +0000 (+0000) Subject: [project @ 1999-01-19 11:39:44 by sof] X-Git-Tag: Approx_2487_patches~55 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=fc34a5350e9bdba3186ba9c3b3944c33bd7081fb;p=ghc-hetmet.git [project @ 1999-01-19 11:39:44 by sof] mkExportAvails: remove NotAvailable entries corresponding to 'hidden' entities from 'unqual_avails'. Not needed and leaving them in causes bother later on in the renamer. This fixes the problem of compiling module B ( module A ) where { import A hiding ( a ) } Regression test added to check for this - will commit soon. --- diff --git a/ghc/compiler/rename/RnEnv.lhs b/ghc/compiler/rename/RnEnv.lhs index a1c404f..6114665 100644 --- a/ghc/compiler/rename/RnEnv.lhs +++ b/ghc/compiler/rename/RnEnv.lhs @@ -542,7 +542,12 @@ mkExportAvails mod_name unqual_imp name_env avails -- we delete f from avails unqual_avails | not unqual_imp = [] -- Short cut when no unqualified imports - | otherwise = [prune avail | avail <- avails] + | otherwise = [ avail' | avail <- avails + , let avail' = prune avail + , case avail' of + NotAvailable -> False + _ -> True + ] prune (Avail n) | unqual_in_scope n = Avail n prune (Avail n) | otherwise = NotAvailable