[Haskell-cafe] how do I pass customization items in syb code?
Alex Jacobson
alex at alexjacobson.com
Fri Jun 1 05:38:53 EDT 2007
I'm looking at the XML SYB example
http://www.cs.vu.nl/boilerplate/testsuite/xmlish/Main.hs
I'd like to find a way to pass other type customizations as arguments to
data2content and content2data.
I modified data2Content as follows:
data2content f = element
`ext1Q` list
`extQ` string
`extQ` f
But I can't figure out how to give f a type such that
(data2Content $ myFooElem `extQ` myBarElem)
operates on both Foo and Bar elements. Right now I am giving f the type
f::(a->[Content]) which compiles but causes the wrong behavior.
Any recommendations on how to fix this?
-Alex-
More information about the Haskell-Cafe
mailing list