jaspervdj/hakyll — pull request #183 by blaenk (2013-09-17 06:51:29+00:00)
Title: updated to work with pandoc 1.12

[Pandoc 1.12](http://johnmacfarlane.net/pandoc/releases.html) decouples citeproc-hs from itself, so there is no longer a
Text.Pandoc.Biblio module in Pandoc. Further, citeproc-hs depends on
pandoc-types 1.10 but Pandoc 1.12 depends on pandoc-types 1.12. To
alleviate these issues, pandoc-citeproc was created which includes a
copy of the citeproc-hs source made to be compatible, since the
developer of citeproc-hs is apparently MIA.

pandoc-citeproc is a separate module that handles the mixture of
citeproc-hs and Pandoc. It includes `processCites` in Text.CSL.Pandoc,
which is the new name of what used to be `processBiblio` from
Text.Pandoc.Biblio

Most of these changes are seamless, consisting of simple name changes in
both functions and modules. However, a more direct change in the
Hakyll API itself is that `readPandocBiblio`'s second parameter, the
CSL, is now mandatory, i.e. not of type `Maybe`. This is to reflect the
same change in the underlying processing function from Text.CSL.Pandoc,
`processCites`, where the `Style` argument is now mandatory, and the style
is derived from the `CSL`.

See the old function:

processBiblio :: Maybe Style -> [Reference] -> Pandoc -> Pandoc

Compared to the new one:

processCites :: Style -> [Reference] -> Pandoc -> Pandoc

Sources:

* http://hackage.haskell.org/packages/archive/pandoc/1.11.1/doc/html/Text-Pandoc-Biblio.html
* http://hackage.haskell.org/packages/archive/pandoc-citeproc/0.1/doc/html/Text-CSL-Pandoc.html

Similarly, there is no longer a `readerReferences` field in the reader
options structure, so it's not used.

**Note**: With respect to changes in dependencies, the only things that were changed was removing citeproc-hs in favor of pandoc-citeproc for the aforementioned reasons. Also, bumping the pandoc version requirement to >= 0.12 but < 0.14. All other changes were for cosmetic re-alignment purposes.

**Note**: I don't use citations myself nor did I test them. There are a couple of changes to the citation system which I believe necessitates perusing the change log by those who use them to determine the level of impact. The changes type-checked (of course) and compiled without warnings so I feel that the functionality should be the same as it was previously, if anything it's just the case that new features were added, such as in-YAML citations for example. I just figured it'd be a good idea to get a working version first before beginning to consider adapting to the extra functionality. Personally I wanted access to Pandoc 1.12 for the variety of other new features, including pandoc-type 1.12's [new faster abstract syntax tree traversal functions](http://hackage.haskell.org/packages/archive/pandoc-types/1.12/doc/html/Text-Pandoc-Walk.html).