git.iko.soy/typeable/pandoc
on master help sign in
Don't require haddock-library 1.4.

Instead use CPP to work around version differences.

commitd7396e73b4ca72d607836cd285be845a85ca6a9b authorJohn MacFarlane <jgm@berkeley.edu> dateFri 15 Jul 2016, 12:04 (10 years ago) parent17defd5
2 files changed+5−1
pandoc.cabal+1−1 src/Text/Pandoc/Readers/Haddock.hs+4
pandoc.cabal+1−1
@@ -283,7 +283,7 @@ Library
283283 hslua >= 0.3 && < 0.5,
284284 binary >= 0.5 && < 0.9,
285285 SHA >= 1.6 && < 1.7,
286− haddock-library >= 1.4 && < 1.5,
286+ haddock-library >= 1.1 && < 1.5,
287287 old-time,
288288 deepseq >= 1.3 && < 1.5,
289289 JuicyPixels >= 3.1.6.1 && < 3.3,
src/Text/Pandoc/Readers/Haddock.hs+4
@@ -60,8 +60,10 @@ docHToBlocks d' =
6060 DocEmphasis _ -> inlineFallback
6161 DocMonospaced _ -> inlineFallback
6262 DocBold _ -> inlineFallback
63+#if MIN_VERSION_haddock_library(1,4,0)
6364 DocMathInline _ -> inlineFallback
6465 DocMathDisplay _ -> inlineFallback
66+#endif
6567 DocHeader h -> B.header (headerLevel h)
6668 (docHToInlines False $ headerTitle h)
6769 DocUnorderedList items -> B.bulletList (map docHToBlocks items)
@@ -109,8 +111,10 @@ docHToInlines isCode d' =
109111 DocMonospaced (DocString s) -> B.code s
110112 DocMonospaced d -> docHToInlines True d
111113 DocBold d -> B.strong (docHToInlines isCode d)
114+#if MIN_VERSION_haddock_library(1,4,0)
112115 DocMathInline s -> B.math s
113116 DocMathDisplay s -> B.displayMath s
117+#endif
114118 DocHeader _ -> mempty
115119 DocUnorderedList _ -> mempty
116120 DocOrderedList _ -> mempty