aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockRename.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/HaddockRename.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/HaddockRename.hs')
-rw-r--r--src/HaddockRename.hs12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/HaddockRename.hs b/src/HaddockRename.hs
index 13e30f9c..429ad992 100644
--- a/src/HaddockRename.hs
+++ b/src/HaddockRename.hs
@@ -15,12 +15,8 @@ module HaddockRename (
import HaddockTypes
import HsSyn
-
-#if __GLASGOW_HASKELL__ < 503
-import FiniteMap
-#else
-import Data.FiniteMap
-#endif
+import Map ( Map )
+import qualified Map
import Monad
@@ -58,8 +54,8 @@ lookupRn and_then name = do
Nothing -> do outRn name; return (and_then name)
Just maps_to -> return (and_then maps_to)
-runRnFM :: FiniteMap HsQName HsQName -> RnM a -> (a,[HsQName])
-runRnFM env rn = unRn rn (lookupFM env)
+runRnFM :: Map HsQName HsQName -> RnM a -> (a,[HsQName])
+runRnFM env rn = unRn rn (flip Map.lookup env)
runRn :: (n -> Maybe HsQName) -> GenRnM n a -> (a,[n])
runRn lkp rn = unRn rn lkp