
Hi list, Prompted a recent discussion on this list[1], I have updated my `sundown' package[2]. sundown is a C Markdown parser and renderer[3] that powers GitHub, and I've maintained Haskell bindings for a while. After reading the mentioned thread on this mailing list I updated its interface to use the `String' and `Text' types instead of raw `ByteString's. This should make using the library safer and more pleasant. My original intention was to exploit the C library to produce output in the form of datatypes familiar to the Haskell world (e.g. the ones from the `html' or `blaze-html' package). After thinking about this a bit I'm not so sure it's worth it. Given the free-form nature of the Markdown format - the user can freely include his own html in - I don't think that manipulating the Html output is a common use case, and the Html produced might be invalid anyway. Moreover, while having a more Haskelly output can be done, the code would be quite brittle and reliant on internals of the sundown library, given the nature of its interface to add additional backends (in short: the output is supposed to be text-based, so I'd have to hack my way around that by knowing in what order compound elements are rendered). For this reason I have decided to leave the library as it is. If somebody has compelling counterarguments I might reconsider :). [1] http://www.haskell.org/pipermail/web-devel/2012/002503.html [2] http://hackage.haskell.org/package/sundown [3] https://github.com/tanoku/sundown -- Francesco * Often in error, never in doubt
participants (1)
-
Francesco Mazzoli