From 08db4c81ffac672a4a5a90291be70279e9a1f098 Mon Sep 17 00:00:00 2001 From: Mateusz Kowalczyk Date: Mon, 28 Jul 2014 14:31:03 +0200 Subject: 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. --- src/Haddock/Doc.hs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/Haddock/Doc.hs') 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: -- -- cgit v1.2.3