diff options
author | Shayne Fletcher <shayne.fletcher@digitalasset.com> | 2019-05-07 17:35:50 -0400 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-05-08 15:29:01 -0400 |
commit | ed5f858b8484a207e28baf9cbec4c60de1c86187 (patch) | |
tree | 4dfe0b1ff3970bf2cac267299251e803f7ced7e8 /compiler/rename/RnNames.hs | |
parent | 0eeb4cfad732d0b9b278c2274cb6db9633f9d3b5 (diff) | |
download | haskell-ed5f858b8484a207e28baf9cbec4c60de1c86187.tar.gz |
Implement ImportQualifiedPost
Diffstat (limited to 'compiler/rename/RnNames.hs')
-rw-r--r-- | compiler/rename/RnNames.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/compiler/rename/RnNames.hs b/compiler/rename/RnNames.hs index 7c0c6759ea..9a69423209 100644 --- a/compiler/rename/RnNames.hs +++ b/compiler/rename/RnNames.hs @@ -267,7 +267,7 @@ rnImportDecl this_mod , ideclName = loc_imp_mod_name , ideclPkgQual = mb_pkg , ideclSource = want_boot, ideclSafe = mod_safe - , ideclQualified = qual_only, ideclImplicit = implicit + , ideclQualified = qual_style, ideclImplicit = implicit , ideclAs = as_mod, ideclHiding = imp_details })) = setSrcSpan loc $ do @@ -275,6 +275,8 @@ rnImportDecl this_mod pkg_imports <- xoptM LangExt.PackageImports when (not pkg_imports) $ addErr packageImportErr + let qual_only = isImportDeclQualified qual_style + -- If there's an error in loadInterface, (e.g. interface -- file not found) we get lots of spurious errors from 'filterImports' let imp_mod_name = unLoc loc_imp_mod_name @@ -1470,8 +1472,8 @@ warnUnusedImport flag fld_env (L loc decl, used, unused) , text "from module" <+> quotes pp_mod <+> is_redundant] pp_herald = text "The" <+> pp_qual <+> text "import of" pp_qual - | ideclQualified decl = text "qualified" - | otherwise = Outputable.empty + | isImportDeclQualified (ideclQualified decl)= text "qualified" + | otherwise = Outputable.empty pp_mod = ppr (unLoc (ideclName decl)) is_redundant = text "is redundant" |