David Fox
David Fox
:thinking: -- Hack for bug in older Cabal versions #ifndef MIN_VERSION_template_haskell #define MIN_VERSION_template_haskell(x,y,z) 1 #endif
I've pushed a patch to https://github.com/ddssff/safecopy and made a pull request. Please have a look!
I have done this, the result is here: https://github.com/seereason/safecopy/commit/0340f83d6fb475b6eb2f40a98be3cf141d8d24ae I expect to start testing it soon. It replaces the existing default signatures of getCopy and putCopy because they are dangerous....
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.
Release notes: 1. It should now be possible to replace any use of ```$(deriveSafeCopy 3 extension ''Foo)``` with a standalone instance such as ```deriving instance SafeCopy Foo where version =...
Does such an instance even make sense? I haven't thought too hard about it.
The error messages I get from that module look like this: ``` Bug.hs:41:49: Could not deduce (Typeable typ) arising from a use of ‘getSafePut’ from the context (SafeCopy typ) bound...
I just noticed that the context of the data declaration is added to the SafeCopy declaration, so you can fix this by adding context to T2. However, the DatatypeContexts feature...
I'm closing this because I'm no longer certain the DatatypeContexts directive is necessary.