From c5ba8422faef9ee65d28e706c320cc334f9e97b6 Mon Sep 17 00:00:00 2001 From: sof Date: Fri, 7 Dec 2001 08:12:53 +0000 Subject: [PATCH] [project @ 2001-12-07 08:12:53 by sof] mkExportAvails: computing the AvailEnv is rather delicate --- ghc/compiler/rename/RnNames.lhs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ghc/compiler/rename/RnNames.lhs b/ghc/compiler/rename/RnNames.lhs index 8fe5622..078863f 100644 --- a/ghc/compiler/rename/RnNames.lhs +++ b/ghc/compiler/rename/RnNames.lhs @@ -392,12 +392,15 @@ mkExportAvails mod_name unqual_imp gbl_env hides avails unqual_in_scope n = unQualInScope gbl_env n - entity_avail_env = mkNameEnv ([ (availName avail,avail) | avail <- effective_avails ] ++ + entity_avail_env = mkNameEnv ([ (availName avail,avail) | avail <- effective_avails ] ++ -- sigh - need to have the method/field names in -- the environment also, so that export lists -- can be computed precisely (cf. exportsFromAvail) [ (name,avail) | avail <- effective_avails, - name <- availNames avail ]) + name <- avNames avail ] ) + + avNames (Avail n) = [n] + avNames (AvailTC n ns) = filter (/=n) ns -- remove 'hides' names from the avail list. effective_avails = foldl wipeOut avails hides -- 1.7.10.4