aboutsummaryrefslogtreecommitdiff
path: root/src/Haddock/Interface/Create.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Haddock/Interface/Create.hs')
-rw-r--r--src/Haddock/Interface/Create.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Haddock/Interface/Create.hs b/src/Haddock/Interface/Create.hs
index bc615cde..cf7ed841 100644
--- a/src/Haddock/Interface/Create.hs
+++ b/src/Haddock/Interface/Create.hs
@@ -14,7 +14,7 @@
-----------------------------------------------------------------------------
module Haddock.Interface.Create (createInterface) where
-
+import Documentation.Haddock.Doc (docAppend)
import Haddock.Types
import Haddock.Options
import Haddock.GhcUtils
@@ -251,11 +251,14 @@ mkMaps :: DynFlags
-> Maps
mkMaps dflags gre instances decls =
let (a, b, c, d) = unzip4 $ map mappings decls
- in (f $ map (nubBy ((==) `on` fst)) a , f b, f c, f d, instanceMap)
+ in (f' $ map (nubBy ((==) `on` fst)) a , f b, f c, f d, instanceMap)
where
f :: (Ord a, Monoid b) => [[(a, b)]] -> Map a b
f = M.fromListWith (<>) . concat
+ f' :: [[(Name, Doc Name)]] -> Map Name (Doc Name)
+ f' = M.fromListWith docAppend . concat
+
mappings :: (LHsDecl Name, [HsDocString])
-> ( [(Name, Doc Name)]
, [(Name, Map Int (Doc Name))]