X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnBinds.lhs;h=f27407afee49b99acc7e4551faabc867af13ab7a;hb=4a91d102be99778efcab80211ca5de3f2cf6619a;hp=9ec3657144e630271ccf069f83c588b6e8c4658b;hpb=710e207487929c4a5977b5ee3bc6e539091953db;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index 9ec3657..f27407a 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -31,15 +31,15 @@ import RnEnv ( bindLocatedLocalsRn, lookupBndrRn, warnUnusedLocalBinds, mapFvRn, extendTyVarEnvFVRn, FreeVars, emptyFVs, plusFV, plusFVs, unitFV, addOneFV ) -import CmdLineOpts ( opt_WarnMissingSigs ) +import CmdLineOpts ( DynFlag(..) ) import Digraph ( stronglyConnComp, SCC(..) ) -import Name ( OccName, Name, nameOccName, mkUnboundName, isUnboundName ) +import Name ( OccName, Name, nameOccName ) import NameSet import RdrName ( RdrName, rdrNameOcc ) import BasicTypes ( RecFlag(..) ) import List ( partition ) -import Bag ( bagToList ) import Outputable +import PrelNames ( isUnboundName ) \end{code} -- ToDo: Put the annotations into the monad, so that they arrive in the proper @@ -169,11 +169,13 @@ rnTopMonoBinds mbinds sigs let bndr_name_set = mkNameSet binder_names in - renameSigs (okBindSig bndr_name_set) sigs `thenRn` \ (siglist, sig_fvs) -> + renameSigs (okBindSig bndr_name_set) sigs `thenRn` \ (siglist, sig_fvs) -> + doptRn Opt_WarnMissingSigs `thenRn` \ warnMissing -> let type_sig_vars = [n | Sig n _ _ <- siglist] - un_sigd_binders | opt_WarnMissingSigs = nameSetToList (delListFromNameSet bndr_name_set type_sig_vars) - | otherwise = [] + un_sigd_binders | warnMissing = nameSetToList (delListFromNameSet + bndr_name_set type_sig_vars) + | otherwise = [] in mapRn_ (addWarnRn.missingSigWarn) un_sigd_binders `thenRn_`