[Haskell-cafe] Need some ideas to map XML Schema types to Haskell
praki.prakash at gmail.com
Sun Feb 15 17:37:36 EST 2009
I need to work with a web service that has a few thousand types in its
schema. I am trying to automate the generation of data types and
serializers from the schema. My first thought was to map each data
type to a Haskell record and generate pickle methods thereafter for
serialziation/deserialization. However, I am seeing a few challenges
in mapping Schema types to Haskell records.
First issue is the naming conflicts with record fields. If the number
of types were smaller, I could have manually mangled the name with a
unique prefix. Using a type class for shared name fields seems like an
option but it looks like quite a bit of work. Is there any other
technique I can use?
Second issue is with capturing the Schema type hierarchy. Is there any
way to relate types? If not, what would be a good technique to
represent type hierarchies?
More information about the Haskell-Cafe