[Haskell-cafe] help with safecopy + acid-state

Johannes Waldmann waldmann at imn.htwk-leipzig.de
Fri Jan 27 18:04:33 CET 2012

Dear all,

I can't quite get safecopy to work with acid-state:

old version of code :

data T =  T Foo
$(deriveSafeCopy 0 'base ''T)

new version :

data T_orig = T_orig Foo
$(deriveSafeCopy 0 'base ''T_orig)
data T = T Foo Bar
$(deriveSafeCopy 0 'extension ''T)
instance Migrate T where type MigrateFrom T = T_Orig ...

but when my (new) application reads the state from disk
(written by the old application) I get
"Could not parse saved checkpoint due to the following error:
Failed reading: Duplicate version tags: [0,0]"

When I change the version number in deriveSafeCopy, I get
"Failed reading: safecopy: Map: Cannot find getter associated
with this version number: Version {unVersion = 2}"

I don't even know where the "2" comes from.

Any hints appreciated - J.W.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120127/28948723/attachment.pgp>

More information about the Haskell-Cafe mailing list