Mixing sphinx and Haddock

I’m trying to write some documentation using sphinx (and rST), but I would like keep some parts close to the code so I am thinking of including some comments from the code to the sphinx documentation. This can be done using the include directive with the start-after and end-before option. It works pretty well but the downside is that included portions (parts of Haskell comment) have to be written in rST format instead of Haddock.

As someone experience with mixing sphinx and Haddock ?

i haven’t tried this specific conversion but pandoc can read and write haddock and read and write re Structured Text

1 Like

Pandoc is the last resort, not only because it actually doesn’t parse haskell files ,(and extract the doc from the comment) but only convert document using haddock markdown. I’m only wondering if there is simpler solutions.