diff options
author | David Waern <david.waern@gmail.com> | 2009-03-27 21:33:04 +0000 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2009-03-27 21:33:04 +0000 |
commit | 86bb3fc4d33202369cf87a96db9b99674aaa4535 (patch) | |
tree | 44088beb79162a0de5f0e4e3ccddd4f666195257 /src/Haddock/Types.hs | |
parent | a46e711c848adf52fb07b62d2fa110d769dfed80 (diff) |
Remove H.DocName and put DocName in H.Types
Diffstat (limited to 'src/Haddock/Types.hs')
-rw-r--r-- | src/Haddock/Types.hs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index b47444b7..d20d3358 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -10,7 +10,6 @@ module Haddock.Types where -import Haddock.DocName import Data.Map (Map) import qualified Data.Map as Map import GHC hiding (NoLink) @@ -27,6 +26,20 @@ type Doc = HsDoc Name type DeclInfo = (Decl, Maybe Doc, [(Name, Maybe Doc)]) +data DocName = Documented Name Module | Undocumented Name + deriving Eq + + +-- | The 'OccName' belonging to this name +docNameOcc :: DocName -> OccName +docNameOcc = nameOccName . getName + + +instance NamedThing DocName where + getName (Documented name _) = name + getName (Undocumented name) = name + + {-! for DocOption derive: Binary !-} data DocOption = OptHide -- ^ This module should not appear in the docs |