Closed TheThirdOne closed 7 years ago
Is this something that changed between 7.4.1 and 7.4.2? Travis builds contravariant-1.4 and StateVar-1.1.0.4 together using GHC 7.4.2
I don't have a copy of GHC 7.4.1 to test with, which will make this rather difficult to test.
If you aren't going to use StateVar, you can always get this limping along with
cabal install contravariant -f-StateVar
for now.
If looks like some of the modules Data.StateVar
depends upon in base
were explicitly tagged Safe
in the move to 7.4.2. That's really annoying.
Okay, that's not it.
Data.IORef
, Data.Typeable
, Foreign.Ptr
and Foreign.Storable` are all Trustworthy in base 4.5.0.0 which is what shipped with 7.4.1
Indeed, I managed to install contravariant-1.4
with GHC 7.4.1 (and depending on StateVar-1.1.0.4
) without any issues.
Can you run cabal install contravariant-1.4 -v2
so that we can determine which dependencies you're using?
On the other hand stm-2.2.0.0 isn't flagged Safe and that is a dependency here.
You're likely running into a very untested set of messy dependencies. Unfortunately due to the absolutely terrible design of the warning system for SafeHaskell there isn't a way for me to spackle over all of these holes without omniscience or warnings.
We could normally patch StateVar to claim Trustworthy for a narrow band of STM releases. Unfortunately, someone released 2.2.0.1 with the fix rather than 2.2.1, violating the intent of the PVP, and if we try to explicitly exclude just that one broken version using cabal version bounds then everything that transitively depends on this package will get a branch in the backtracking scheme, which will break a huge number of users of packages downstream, including probably you, since 7.4.1 will be old enough to be using a buggy old version of Cabal where such branches are dangerous.
Moving forward I can fix this so that new versons of StateVar won't accept anything below 2.2.0.1 for stm, which will at least keep it from running into this problem, but such new versions won't be of any use to you on that compiler without installing an updated stm
.
I'd recommend doing one of:
cabal unpack StateVar-1.1.0.4
and adding the {-# LANGUAGE Trustworthy #-}
line to the top of the source file, and compiling it by handstm
by handOne of those will get you out of this rut.
That's I think all we can offer at this point.
I got the following error when running
cabal install contravariant-1.4
It seems that this is similar to #3, and might be a simple fix that would make the project more stable (in terms of installation).
GHC Version: 7.4.1 Cabal Version: 1.24.0.2