X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=blobdiff_plain;f=compiler%2Frename%2FRnExpr.lhs;h=261969b399664441ce3cec4e030399ba364f23d2;hp=049123e77770717879ae614fd7360706ab5ae4fd;hb=b00b5bc04ff36a551552470060064f0b7d84ca30;hpb=e6d057711f4d6d6ff6342c39fa2b9e44d25447f1 diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index 049123e..261969b 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -23,6 +23,8 @@ import HsSyn import RnHsSyn import TcRnMonad import RnEnv +import HscTypes ( availNames ) +import OccName ( plusOccEnv ) import RnNames ( getLocalDeclBinders, extendRdrEnvRn ) import RnTypes ( rnHsTypeFVs, rnLPat, rnOverLit, rnPatsAndThen, rnLit, mkOpFormRn, mkOpAppRn, mkNegAppRn, checkSectionPrec, @@ -248,9 +250,10 @@ rnExpr (RecordUpd expr rbinds _ _) fvExpr `plusFV` fvRbinds) rnExpr (ExprWithTySig expr pty) - = rnLExpr expr `thenM` \ (expr', fvExpr) -> - rnHsTypeFVs doc pty `thenM` \ (pty', fvTy) -> - returnM (ExprWithTySig expr' pty', fvExpr `plusFV` fvTy) + = do { (pty', fvTy) <- rnHsTypeFVs doc pty + ; (expr', fvExpr) <- bindSigTyVarsFV (hsExplicitTvs pty') $ + rnLExpr expr + ; return (ExprWithTySig expr' pty', fvExpr `plusFV` fvTy) } where doc = text "In an expression type signature" @@ -572,7 +575,8 @@ rnBracket (DecBr group) -- confuse the Names for the current module. -- By using a pretend module, thFAKE, we keep them safely out of the way. - ; names <- getLocalDeclBinders gbl_env1 group + ; avails <- getLocalDeclBinders gbl_env1 group + ; let names = concatMap availNames avails ; let new_occs = map nameOccName names trimmed_rdr_env = hideSomeUnquals (tcg_rdr_env gbl_env) new_occs