I need to process several formats and versions for semantically equivalent data.
I can generate Haskell data types for each scheme (for example, XSD), they will be technically different, but in many cases they are semantically and structurally identical.
The data is complex, includes links, and service components must process the entire graph and produce a similar response (the component may just update the field, but it may be necessary to analyze the entire graph to collect all the necessary information, it may call other services like a).
- As I can imagine
ns1:address, ns2:adressboth as one polymorphic type that has elements countryand street, and applications should treat them as identical, but keep the serialization context in order to write the answer in the correct format (one view can encode them on one line, while others can carry also extra complicated data)? - How close can I write mostly code that defines semantic data equivalence, business logic, and generates everything else? What features in the Haskell language or libraries should be evaluated as building blocks for a potential solution?
Rumca source
share