diff options
author | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-05-05 08:11:52 +0200 |
---|---|---|
committer | Jose Pedro Magalhaes <jpm@cs.uu.nl> | 2011-05-05 08:11:52 +0200 |
commit | ea94a66d93047a9b0cd4532645eb1e9be04888e1 (patch) | |
tree | 3bbc0136edc46b047a8d54b26d0646e09fb71f89 /compiler/rename | |
parent | ffabe3acb2d30be0c8e89e139f5bca7a1eb900f6 (diff) | |
parent | 51fd4a1db15971e8eb46a2d665dc3f1572b95653 (diff) | |
download | haskell-ea94a66d93047a9b0cd4532645eb1e9be04888e1.tar.gz |
Merge branch 'master' of http://darcs.haskell.org/ghc into ghc-generics
Fixed conflicts:
compiler/iface/IfaceSyn.lhs
compiler/typecheck/TcSMonad.lhs
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnExpr.lhs | 21 |
1 files changed, 18 insertions, 3 deletions
diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index b3458dbc80..46eef670f2 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -841,9 +841,24 @@ rnParallelStmts ctxt segs thing_inside lookupStmtName :: HsStmtContext Name -> Name -> RnM (HsExpr Name, FreeVars) -- Like lookupSyntaxName, but ListComp/PArrComp are never rebindable -lookupStmtName ListComp n = return (HsVar n, emptyFVs) -lookupStmtName PArrComp n = return (HsVar n, emptyFVs) -lookupStmtName _ n = lookupSyntaxName n +-- Neither is ArrowExpr, which has its own desugarer in DsArrows +lookupStmtName ctxt n + = case ctxt of + ListComp -> not_rebindable + PArrComp -> not_rebindable + ArrowExpr -> not_rebindable + PatGuard {} -> not_rebindable + + DoExpr -> rebindable + MDoExpr -> rebindable + MonadComp -> rebindable + GhciStmt -> rebindable -- I suppose? + + ParStmtCtxt c -> lookupStmtName c n -- Look inside to + TransStmtCtxt c -> lookupStmtName c n -- the parent context + where + rebindable = lookupSyntaxName n + not_rebindable = return (HsVar n, emptyFVs) \end{code} Note [Renaming parallel Stmts] |