
23 Nov
2012
23 Nov
'12
7:27 p.m.
On 23 November 2012 15:47, Roman Cheplyaka
Should it be advised to surround safe annotations with CPP #ifs? Or does anyone see a better way out of this contradiction?
I think that would be good advice. Note that even if you're only using GHC then you still want to use CPP in order to support older GHC versions which don't support Safe Haskell as in: http://hackage.haskell.org/packages/archive/usb/1.1.0.4/doc/html/src/System-... Arguably, in that example it would be better to move the check for the availability of Safe Haskell to the cabal file which would define a CPP pragma SAFE_HASKELL which can be used in source files. Bas