diff options
author | David Waern <david.waern@gmail.com> | 2010-11-20 19:06:00 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2010-11-20 19:06:00 +0000 |
commit | ec9caa150f5126c392e5cce1969cf6a81ee4c86b (patch) | |
tree | 5db6aad18e784cbcec4a91ce1e16e68c69afa531 /src | |
parent | 9ae1088fd211df4796dcd0a99c048e09a7c61d51 (diff) |
Haddock documentation updates
Diffstat (limited to 'src')
-rw-r--r-- | src/Documentation/Haddock.hs | 3 | ||||
-rw-r--r-- | src/Haddock/Types.hs | 22 |
2 files changed, 15 insertions, 10 deletions
diff --git a/src/Documentation/Haddock.hs b/src/Documentation/Haddock.hs index 496c1f00..96198494 100644 --- a/src/Documentation/Haddock.hs +++ b/src/Documentation/Haddock.hs @@ -26,7 +26,7 @@ module Documentation.Haddock ( DocForDecl, FnArgsDoc, - -- * Hyperlinking + -- * Cross-referencing LinkEnv, DocName(..), @@ -42,7 +42,6 @@ module Documentation.Haddock ( markup, -- * Interface files - -- | (.haddock files) InterfaceFile(..), readInterfaceFile, nameCacheFromGhc, diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index 3cfc7875..c00870f9 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -106,8 +106,8 @@ data Interface = Interface { ifaceHaddockCoverage :: (Int,Int) } --- | A smaller version of 'Interface' that can be created from Haddock's --- interface files ('InterfaceFile'). +-- | A subset of the fields of 'Interface' that we store in the interface +-- files. data InstalledInterface = InstalledInterface { -- | The module represented by this interface. @@ -221,18 +221,24 @@ unrenameDocForDecl (mbDoc, fnArgsDoc) = ----------------------------------------------------------------------------- --- * Hyperlinking +-- * Cross-referencing ----------------------------------------------------------------------------- --- | An environment used to create hyper-linked syntax. +-- | Type of environment used to cross-reference identifiers in the syntax. type LinkEnv = Map Name Module --- | An extension of 'Name' that may contain the preferred place to link to in --- the documentation. -data DocName = Documented Name Module | Undocumented Name deriving Eq --- TODO: simplify to data DocName = DocName Name (Maybe Module) +-- | Extends 'Name' with cross-reference information. +data DocName + = Documented Name Module + -- ^ This thing is part of the (existing or resulting) + -- documentation. The 'Module' is the preferred place + -- in the documentation to refer to. + | Undocumented Name + -- ^ This thing is not part of the (existing or resulting) + -- documentation, as far as Haddock knows. + deriving Eq instance NamedThing DocName where |