aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Doc.hs
diff options
context:
space:
mode:
authorMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-07-28 14:31:03 +0200
committerMateusz Kowalczyk <fuuzetsu@fuuzetsu.co.uk>2014-08-15 02:47:40 +0100
commit08db4c81ffac672a4a5a90291be70279e9a1f098 (patch)
treecc51e2fa2fdc49b64a584b990a66752a152a3d8f /src/Haddock/Doc.hs
parent5c93cc347773c7634321edd5f808d5b55b46301f (diff)
Fix #313 by doing some list munging.
I get rid of the Monoid instance because we weren't satisfying the laws. Convenience of having <> didn't outweigh the shock-factor of having it behave badly.
Diffstat (limited to 'src/Haddock/Doc.hs')
-rw-r--r--src/Haddock/Doc.hs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/Haddock/Doc.hs b/src/Haddock/Doc.hs
index 79a59ac2..91ad709f 100644
--- a/src/Haddock/Doc.hs
+++ b/src/Haddock/Doc.hs
@@ -5,14 +5,13 @@ module Haddock.Doc ( module Documentation.Haddock.Doc
) where
import Data.Maybe
-import Data.Monoid
import Documentation.Haddock.Doc
import Haddock.Types
combineDocumentation :: Documentation name -> Maybe (Doc name)
combineDocumentation (Documentation Nothing Nothing) = Nothing
combineDocumentation (Documentation mDoc mWarning) =
- Just (fromMaybe mempty mWarning <> fromMaybe mempty mDoc)
+ Just (fromMaybe DocEmpty mWarning `docAppend` fromMaybe DocEmpty mDoc)
-- Drop trailing whitespace from @..@ code blocks. Otherwise this:
--