aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Types.hs
diff options
context:
space:
mode:
authorDavid Waern <david.waern@gmail.com>2011-12-03 05:20:20 +0100
committerDavid Waern <david.waern@gmail.com>2011-12-03 05:20:20 +0100
commitb03be836b8491e09e31bc7a1bba14588db79df11 (patch)
treebcefe05aa4db60813cff625588a468657846c8b8 /src/Haddock/Types.hs
parent07c816c5e548824bb089442cf32d70682e47200b (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.hs8
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