diff options
author | simonmar <unknown> | 2005-02-02 16:23:04 +0000 |
---|---|---|
committer | simonmar <unknown> | 2005-02-02 16:23:04 +0000 |
commit | d8450a233a8e9e0fabcd34e9daf53c82db4dd3bd (patch) | |
tree | 4d05856cf7d2181061b6deb5931a34756dec57c4 /src/HaddockTypes.hs | |
parent | a8c82f239a7fa8940abb35c32b82b4ebec9f6761 (diff) |
[haddock @ 2005-02-02 16:23:00 by simonmar]
Revamp the linking strategy in Haddock.
Now name resolution is done in two phases:
- first resolve everything to original names, like a Haskell compiler
would.
- then, figure out the "home" location for every entity, and point
all the links to there. The home location is the lowest non-hidden
module in the import hierarchy that documents the entity. If there
are multiple candidates, one is chosen at random.
Also:
- Haddock should not generate any HTML with dangling links any more.
Unlinked references are just rendered as plain text.
- Error reporting is better: if we can't find a link destination for
an entity reference, we now emit a warning.
Diffstat (limited to 'src/HaddockTypes.hs')
-rw-r--r-- | src/HaddockTypes.hs | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/HaddockTypes.hs b/src/HaddockTypes.hs index 82ce5a08..fafafe40 100644 --- a/src/HaddockTypes.hs +++ b/src/HaddockTypes.hs @@ -25,14 +25,14 @@ data Interface iface_filename :: FilePath, -- ^ the filename that contains the source code for this module + iface_module :: Module, + iface_package :: Maybe String, iface_env :: NameEnv, - -- ^ environment mapping names to *original* names - - iface_import_env :: Map HsQName HsQName, + -- ^ environment mapping exported names to *original* names - iface_reexported :: NameEnv, + iface_reexported :: [HsName], -- ^ For names exported by this module, but not -- actually documented in this module's documentation -- (perhaps because they are reexported via 'module M' @@ -69,7 +69,12 @@ data Interface -- ^ module-wide doc options } -data DocOption = OptHide | OptPrune | OptIgnoreExports +data DocOption + = OptHide -- this module should not appear in the docs + | OptPrune + | OptIgnoreExports -- pretend everything is exported + | OptNotDefinitive -- not the best place to get docs for things + -- exported by this module. deriving (Eq) data ExportItem |