X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnBinds.lhs;h=d7a5952ee297a5896cd45b7e6edda3a3253a03ad;hp=ad2a6b370e95c25c59f3fb1ff1a023e005f79d19;hb=bb7d80b3b8d1396d481d3b24302bee24a3d92f71;hpb=d5934bbb856aa0aa620c9b2e0fa51c90a1a5a048 diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index ad2a6b3..d7a5952 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -178,20 +178,7 @@ rnTopBindsBoot (ValBindsIn mbinds sigs) ; return (ValBindsOut [] sigs', usesOnly (hsSigsFVs sigs')) } rnTopBindsSrc :: HsValBinds RdrName -> RnM (HsValBinds Name, DefUses) -rnTopBindsSrc binds@(ValBindsIn mbinds _) - = do { (binds', dus) <- rnValBinds noTrim binds - - -- Warn about missing signatures, - ; let { ValBindsOut _ sigs' = binds' - ; ty_sig_vars = mkNameSet [ unLoc n | L _ (TypeSig n _) <- sigs'] - ; un_sigd_bndrs = duDefs dus `minusNameSet` ty_sig_vars } - - ; warn_missing_sigs <- doptM Opt_WarnMissingSigs - ; ifM (warn_missing_sigs) - (mappM_ missingSigWarn (nameSetToList un_sigd_bndrs)) - - ; return (binds', dus) - } +rnTopBindsSrc binds = rnValBinds noTrim binds \end{code} @@ -445,8 +432,11 @@ rnMethodBind cls sig_fn gen_tyvars (L loc (FunBind { fun_id = name, fun_infix = new_group = MatchGroup new_matches placeHolderType in checkPrecMatch inf plain_name new_group `thenM_` - returnM (unitBag (L loc (FunBind { fun_id = sel_name, fun_infix = inf, fun_matches = new_group, - bind_fvs = fvs, fun_co_fn = idHsWrapper })), + returnM (unitBag (L loc (FunBind { + fun_id = sel_name, fun_infix = inf, + fun_matches = new_group, + bind_fvs = fvs, fun_co_fn = idHsWrapper, + fun_tick = Nothing })), fvs `addOneFV` plain_name) -- The 'fvs' field isn't used for method binds where @@ -644,12 +634,6 @@ unknownSigErr (L loc sig) where what_it_is = hsSigDoc sig -missingSigWarn var - = addWarnAt (mkSrcSpan loc loc) $ - sep [ptext SLIT("Definition but no type signature for"), quotes (ppr var)] - where - loc = nameSrcLoc var -- TODO: make a proper span - methodBindErr mbind = hang (ptext SLIT("Pattern bindings (except simple variables) not allowed in instance declarations")) 2 (ppr mbind)