Don't require haddock-library 1.4.
Instead use CPP to work around version differences.
This commit is contained in:
parent
17defd5004
commit
d7396e73b4
2 changed files with 5 additions and 1 deletions
|
@ -283,7 +283,7 @@ Library
|
|||
hslua >= 0.3 && < 0.5,
|
||||
binary >= 0.5 && < 0.9,
|
||||
SHA >= 1.6 && < 1.7,
|
||||
haddock-library >= 1.4 && < 1.5,
|
||||
haddock-library >= 1.1 && < 1.5,
|
||||
old-time,
|
||||
deepseq >= 1.3 && < 1.5,
|
||||
JuicyPixels >= 3.1.6.1 && < 3.3,
|
||||
|
|
|
@ -60,8 +60,10 @@ docHToBlocks d' =
|
|||
DocEmphasis _ -> inlineFallback
|
||||
DocMonospaced _ -> inlineFallback
|
||||
DocBold _ -> inlineFallback
|
||||
#if MIN_VERSION_haddock_library(1,4,0)
|
||||
DocMathInline _ -> inlineFallback
|
||||
DocMathDisplay _ -> inlineFallback
|
||||
#endif
|
||||
DocHeader h -> B.header (headerLevel h)
|
||||
(docHToInlines False $ headerTitle h)
|
||||
DocUnorderedList items -> B.bulletList (map docHToBlocks items)
|
||||
|
@ -109,8 +111,10 @@ docHToInlines isCode d' =
|
|||
DocMonospaced (DocString s) -> B.code s
|
||||
DocMonospaced d -> docHToInlines True d
|
||||
DocBold d -> B.strong (docHToInlines isCode d)
|
||||
#if MIN_VERSION_haddock_library(1,4,0)
|
||||
DocMathInline s -> B.math s
|
||||
DocMathDisplay s -> B.displayMath s
|
||||
#endif
|
||||
DocHeader _ -> mempty
|
||||
DocUnorderedList _ -> mempty
|
||||
DocOrderedList _ -> mempty
|
||||
|
|
Loading…
Reference in a new issue