
25 Jun
2007
25 Jun
'07
1:45 a.m.
hughperkins:
Just noticed that all my responses have been going only to Neil, not to the group. Anyway, the jist of our conversation was that it's not possible to create arbitrary datatypes/constructors from strings in Haskell. Can anyone deny/confirm?
Entirely possible. Though it would be interesting to see the code that is to process the arbitrary types as they arrive, after deserialising. Anyway there was a thread on this last week. One solution is to have a symbol table mapping type reps to values of a given type, then you use that to know which type to read from the constructor tag, resolving the problem of not knowing what type you're reading. -- Don