@@ -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