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