[Haskell] ANNOUNCE: tofromxml Library

Robert haskell at thinking-machines.net
Fri Jan 2 11:22:31 UTC 2015


Hi haskell at haskell.org,

following the advice given by haskellwiki/HWN,
I would like to announce the ToFromXML library.

For a long time I was looking for an easy and convenient
way to store/read Haskell data to/from XML, and all solutions
I found required a substantial amount of "boilerplate" code
(e.g. writing picklers for each data type I want to store).
 From many other postings I understood that many people felt the same,
so I did my best to contribute, coming up with a library.

ToFromXML combines Generics and XML Picklers, building upon hexpat[-pickle].
For reading and writing a data type to XML,
being "Generic" is the only precondition
(most conveniently achieved by "deriving Generic"
with the DerivingGeneric pragma given).
We have a default instance for Show/Read-able types,
instances for almost all primitive types,
and also for [Int]Map, Array, Set, e.g.
Of course one can add specialized instances, if needed.

I tried to add good quality documentation (trying to prevent reasonable 
rants), and gave a short example.
Also, the library comes with a test suite.

It have uploaded it to hackage, maybe it turns out useful for fellow
Haskellers (at least for me it did the job, and produces
human readable XML).

Happy new year, cheers!
Robert


More information about the Haskell mailing list