aboutsummaryrefslogtreecommitdiff
path: root/haddock-library/src/Documentation/Haddock/Doc.hs
diff options
context:
space:
mode:
authorAlexander Biehl <alexbiehl@gmail.com>2018-06-14 15:28:52 +0200
committerGitHub <noreply@github.com>2018-06-14 15:28:52 +0200
commit6247ec8b5a5bc8145ce851dce11eb617a380381c (patch)
tree7856c0dd1ddd0c1f3eef0422b0cd8e8a5a6b71cb /haddock-library/src/Documentation/Haddock/Doc.hs
parent9a7f539d0c20654ff394f2ff99836412a6844df1 (diff)
parent095fa970b32c818ed4c06cefc00ba98aaff756fa (diff)
Merge pull request #857 from sjakobi/ghc-head-update-3
Update ghc-head
Diffstat (limited to 'haddock-library/src/Documentation/Haddock/Doc.hs')
-rw-r--r--haddock-library/src/Documentation/Haddock/Doc.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/haddock-library/src/Documentation/Haddock/Doc.hs b/haddock-library/src/Documentation/Haddock/Doc.hs
index 66bd1c97..297d30d6 100644
--- a/haddock-library/src/Documentation/Haddock/Doc.hs
+++ b/haddock-library/src/Documentation/Haddock/Doc.hs
@@ -27,16 +27,16 @@ metaDocAppend (MetaDoc { _meta = m, _doc = d })
(MetaDoc { _meta = m', _doc = d' }) =
MetaDoc { _meta = m' `metaAppend` m, _doc = d `docAppend` d' }
--- | This is not a monoidal append, it uses '<|>' for the '_version'.
+-- | This is not a monoidal append, it uses '<|>' for the '_version' and
+-- '_package'.
metaAppend :: Meta -> Meta -> Meta
-metaAppend (Meta { _version = v }) (Meta { _version = v' }) =
- Meta { _version = v <|> v' }
+metaAppend (Meta v1 p1) (Meta v2 p2) = Meta (v1 <|> v2) (p1 <|> p2)
emptyMetaDoc :: MetaDoc mod id
emptyMetaDoc = MetaDoc { _meta = emptyMeta, _doc = DocEmpty }
emptyMeta :: Meta
-emptyMeta = Meta { _version = empty }
+emptyMeta = Meta empty empty
docAppend :: DocH mod id -> DocH mod id -> DocH mod id
docAppend (DocDefList ds1) (DocDefList ds2) = DocDefList (ds1++ds2)