aboutsummaryrefslogtreecommitdiff
path: root/src/HaddockTypes.hs
diff options
context:
space:
mode:
authordavve <davve@dtek.chalmers.se>2006-07-11 00:54:19 +0000
committerdavve <davve@dtek.chalmers.se>2006-07-11 00:54:19 +0000
commita3c7ba9932ddbeaad3e453633ee752b2983b41a7 (patch)
tree584389092846f6677144df2bdd7b572533ff3271 /src/HaddockTypes.hs
parent912edf6502ca514eb60e7210addb0f55a43a1c3d (diff)
More porting work -- doesn't compile
Diffstat (limited to 'src/HaddockTypes.hs')
-rw-r--r--src/HaddockTypes.hs38
1 files changed, 31 insertions, 7 deletions
diff --git a/src/HaddockTypes.hs b/src/HaddockTypes.hs
index e81bf11d..02d8c673 100644
--- a/src/HaddockTypes.hs
+++ b/src/HaddockTypes.hs
@@ -6,8 +6,8 @@
module HaddockTypes (
-- * Module interfaces
- NameEnv, Interface(..), ExportItem(..), ModuleMap,
-
+ NameEnv, Interface(..), ExportItem(..), ExportItem2(..), ModuleMap, ModuleMap2,
+ HaddockModule(..),
-- * Misc types
DocOption(..), InstHead,
) where
@@ -87,9 +87,9 @@ data DocOption
data ExportItem
= ExportDecl
- GHC.Name -- the original name
- GHC.HsDecl -- a declaration (with doc annotations)
- [InstHead] -- instances relevant to this declaration
+ HsQName -- the original name
+ HsDecl -- a declaration (with doc annotations)
+ [InstHead] -- instances relevant to this declaration
| ExportNoDecl -- an exported entity for which we have no documentation
-- (perhaps becuase it resides in another package)
@@ -108,6 +108,29 @@ data ExportItem
| ExportModule -- a cross-reference to another module
Module
+data ExportItem2
+ = ExportDecl2
+ GHC.Name -- the original name
+ (GHC.HsDecl GHC.Name) -- a declaration (with doc annotations)
+ [InstHead] -- instances relevant to this declaration
+
+ | ExportNoDecl2 -- an exported entity for which we have no documentation
+ -- (perhaps becuase it resides in another package)
+ GHC.Name -- the original name
+ GHC.Name -- where to link to
+ [GHC.Name] -- subordinate names
+
+ | ExportGroup2 -- a section heading
+ Int -- section level (1, 2, 3, ... )
+ String -- section "id" (for hyperlinks)
+ (GHC.HsDoc GHC.Name) -- section heading text
+
+ | ExportDoc2 -- some documentation
+ (GHC.HsDoc GHC.Name)
+
+ | ExportModule2 -- a cross-reference to another module
+ GHC.Module
+
type InstHead = (HsContext,HsAsst)
type ModuleMap = Map Module Interface
@@ -115,6 +138,7 @@ type ModuleMap2 = Map GHC.Module HaddockModule
data HaddockModule = HM {
hmod_options :: [DocOption],
- hmod_decls :: Map Name GHC.HsDecl,
- hmod_orig_exports :: [ExportItem]
+ hmod_decls :: Map GHC.Name (GHC.HsDecl GHC.Name),
+ hmod_orig_exports :: [ExportItem2],
+ hmod_subs :: Map GHC.Name [GHC.Name]
}