X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnBinds.lhs;h=ff0629ac688b1742d4e74edf84523660b317611c;hp=1c7bebbd7d0914e1803f8f3dc1e7a4ecb567e802;hb=7d52c74cab50d3c9a5e76be5b97d63b60069bc2e;hpb=72e37dedee9e8a109ebda4b13e49b7133b530591 diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs index 1c7bebb..ff0629a 100644 --- a/compiler/rename/RnBinds.lhs +++ b/compiler/rename/RnBinds.lhs @@ -27,7 +27,7 @@ import TcRnMonad import RnTypes ( rnHsSigType, rnLHsType, rnHsTypeFVs, rnLPat, rnPatsAndThen, patSigErr, checkPrecMatch ) import RnEnv ( bindLocatedLocalsRn, lookupLocatedBndrRn, - lookupLocatedInstDeclBndr, newIPNameRn, + lookupInstDeclBndr, newIPNameRn, lookupLocatedSigOccRn, bindPatSigTyVarsFV, bindLocalFixities, bindSigTyVarsFV, warnUnusedLocalBinds, mapFvRn, extendTyVarEnvFVRn, @@ -422,7 +422,7 @@ rnMethodBinds cls sig_fn gen_tyvars binds rnMethodBind cls sig_fn gen_tyvars (L loc (FunBind { fun_id = name, fun_infix = inf, fun_matches = MatchGroup matches _ })) = setSrcSpan loc $ - lookupLocatedInstDeclBndr cls name `thenM` \ sel_name -> + lookupInstDeclBndr cls name `thenM` \ sel_name -> let plain_name = unLoc sel_name in -- We use the selector name as the binder @@ -596,11 +596,11 @@ rnGRHS :: HsMatchContext Name -> LGRHS RdrName -> RnM (LGRHS Name, FreeVars) rnGRHS ctxt = wrapLocFstM (rnGRHS' ctxt) rnGRHS' ctxt (GRHS guards rhs) - = do { opt_GlasgowExts <- doptM Opt_GlasgowExts + = do { pattern_guards_allowed <- doptM Opt_PatternGuards ; ((guards', rhs'), fvs) <- rnStmts (PatGuard ctxt) guards $ rnLExpr rhs - ; checkM (opt_GlasgowExts || is_standard_guard guards') + ; checkM (pattern_guards_allowed || is_standard_guard guards') (addWarn (nonStdGuardErr guards')) ; return (GRHS guards' rhs', fvs) } @@ -653,6 +653,6 @@ bindsInHsBootFile mbinds 2 (ppr mbinds) nonStdGuardErr guards - = hang (ptext SLIT("accepting non-standard pattern guards (-fglasgow-exts to suppress this message)")) + = hang (ptext SLIT("accepting non-standard pattern guards (use -XPatternGuards to suppress this message)")) 4 (interpp'SP guards) \end{code}