[Haskell] Haskell XML RPC

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Tue Jun 21 07:15:33 EDT 2005

Dear all,

I am looking at the Haskell XML RPC library http://www.haskell.org/haxr/
First of all, this is a very nice thing to have, and installation is 
really easy, using Cabal and the packaged source archives.
Some questions though:

*) Of course I want to dervie XmlRpcType instances automatically.
The examples suggest  $(asXmlRpcStruct (reifyDecl Person))
but I cannot get this to compile (with ghc-6.4).  It seems reifyDecl is 
gone, and  reify  has different type. I worked out this:

helper name =  asXmlRpcStruct
     ( ( reify name ) >>= ( \ (TyConI dec) -> return dec ))

$(helper ''Person)

Does xmlrpc.cabal should contain a build-dependency
on template-haskell? (Otherwise I get linker errors.)

*) what is the recommended representation that should be created
for data T = A { .. } | B { .. } | ... i. e. discriminated unions?
Certainly some solution can be coded, but ...

*) what about the "Java side of things" - perhaps I want (need)
to interface to a Java Client. If it's Haskell-to-Haskell,
then both server and client of course can derive their
XmlRpcType instances from identical data declaraions
and everything is fine. For intergration with a different language,
what do you recommend: Start from a Haskell data declaration,
and derive a Java representation, directly or indirectly?
Or start from some language independent data declaration,
as it happens (I assume) for JAXB?

Best regards,
-- Johannes Waldmann -- Tel/Fax (0341) 3076 6479/80 --
---- http://www.imn.htwk-leipzig.de/~waldmann/ -------

More information about the Haskell mailing list