diff options
author | panne <unknown> | 2005-01-16 12:58:08 +0000 |
---|---|---|
committer | panne <unknown> | 2005-01-16 12:58:08 +0000 |
commit | efb81da9576a5b4b9befab399a13efbb563b0f36 (patch) | |
tree | a65d52942a25ebb6dca90223454a1cc43620e00f /src | |
parent | 6ab20e84e1e6b1e8b97466753673ce3a875152f8 (diff) |
[haddock @ 2005-01-16 12:58:03 by panne]
Correctly handle the new order of arguments for the combining function
given to fromListWith.
Diffstat (limited to 'src')
-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 |