[Haskell-cafe] hxt pickling question
briand at aracnet.com
briand at aracnet.com
Thu Jan 24 16:40:19 CET 2013
Hi,
Trying to understand how to write a document using a pickler but I can't make sense of the types.
From the example:
runX ( xunpickleDocument xpSeason
[ withValidate no
, withTrace 1
, withRemoveWS yes
, withPreserveComment no
] "simple2.xml"
>>>
processSeason
>>>
xpickleDocument xpSeason
[ withIndent yes
] "new-simple2.xml"
)
So all I want to do is pickle a value directly instead of reading the value from a document. I expected to do something like:
runX (someHXTPicklingFunction myValue
>>>
xpickleDocument ...)
but I can't seem to figure out what someHXTPicklingFunction should be, it's certainly nothing obvious like pickleDoc, because that generates the wrong value.
Seems like I probably have a much more fundamental problem in that I really don't understand how the arrow part of this little example really works, but I was kind of hoping that doing something "simple" like this might shed some light on that. And then was immediately stuck in type hell.
Thanks,
Brian
More information about the Haskell-Cafe
mailing list