safecopy icon indicating copy to clipboard operation
safecopy copied to clipboard

Make "Duplicate version tags" crash a compile-time error

Open nh2 opened this issue 10 years ago • 0 comments

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.

nh2 avatar May 16 '14 21:05 nh2