diff options
author | Richard Lupton <richard.lupton@gmail.com> | 2019-08-17 13:34:51 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-08-19 02:12:00 -0400 |
commit | ac79dfe9cb51f38e122af9a404d50aead8a9e8b0 (patch) | |
tree | ed4b2acdc3f5613460ee0cffbec4f71bc1df518e /compiler/rename | |
parent | 2a394246da84c17e1b5103bde320b8ca4ce1158a (diff) | |
download | haskell-ac79dfe9cb51f38e122af9a404d50aead8a9e8b0.tar.gz |
Remove Bag fold specialisations (#16969)
Diffstat (limited to 'compiler/rename')
-rw-r--r-- | compiler/rename/RnBinds.hs | 4 | ||||
-rw-r--r-- | compiler/rename/RnSource.hs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rename/RnBinds.hs b/compiler/rename/RnBinds.hs index d756272e26..5bb76f8f0d 100644 --- a/compiler/rename/RnBinds.hs +++ b/compiler/rename/RnBinds.hs @@ -853,7 +853,7 @@ rnMethodBinds is_cls_decl cls ktv_names binds sigs -- for instance decls too -- Rename the bindings LHSs - ; binds' <- foldrBagM (rnMethodBindLHS is_cls_decl cls) emptyBag binds + ; binds' <- foldrM (rnMethodBindLHS is_cls_decl cls) emptyBag binds -- Rename the pragmas and signatures -- Annoyingly the type variables /are/ in scope for signatures, but @@ -875,7 +875,7 @@ rnMethodBinds is_cls_decl cls ktv_names binds sigs ; scoped_tvs <- xoptM LangExt.ScopedTypeVariables ; (binds'', bind_fvs) <- maybe_extend_tyvar_env scoped_tvs $ do { binds_w_dus <- mapBagM (rnLBind (mkScopedTvFn other_sigs')) binds' - ; let bind_fvs = foldrBag (\(_,_,fv1) fv2 -> fv1 `plusFV` fv2) + ; let bind_fvs = foldr (\(_,_,fv1) fv2 -> fv1 `plusFV` fv2) emptyFVs binds_w_dus ; return (mapBag fstOf3 binds_w_dus, bind_fvs) } diff --git a/compiler/rename/RnSource.hs b/compiler/rename/RnSource.hs index 8f85fac28b..79280ee43f 100644 --- a/compiler/rename/RnSource.hs +++ b/compiler/rename/RnSource.hs @@ -2135,7 +2135,7 @@ extendPatSynEnv val_decls local_fix_env thing = do { ; setEnvs (final_gbl_env, lcl_env) (thing pat_syn_bndrs) } where new_ps :: HsValBinds GhcPs -> TcM [(Name, [FieldLabel])] - new_ps (ValBinds _ binds _) = foldrBagM new_ps' [] binds + new_ps (ValBinds _ binds _) = foldrM new_ps' [] binds new_ps _ = panic "new_ps" new_ps' :: LHsBindLR GhcPs GhcPs |