safecopy
safecopy copied to clipboard
Make "Duplicate version tags" crash a compile-time error
My program just crashed at run-time with
ghc: Duplicate version tags: [2,2,1]
because I wrote
deriveSafeCopy 2 'extension ''Mytype_v2
deriveSafeCopy 2 'extension ''Mytype_v3
when I meant deriveSafeCopy 3 'extension ''Mytype_v3
.
Since I use deriveSafeCopy
which is TemplateHaskell, it would be great if this mistake could be pointed out to me at compile time.