Create a Pandoc filter

The makeFilter function allows you to make a filter which can be
used directly with pandoc from the command line. This filter will just
append the API documentation to the end of the document. Example
usage:

-- api.hs
main :: IO ()
main = makeFilter (docs myApi)

Then to run this:

pandoc -o api.pdf --filter=api.hs manual.md

Custom filters

A more sophisticated filter might be to actually convert introduction
and note bodies to Markdown before processing (note: this is not
enabled by default as the pandoc library is GPL-licensed, whereas
this library uses pandoc-types which is BSD3-licensed):