git.iko.soy/typeable/pandoc
on master help sign in
Allow haddock-library 1.2, by calling the Documentation.Haddock.Types.MetaDoc record accessor function _doc :: MetaDoc mod id -> DocH mod id
693f9abMark Wright
src/Text/Pandoc/Readers/Haddock.hs+7−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
1{- |
2{- |
2 Module : Text.Pandoc.Readers.Haddock
3 Module : Text.Pandoc.Readers.Haddock
3 Copyright : Copyright (C) 2013 David Lazar
4 Copyright : Copyright (C) 2013 David Lazar
@@ -29,7 +30,12 @@ import Debug.Trace (trace)
29readHaddock :: ReaderOptions -- ^ Reader options
30readHaddock :: ReaderOptions -- ^ Reader options
30 -> String -- ^ String to parse
31 -> String -- ^ String to parse
31 -> Pandoc
32 -> Pandoc
33+readHaddock opts =
34+#if MIN_VERSION_haddock_library(1,2,0)
32−readHaddock opts = B.doc . docHToBlocks . trace' . parseParas
35+ B.doc . docHToBlocks . trace' . _doc . parseParas
36+#else
37+ B.doc . docHToBlocks . trace' . parseParas
38+#endif
33 where trace' x = if readerTrace opts
39 where trace' x = if readerTrace opts
34 then trace (show x) x
40 then trace (show x) x
35 else x
41 else x