diff options
author | David Waern <david.waern@gmail.com> | 2011-12-03 05:20:20 +0100 |
---|---|---|
committer | David Waern <david.waern@gmail.com> | 2011-12-03 05:20:20 +0100 |
commit | b03be836b8491e09e31bc7a1bba14588db79df11 (patch) | |
tree | bcefe05aa4db60813cff625588a468657846c8b8 /src/Haddock/Types.hs | |
parent | 07c816c5e548824bb089442cf32d70682e47200b (diff) |
Slightly better behaviour on top-levels without type signatures.
- Docs don't get attached to the next top-level with signature by
mistake.
- If there's an export list and the top-level is part of it,
its doc comment shows up in the documentation.
Diffstat (limited to 'src/Haddock/Types.hs')
-rw-r--r-- | src/Haddock/Types.hs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/Haddock/Types.hs b/src/Haddock/Types.hs index fbaf89c5..2b78905c 100644 --- a/src/Haddock/Types.hs +++ b/src/Haddock/Types.hs @@ -25,6 +25,7 @@ import Control.Arrow import Data.Typeable import Data.Map (Map) import qualified Data.Map as Map +import Data.Monoid import GHC hiding (NoLink) import OccName @@ -289,7 +290,12 @@ data Doc id | DocPic String | DocAName String | DocExamples [Example] - deriving (Eq, Functor) + deriving (Functor) + + +instance Monoid (Doc id) where + mempty = DocEmpty + mappend = DocAppend unrenameDoc :: Doc DocName -> Doc Name |