I'm getting the following error when trying to install the contravariant library (which is needed for lens) with Cabal:
``src/Data/Functor/Contravariant.hs:96:1: StateVar-1.1.0.0:Data.StateVar can't be safely imported! The module itself isn't safe.''
I've not had any success googling solutions, and tried a few fixes (such as getting rid of all my Haskell packages (with ``rm -r ~/.ghc'') and starting again), but I'm not really clear on what's causing this error to occur. I'm using ghc 7.4.1 - could that be the problem?
Thanks,
Reuben
Posting the correct answer from comments as community-wiki:
Looks like you're being hit by interactions between an old GHC and the lack of Safe Haskell annotations (in the library) that are redundant with newer GHC versions. Cf. http://github.com/ekmett/ersatz/issues/13