aboutsummaryrefslogtreecommitdiff
path: root/haddock-api/src/Haddock/Backends/LaTeX.hs
diff options
context:
space:
mode:
authorHécate Moonlight <Kleidukos@users.noreply.github.com>2021-02-07 18:43:19 +0100
committerGitHub <noreply@github.com>2021-02-07 18:43:19 +0100
commita30ebe591c862bcaac321ce9a5c03fa2ce56729e (patch)
tree883ee3f8c0e195299925b790cba6f88a537200f6 /haddock-api/src/Haddock/Backends/LaTeX.hs
parent0f7ff041fb824653a7930e1292b81f34df1e967d (diff)
parent786d3e69799398c3aac26fbd5017a127bc69cacc (diff)
Merge pull request #1321 from Kleidukos/ghc-9.0
Merge ghc-9.0 into ghc-head
Diffstat (limited to 'haddock-api/src/Haddock/Backends/LaTeX.hs')
-rw-r--r--haddock-api/src/Haddock/Backends/LaTeX.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/haddock-api/src/Haddock/Backends/LaTeX.hs b/haddock-api/src/Haddock/Backends/LaTeX.hs
index 5b27847e..df1f94e6 100644
--- a/haddock-api/src/Haddock/Backends/LaTeX.hs
+++ b/haddock-api/src/Haddock/Backends/LaTeX.hs
@@ -1241,7 +1241,12 @@ latexMarkup = Markup
, markupAppend = \l r v -> l v . r v
, markupIdentifier = \i v -> inlineElem (markupId v (fmap occName i))
, markupIdentifierUnchecked = \i v -> inlineElem (markupId v (fmap snd i))
- , markupModule = \m _ -> inlineElem (let (mdl,_ref) = break (=='#') m in (tt (text mdl)))
+ , markupModule =
+ \(ModLink m mLabel) v ->
+ case mLabel of
+ Just lbl -> inlineElem . tt $ lbl v empty
+ Nothing -> inlineElem (let (mdl,_ref) = break (=='#') m
+ in (tt (text mdl)))
, markupWarning = \p v -> p v
, markupEmphasis = \p v -> inlineElem (emph (p v empty))
, markupBold = \p v -> inlineElem (bold (p v empty))