diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-05-09 16:45:12 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-05-09 16:45:12 +0100 |
commit | 6a1aab7737016aa714b2ffec2b5657a18fac0e42 (patch) | |
tree | 29cdb955cc8fc55bb655290e391ea6810ea74ae2 /compiler/rename | |
parent | 13f959e89c4a23cb2337fb3157f3d7a679debf99 (diff) | |
download | haskell-6a1aab7737016aa714b2ffec2b5657a18fac0e42.tar.gz |
Fix renaming of guards
This was making mc17 fail.
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnExpr.lhs | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/rename/RnExpr.lhs b/compiler/rename/RnExpr.lhs index 46eef670f2..88e0462e74 100644 --- a/compiler/rename/RnExpr.lhs +++ b/compiler/rename/RnExpr.lhs @@ -694,6 +694,8 @@ rnStmt ctxt (L loc (ExprStmt expr _ _ _)) thing_inside then lookupStmtName ctxt guardMName else return (noSyntaxExpr, emptyFVs) -- Only list/parr/monad comprehensions use 'guard' + -- Also for sub-stmts of same eg [ e | x<-xs, gd | blah ] + -- Here "gd" is a guard ; (thing, fvs3) <- thing_inside [] ; return (([L loc (ExprStmt expr' then_op guard_op placeHolderType)], thing), fv_expr `plusFV` fvs1 `plusFV` fvs2 `plusFV` fvs3) } |