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
commit693f9abb184c3d37864114f93d90a82c60f9ad0b authorMark Wright <gienah@gentoo.org> dateMon 5 Jan 2015, 14:35 (12 years ago) parent4c9ebf3
1 file changed+7−1
src/Text/Pandoc/Readers/Haddock.hs+7−1
src/Text/Pandoc/Readers/Haddock.hs+7−1
@@ -1,3 +1,4 @@
1+{-# LANGUAGE CPP #-}
12{- |
23 Module : Text.Pandoc.Readers.Haddock
34 Copyright : Copyright (C) 2013 David Lazar
@@ -29,7 +30,12 @@ import Debug.Trace (trace)
2930readHaddock :: ReaderOptions -- ^ Reader options
3031 -> String -- ^ String to parse
3132 -> Pandoc
32−readHaddock opts = B.doc . docHToBlocks . trace' . parseParas
33+readHaddock opts =
34+#if MIN_VERSION_haddock_library(1,2,0)
35+ B.doc . docHToBlocks . trace' . _doc . parseParas
36+#else
37+ B.doc . docHToBlocks . trace' . parseParas
38+#endif
3339 where trace' x = if readerTrace opts
3440 then trace (show x) x
3541 else x