From: sof Date: Fri, 7 Dec 2001 08:12:53 +0000 (+0000) Subject: [project @ 2001-12-07 08:12:53 by sof] X-Git-Tag: Approximately_9120_patches~442 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=c5ba8422faef9ee65d28e706c320cc334f9e97b6;p=ghc-hetmet.git [project @ 2001-12-07 08:12:53 by sof] mkExportAvails: computing the AvailEnv is rather delicate --- 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