I wrote a wiki page on how I have successfully done several acid-state 0.5 to 0.6 migrations:<div><br></div><div><a href="http://code.google.com/p/happstack/wiki/AcidState05to06">http://code.google.com/p/happstack/wiki/AcidState05to06</a></div>
<div><br></div><div>It's not very pretty. But it works. Basically you just created SafeCopy 0.5 *and* 0.6 instances for all your types, and then run the migrate function I supplied. </div><div><br></div><div>If you forget to create an instance, you get a compile time error. The new state is written to a new directory. </div>
<div><br></div><div>So, if the app compiles and runs you can have pretty high confidence that everything worked correctly. And it doesn't write anything to the old state directory, so it's not going to corrupt your data that way either.</div>
<div><br></div><div>- jeremy</div><div><br></div><div><br><div class="gmail_quote">On Wed, Feb 15, 2012 at 12:24 PM, Lemmih <span dir="ltr"><<a href="mailto:lemmih@gmail.com">lemmih@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Greetings,<br>
<br>
With acid-state-0.6, you can use regular Haskell data structures<br>
without worrying about data loss or durability. Your state will simply<br>
always be available to you even after software crashes or power<br>
outages.<br>
<br>
Important: acid-state-0.6 is not immediately backwards compatible with<br>
previous versions. To restore states from previous versions you first<br>
need to create a checkpoint and then modify your data structure to use<br>
the 'Prim' wrapper from safecopy-0.6 wherever built-in types are used.<br>
More information on this will be on the wiki soonish. I hope this<br>
slight inconvenience will be worth it in the long run.<br>
<br>
Acid-state-0.6 also includes a new Remote backend that enables<br>
concurrent access by multiple processes.<br>
<br>
For examples of how to use the library, see:<br>
<a href="http://mirror.seize.it/acid-state/examples/" target="_blank">http://mirror.seize.it/acid-state/examples/</a><br>
<br>
Hackage page: <a href="http://hackage.haskell.org/package/acid-state" target="_blank">http://hackage.haskell.org/package/acid-state</a><br>
<br>
Wiki site: <a href="http://acid-state.seize.it/" target="_blank">http://acid-state.seize.it/</a><br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Cheers,<br>
Lemmih<br>
<br>
_______________________________________________<br>
Haskell mailing list<br>
<a href="mailto:Haskell@haskell.org">Haskell@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell" target="_blank">http://www.haskell.org/mailman/listinfo/haskell</a><br>
</font></span></blockquote></div><br></div>