X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fcompiler%2Frename%2FRnBinds.lhs;h=c3c31c0cb5ca410f82fd6385e7cf859eecba2d4f;hb=798374a5fa613d622b70cd4c37bb97f203abb6ba;hp=ef5596b2d9e76cc6eb5e8c81631492950c7db3f7;hpb=794f1a1d1a11e5a8447e041bfbac37e5c3fb7cc1;p=ghc-hetmet.git diff --git a/ghc/compiler/rename/RnBinds.lhs b/ghc/compiler/rename/RnBinds.lhs index ef5596b..c3c31c0 100644 --- a/ghc/compiler/rename/RnBinds.lhs +++ b/ghc/compiler/rename/RnBinds.lhs @@ -165,9 +165,6 @@ rnTopBinds (MonoBind bind sigs _) = rnTopMonoBinds bind sigs -- The parser doesn't produce other forms -rnTopMonoBinds EmptyMonoBinds sigs - = returnRn (EmptyBinds, emptyFVs) - rnTopMonoBinds mbinds sigs = mapRn lookupBndrRn binder_rdr_names `thenRn` \ binder_names -> let @@ -218,8 +215,6 @@ rnMonoBinds :: RdrNameMonoBinds -> (RenamedHsBinds -> RnMS (result, FreeVars)) -> RnMS (result, FreeVars) -rnMonoBinds EmptyMonoBinds sigs thing_inside = thing_inside EmptyBinds - rnMonoBinds mbinds sigs thing_inside -- Non-empty monobinds = -- Extract all the binders in this group, -- and extend current scope, inventing new names for the new binders @@ -284,7 +279,7 @@ rn_mono_binds siglist mbinds let edges = mkEdges (mbinds_info `zip` [(0::Int)..]) scc_result = stronglyConnComp edges - final_binds = foldr1 ThenBinds (map reconstructCycle scc_result) + final_binds = foldr (ThenBinds . reconstructCycle) EmptyBinds scc_result -- Deal with bound and free-var calculation rhs_fvs = plusFVs [fvs | (_,fvs,_,_) <- mbinds_info]