X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Frename%2FRnNames.lhs;h=a7b84ebdefe86f4b7d7d38fe9432d86d2420f720;hb=389cca214f33a29646e08d57e3dca862140007b2;hp=8448857eb25155be17c584edcf9c422cbb05b5fd;hpb=08a9d7341402232672fcff9062454e6ba1ae8bd1;p=ghc-hetmet.git diff --git a/compiler/rename/RnNames.lhs b/compiler/rename/RnNames.lhs index 8448857..a7b84eb 100644 --- a/compiler/rename/RnNames.lhs +++ b/compiler/rename/RnNames.lhs @@ -143,8 +143,14 @@ rnImportDecl this_mod (L loc (ImportDecl loc_imp_mod_name mb_pkg want_boot -- 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)) + -- any of the {- SOURCE -} imports. + -- + -- in --make and GHCi, the compilation manager checks for this, + -- and indeed we shouldn't do it here because the existence of + -- the non-boot module depends on the compilation order, which + -- is not deterministic. The hs-boot test can show this up. + dflags <- getDOpts + warnIf (want_boot && not (mi_boot iface) && isOneShot (ghcMode dflags)) (warnRedundantSourceImport imp_mod_name) let @@ -1389,8 +1395,9 @@ dodgyExportWarn item = dodgyMsg (ptext (sLit "export")) item dodgyMsg :: OutputableBndr n => SDoc -> n -> SDoc dodgyMsg kind tc - = sep [ ptext (sLit "The") <+> kind <+> ptext (sLit "item") <+> quotes (ppr (IEThingAll tc)), - ptext (sLit "suggests that") <+> quotes (ppr tc) <+> ptext (sLit "has constructors or class methods,"), + = sep [ ptext (sLit "The") <+> kind <+> ptext (sLit "item") <+> quotes (ppr (IEThingAll tc)) + <+> ptext (sLit "suggests that"), + quotes (ppr tc) <+> ptext (sLit "has (in-scope) constructors or class methods,"), ptext (sLit "but it has none") ] exportItemErr :: IE RdrName -> SDoc