diff options
-rw-r--r-- | src/HaddockDevHelp.hs | 2 | ||||
-rw-r--r-- | src/HaddockHH2.hs | 2 | ||||
-rw-r--r-- | src/HaddockHtml.hs | 2 | ||||
-rw-r--r-- | src/Main.hs | 4 | ||||
-rw-r--r-- | src/Map.hs | 2 |
5 files changed, 6 insertions, 6 deletions
diff --git a/src/HaddockDevHelp.hs b/src/HaddockDevHelp.hs index 9c1964cf..cb8886c2 100644 --- a/src/HaddockDevHelp.hs +++ b/src/HaddockDevHelp.hs @@ -63,7 +63,7 @@ ppDevHelpFile odir doctitle maybe_package ifaces = do index = Map.toAscList (foldr getIfaceIndex Map.empty ifaces) getIfaceIndex (mdl,iface) fm = - Map.unionWith (++) (Map.fromListWith (++) [(name, [mdl]) | (name, Qual mdl' _) <- Map.toAscList (iface_env iface), mdl == mdl']) fm + Map.unionWith (++) (Map.fromListWith (flip (++)) [(name, [mdl]) | (name, Qual mdl' _) <- Map.toAscList (iface_env iface), mdl == mdl']) fm ppList [] = empty ppList ((name,refs):mdls) = diff --git a/src/HaddockHH2.hs b/src/HaddockHH2.hs index bdd37386..3a9abba5 100644 --- a/src/HaddockHH2.hs +++ b/src/HaddockHH2.hs @@ -89,7 +89,7 @@ ppHH2Index odir maybe_package ifaces = do index = Map.toAscList (foldr getIfaceIndex Map.empty ifaces) getIfaceIndex (mdl,iface) fm = - Map.unionWith (++) (Map.fromListWith (++) [(name, [mdl]) | (name, Qual mdl' _) <- Map.toAscList (iface_env iface), mdl == mdl']) fm + Map.unionWith (++) (Map.fromListWith (flip (++)) [(name, [mdl]) | (name, Qual mdl' _) <- Map.toAscList (iface_env iface), mdl == mdl']) fm ppList [] = empty ppList ((name,mdls):vs) = diff --git a/src/HaddockHtml.hs b/src/HaddockHtml.hs index 528dc47b..c4bda56c 100644 --- a/src/HaddockHtml.hs +++ b/src/HaddockHtml.hs @@ -386,7 +386,7 @@ ppHtmlIndex odir doctitle maybe_package maybe_html_help_format maybe_contents_ur -- that export that entity. Each of the modules exports the entity -- in a visible or invisible way (hence the Bool). full_index :: Map String (Map HsQName [(Module,Bool)]) - full_index = Map.fromListWith (\l r -> Map.unionWith (++) r l) + full_index = Map.fromListWith (flip (Map.unionWith (++))) (concat (map getIfaceIndex ifaces)) getIfaceIndex (mdl,iface) = diff --git a/src/Main.hs b/src/Main.hs index 92319d3e..a83376f3 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -1079,8 +1079,8 @@ collectInstances -> Map HsQName [InstHead] -- maps class/type names to instances collectInstances mod_ifaces - = Map.fromListWith (++) ty_inst_pairs `Map.union` - Map.fromListWith (++) class_inst_pairs + = Map.fromListWith (flip (++)) ty_inst_pairs `Map.union` + Map.fromListWith (flip (++)) class_inst_pairs where all_instances = concat (map (iface_insts.snd) mod_ifaces) @@ -56,7 +56,7 @@ fromList :: Ord k => [(k,a)] -> Map k a fromList = listToFM fromListWith :: Ord k => (a -> a -> a) -> [(k,a)] -> Map k a -fromListWith = flip addListToFM_C emptyFM +fromListWith c = addListToFM_C (flip c) emptyFM toAscList :: Map k a -> [(k,a)] toAscList = fmToList |