Commit a3ed66eb authored by simonpj@microsoft.com's avatar simonpj@microsoft.com

Don't reverse bindings in rnMethodBinds (fix Trac #4126)

parent 3e426373
......@@ -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])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment