Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
0082601b
Commit
0082601b
authored
Feb 24, 2006
by
David Himmelstrup
Browse files
Remove duplicate code from RnNames.
parent
eb02a91c
Changes
1
Hide whitespace changes
Inline
Side-by-side
ghc/compiler/rename/RnNames.lhs
View file @
0082601b
...
...
@@ -205,15 +205,6 @@ importsFromImportDeclDirect this_mod
(L loc importDecl@(ImportDecl loc_imp_mod_name want_boot qual_only as_mod imp_details))
= setSrcSpan loc $
do iface <- loadSrcInterface doc imp_mod_name want_boot
-- Compiler sanity check: if the import didn't say
-- {-# SOURCE #-} we should not get a hi-boot file
WARN( not want_boot && mi_boot iface, ppr imp_mod_name ) $ do
-- Issue a user warning for a redundant {- SOURCE -} import
-- NB that we arrange to read all the ordinary imports before
-- any of the {- SOURCE -} imports
warnIf (want_boot && not (mi_boot iface))
(warnRedundantSourceImport imp_mod_name)
let filtered_exports = filter not_this_mod (mi_exports iface)
not_this_mod (mod,_) = mod /= this_mod
...
...
@@ -241,7 +232,7 @@ importsFromImportDeclDirect this_mod
is_dloc = loc, is_as = qual_mod_name }
-- Get the total imports, and filter them according to the import list
total_avails <- ifaceExportNames
filtered
_exports
total_avails <- ifaceExportNames
(mi
_exports
iface)
importDecl' <- rnImportDecl iface imp_spec importDecl total_avails
return (L loc importDecl')
where imp_mod_name = unLoc loc_imp_mod_name
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment