aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockTypes.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/HaddockTypes.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/HaddockTypes.hs')
-rw-r--r--src/HaddockTypes.hs17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/HaddockTypes.hs b/src/HaddockTypes.hs
index 15c98f2d..82ce5a08 100644
--- a/src/HaddockTypes.hs
+++ b/src/HaddockTypes.hs
@@ -12,18 +12,13 @@ module HaddockTypes (
DocOption(..), InstHead,
) where
-#if __GLASGOW_HASKELL__ < 503
-import FiniteMap
-#else
-import Data.FiniteMap
-#endif
-
import HsSyn
+import Map
-- ---------------------------------------------------------------------------
-- Describing a module interface
-type NameEnv = FiniteMap HsName HsQName
+type NameEnv = Map HsName HsQName
data Interface
= Interface {
@@ -35,7 +30,7 @@ data Interface
iface_env :: NameEnv,
-- ^ environment mapping names to *original* names
- iface_import_env :: FiniteMap HsQName HsQName,
+ iface_import_env :: Map HsQName HsQName,
iface_reexported :: NameEnv,
-- ^ For names exported by this module, but not
@@ -45,7 +40,7 @@ data Interface
-- location of documentation for the name in another
-- module.
- iface_sub :: FiniteMap HsName [HsName],
+ iface_sub :: Map HsName [HsName],
-- ^ maps names to "subordinate" names
-- (eg. tycon to constrs & fields, class to methods)
@@ -56,7 +51,7 @@ data Interface
-- ^ the exports used to construct the documentation
-- (with orig names, not import names)
- iface_decls :: FiniteMap HsName HsDecl,
+ iface_decls :: Map HsName HsDecl,
-- ^ decls from this module (only)
-- restricted to only those bits exported.
-- the map key is the "main name" of the decl.
@@ -100,6 +95,6 @@ data ExportItem
| ExportModule -- a cross-reference to another module
Module
-type ModuleMap = FiniteMap Module Interface
+type ModuleMap = Map Module Interface
type InstHead = (HsContext,HsAsst)