Skip to content
Snippets Groups Projects
Commit fc34a535 authored by sof's avatar sof
Browse files

[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.
parent a585ff39
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment