scalaz.xml

287 views
Skip to first unread message

Tony Morris

unread,
Mar 4, 2012, 10:19:03 PM3/4/12
to sca...@googlegroups.com
Hello,
I recently ported the hackage xml library written by Galois[1] to the
scalaz-seven branch. It contains a few additional features as well.

This is an XML parser that includes features such as:
1) Error-correcting; will parse invalid XML and rebalance tags, etc.
2) Zipper for traversing the XML tree structure.
3) A cursor shifting function (on top of the zipper) that logs its
operations (using Writer monad) so they can be inspected after document
transformation has been done.
4) Pretty-printing for displaying a XML document structure.
5) Partial lenses for union types and regular lenses for record types to
ease the composition to perform a single operation. There are lots of
record types in the XML library and a few union types.
6) Example usages to demonstrate its capability. It would be good to add
a couple more to exploit the lenses. I will do this if I get a chance.

There are likely to be some possible improvements as I intended to
complete it within a certain time-frame, so comments are most welcome.
In particular, I'd like to resolve this issue:
https://github.com/scalaz/scalaz/blob/scalaz-seven/xml/src/main/scala/scalaz/xml/NSInfo.scala#L52

I'd also like to bring it more inline with the scalaz developer's guide.
Anyway, comments are most welcome -- this library is something that I
know I have needed in the past and I expect others have too, so it would
be nice to polish it up to the usual high scalaz standards. Let me know
what you think, cheers.


[1] http://hackage.haskell.org/package/xml

--
Tony Morris
http://tmorris.net/


Richard Wallace

unread,
Mar 4, 2012, 10:22:30 PM3/4/12
to sca...@googlegroups.com
The side-effecting functions don't use IO. Any reason not to?

> --
> You received this message because you are subscribed to the Google Groups "scalaz" group.
> To post to this group, send email to sca...@googlegroups.com.
> To unsubscribe from this group, send email to scalaz+un...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/scalaz?hl=en.
>

Tony Morris

unread,
Mar 4, 2012, 10:23:47 PM3/4/12
to sca...@googlegroups.com
Good point. No there is no reason not to. Put this on my todo list,
unless of course, you wish to.
Reply all
Reply to author
Forward
0 new messages