-
Notifications
You must be signed in to change notification settings - Fork 37
Support deriving SafeCopy using Generic #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have done this, the result is here: seereason@0340f83 I expect to start testing it soon. It replaces the existing default signatures of getCopy and putCopy because they are dangerous. - they simply call the serialization method, no migrations are performed, and any embedded safecopy types are not decoded correctly. One issue is that the order in which the values are output is different, and I don't really understand the order that the current code is using. I will file an issue about this pointing to the test code included in this patch. |
Ok, I understand it better and I've finished the implementation so it inter operates with the current template haskell instances. Now to take it for a spin. |
Still needs some tweaks. |
…es extension Ignore-this: f757f5a25742adfd723055d243cf7907 darcs-hash:20110815142611-ae560-c5115ef8f621b622a3218678f8f567aad8545187
Release notes:
|
I tried this myself a while ago:
http://hub.darcs.net/dag/safecopy/patch/20121018075208-6eb02
It worked but didn't generate very efficient instances, and certainly not the same instances as
deriveSafeCopy
. The problem was with my code being too stupid, and probably notGeneric
not being powerful enough or anything like that. It should be perfectly doable.Filing this here in case anyone wants to take a stab at it, since I wasn't smart enough to do it. I might try my hand at it again though some time.
The text was updated successfully, but these errors were encountered: