aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockDevHelp.hs
diff options
context:
space:
mode:
authorpanne <unknown>2005-01-15 18:44:48 +0000
committerpanne <unknown>2005-01-15 18:44:48 +0000
commit914ccdce1b9923f7fc8f75b3bdb188192291ac9b (patch)
tree975e0562f4810a89fa7fcc181885f99bd5f5f3c7 /src/HaddockDevHelp.hs
parente8f54f255a7295fc0da368390706b1ae5d90268c (diff)
[haddock @ 2005-01-15 18:44:45 by panne]
Make Haddock compile again after the recent base package changed. The Map/Set legacy hell has been factored out, so that all modules can simply use the new non-deprecated interfaces. Probably a lot of things can be improved by a little bit of Map/Set/List algebra, this can be done later if needed. Small note: Currently the list of instances in HTML code is reversed. This will hopefully be fixed later.
Diffstat (limited to 'src/HaddockDevHelp.hs')
-rw-r--r--src/HaddockDevHelp.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/HaddockDevHelp.hs b/src/HaddockDevHelp.hs
index fcb26099..9c1964cf 100644
--- a/src/HaddockDevHelp.hs
+++ b/src/HaddockDevHelp.hs
@@ -1,13 +1,12 @@
module HaddockDevHelp(ppDevHelpFile) where
import HsSyn hiding(Doc)
+import qualified Map
#if __GLASGOW_HASKELL__ < 503
import Pretty
-import FiniteMap
#else
import Text.PrettyPrint
-import Data.FiniteMap
import Data.Char
#endif
@@ -61,10 +60,10 @@ ppDevHelpFile odir doctitle maybe_package ifaces = do
-- reconstruct the module name
index :: [(HsName, [Module])]
- index = fmToList (foldr getIfaceIndex emptyFM ifaces)
+ index = Map.toAscList (foldr getIfaceIndex Map.empty ifaces)
getIfaceIndex (mdl,iface) fm =
- addListToFM_C (++) fm [(name, [mdl]) | (name, Qual mdl' _) <- fmToList (iface_env iface), mdl == mdl']
+ Map.unionWith (++) (Map.fromListWith (++) [(name, [mdl]) | (name, Qual mdl' _) <- Map.toAscList (iface_env iface), mdl == mdl']) fm
ppList [] = empty
ppList ((name,refs):mdls) =