summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2010-06-14 16:39:35 +0000
committersimonpj@microsoft.com <unknown>2010-06-14 16:39:35 +0000
commita3ed66ebc38894332bcdc28b5ae3085de42b5955 (patch)
tree491f3f015987f5d873211d34dc997b8a9b73e002 /compiler
parent3e42637302a69f094201bf2d7bbb778aa5dfece1 (diff)
downloadhaskell-a3ed66ebc38894332bcdc28b5ae3085de42b5955.tar.gz
Don't reverse bindings in rnMethodBinds (fix Trac #4126)
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rename/RnBinds.lhs9
1 files changed, 5 insertions, 4 deletions
diff --git a/compiler/rename/RnBinds.lhs b/compiler/rename/RnBinds.lhs
index ee45f61bfd..2afd04d3df 100644
--- a/compiler/rename/RnBinds.lhs
+++ b/compiler/rename/RnBinds.lhs
@@ -608,10 +608,11 @@ rnMethodBinds :: Name -- Class name
-> RnM (LHsBinds Name, FreeVars)
rnMethodBinds cls sig_fn gen_tyvars binds
- = foldM do_one (emptyBag,emptyFVs) (bagToList binds)
- where do_one (binds,fvs) bind = do
- (bind', fvs_bind) <- rnMethodBind cls sig_fn gen_tyvars bind
- return (bind' `unionBags` binds, fvs_bind `plusFV` fvs)
+ = foldlM do_one (emptyBag,emptyFVs) (bagToList binds)
+ where
+ do_one (binds,fvs) bind
+ = do { (bind', fvs_bind) <- rnMethodBind cls sig_fn gen_tyvars bind
+ ; return (binds `unionBags` bind', fvs_bind `plusFV` fvs) }
rnMethodBind :: Name
-> (Name -> [Name])