git.iko.soy/typeable/pandoc
on master help sign in
Use haddock-library 1.6.0.
commit81ed7948da805f5143bf829c3d62afbfb63718c8 authorJohn MacFarlane <jgm@berkeley.edu> dateSun 20 May 2018, 17:05 (8 years ago) parent41b205f
4 files changed+4−15
pandoc.cabal+1−1 src/Text/Pandoc/Readers/Haddock.hs+1−13 stack.lts9.yaml+1−1 stack.yaml+1
pandoc.cabal+1−1
@@ -380,7 +380,7 @@ library
380380 hslua-module-text >= 0.1.2 && < 0.2,
381381 binary >= 0.5 && < 0.10,
382382 SHA >= 1.6 && < 1.7,
383− haddock-library >= 1.1 && < 1.6,
383+ haddock-library >= 1.6 && < 1.7,
384384 deepseq >= 1.3 && < 1.5,
385385 JuicyPixels >= 3.1.6.1 && < 3.3,
386386 Glob >= 0.7 && < 0.10,
src/Text/Pandoc/Readers/Haddock.hs+1−13
@@ -44,11 +44,7 @@ readHaddockEither :: ReaderOptions -- ^ Reader options
4444 -> String -- ^ String to parse
4545 -> Either PandocError Pandoc
4646readHaddockEither _opts =
47−#if MIN_VERSION_haddock_library(1,2,0)
48− Right . B.doc . docHToBlocks . _doc . parseParas
49−#else
50− Right . B.doc . docHToBlocks . parseParas
51−#endif
47+ Right . B.doc . docHToBlocks . _doc . parseParas Nothing
5248
5349docHToBlocks :: DocH String Identifier -> Blocks
5450docHToBlocks d' =
@@ -68,10 +64,8 @@ docHToBlocks d' =
6864 DocEmphasis _ -> inlineFallback
6965 DocMonospaced _ -> inlineFallback
7066 DocBold _ -> inlineFallback
71−#if MIN_VERSION_haddock_library(1,4,0)
7267 DocMathInline _ -> inlineFallback
7368 DocMathDisplay _ -> inlineFallback
74−#endif
7569 DocHeader h -> B.header (headerLevel h)
7670 (docHToInlines False $ headerTitle h)
7771 DocUnorderedList items -> B.bulletList (map docHToBlocks items)
@@ -87,7 +81,6 @@ docHToBlocks d' =
8781 DocProperty s -> B.codeBlockWith ("",["property","haskell"],[]) (trim s)
8882 DocExamples es -> mconcat $ map (\e ->
8983 makeExample ">>>" (exampleExpression e) (exampleResult e)) es
90−#if MIN_VERSION_haddock_library(1,5,0)
9184 DocTable H.Table{ tableHeaderRows = headerRows
9285 , tableBodyRows = bodyRows
9386 }
@@ -100,7 +93,6 @@ docHToBlocks d' =
10093 colspecs = replicate (maximum (map length body))
10194 (AlignDefault, 0.0)
10295 in B.table mempty colspecs header body
103−#endif
10496
10597 where inlineFallback = B.plain $ docHToInlines False d'
10698 consolidatePlains = B.fromList . consolidatePlains' . B.toList
@@ -133,10 +125,8 @@ docHToInlines isCode d' =
133125 DocMonospaced (DocString s) -> B.code s
134126 DocMonospaced d -> docHToInlines True d
135127 DocBold d -> B.strong (docHToInlines isCode d)
136−#if MIN_VERSION_haddock_library(1,4,0)
137128 DocMathInline s -> B.math s
138129 DocMathDisplay s -> B.displayMath s
139−#endif
140130 DocHeader _ -> mempty
141131 DocUnorderedList _ -> mempty
142132 DocOrderedList _ -> mempty
@@ -149,9 +139,7 @@ docHToInlines isCode d' =
149139 DocAName s -> B.spanWith (s,["anchor"],[]) mempty
150140 DocProperty _ -> mempty
151141 DocExamples _ -> mempty
152−#if MIN_VERSION_haddock_library(1,5,0)
153142 DocTable _ -> mempty
154−#endif
155143
156144-- | Create an 'Example', stripping superfluous characters as appropriate
157145makeExample :: String -> String -> [String] -> Blocks
stack.lts9.yaml+1−1
@@ -26,6 +26,6 @@ extra-deps:
2626- pandoc-citeproc-0.14.3.1
2727- tagsoup-0.14.6
2828- pandoc-types-1.17.4.2
29−- haddock-library-1.5.0.1
29+- haddock-library-1.6.0
3030- texmath-0.11
3131resolver: lts-9.14
stack.yaml+1
@@ -22,6 +22,7 @@ extra-deps:
2222- cmark-gfm-0.1.3
2323- hslua-module-text-0.1.2.1
2424- texmath-0.11
25+- haddock-library-1.6.0
2526ghc-options:
2627 "$locals": -fhide-source-paths -XNoImplicitPrelude
2728resolver: lts-10.10