[Haskell-cafe] Versioning

Joachim Durchholz jo at durchholz.org
Wed Dec 20 03:22:24 EST 2006

As written in my other post, I will need to update data structures that 
were marshalled to disk.

Now I'm wondering how to best prepare for the situation. E.g. one of the 
common situations is that a single data item gets replaced by a list of 

Now assume that there's a SomeData type that's used across the game, and 
which gets incompatibly updated SomeData1 (say, instead of containing 
just a string it turns into a list of strings).
The update code would now have to unmarshall a blob of game data, 
traverse it to find all instances of SomeData, wrap them in a 
one-element list to turn them into SomeData1s, reconstruct the blob of 
game data with the SomeData1 items, and marshall the result back out to 
This sounds as if I'd have to write code for every single data type in 
the update program just to update a single data type. Is that true, or 
is there a way around this?


More information about the Haskell-Cafe mailing list