Check whether item is instance of class

"S. Alexander Jacobson" <[email protected]> Mon, 7 Mar 2005 22:04:51 -0500 (Eastern Standard Time)
Newsgroups gmane.comp.lang.haskell.template
Message-ID <Pine.WNT.4.62.0503072201570.3676@philo>
I plan to write an XML serialization routine and would like to have 
per field behavior depend on whether the datatype of the field 
implements ToElement.  In particular I want things that do not derive 
ToElement to be rendered as attributes and things that do implement 
ToElement to be rendered as child nodes.

Is that possible using template haskell or do I have to add some sort 
of naming convention that signals it?

-Alex-

______________________________________________________________
S. Alexander Jacobson tel:917-770-6565 http://alexjacobson.com