aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockTypes.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/HaddockTypes.hs')
-rw-r--r--src/HaddockTypes.hs20
1 files changed, 15 insertions, 5 deletions
diff --git a/src/HaddockTypes.hs b/src/HaddockTypes.hs
index 990d2408..e81bf11d 100644
--- a/src/HaddockTypes.hs
+++ b/src/HaddockTypes.hs
@@ -12,8 +12,11 @@ module HaddockTypes (
DocOption(..), InstHead,
) where
-import HsSyn
-import Map
+import HsSyn2
+
+import qualified GHC as GHC
+
+import Data.Map
-- ---------------------------------------------------------------------------
-- Describing a module interface
@@ -84,8 +87,8 @@ data DocOption
data ExportItem
= ExportDecl
- HsQName -- the original name
- HsDecl -- a declaration (with doc annotations)
+ GHC.Name -- the original name
+ GHC.HsDecl -- a declaration (with doc annotations)
[InstHead] -- instances relevant to this declaration
| ExportNoDecl -- an exported entity for which we have no documentation
@@ -105,6 +108,13 @@ data ExportItem
| ExportModule -- a cross-reference to another module
Module
+type InstHead = (HsContext,HsAsst)
+
type ModuleMap = Map Module Interface
+type ModuleMap2 = Map GHC.Module HaddockModule
-type InstHead = (HsContext,HsAsst)
+data HaddockModule = HM {
+ hmod_options :: [DocOption],
+ hmod_decls :: Map Name GHC.HsDecl,
+ hmod_orig_exports :: [ExportItem]
+}