[Haskell-cafe] XmlSerializer.deserialize?

Andrea Vezzosi sanzhiyan at gmail.com
Sun Jun 24 12:23:57 EDT 2007


As a side note i'd like to point out that introspectData has a problem with
constructors containing Strings because show (x::String) /= x:

data Foo = Foo { bar :: String } deriving (Typeable,Data)

introspectData (Foo "quux") --> [("bar","\"quux\"")]

Those extras \" don't look very nice in the xml.. (the output of
introspectData is also wrong in the article's example )
you should probably use a modified gshow:

gshow' :: Data a => a -> String
gshow' x = fromMaybe (gshow x) (cast x)

which is id for Strings.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20070624/d94f6cfb/attachment.htm


More information about the Haskell-Cafe mailing list