ekmett / ersatz

A monad for interfacing with external SAT solvers
Other
62 stars 15 forks source link

Control.Lens: Can't be safely imported! #13

Closed tomjaguarpaw closed 8 years ago

tomjaguarpaw commented 9 years ago

On a fresh install in a sandbox:

src/Ersatz/Solution.hs:21:1:
    Control.Lens: Can't be safely imported!
    The module itself isn't safe.
cabal: Error: some packages failed to install:
ersatz-0.3 failed during the building phase. The exception was:
ExitFailure 1
glguy commented 9 years ago

This builds fine using the current version of libraries and GHC. I'm guessing you're using an older GHC. Could you list the versions of things you were using that lead that that error?

tomjaguarpaw commented 9 years ago

Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.6.3 cabal-install version 1.20.0.2 using version 1.20.0.1 of the Cabal library

ekmett commented 9 years ago

What version of lens and profunctors do you have?

We apparently didn't rule out some bad combination.

There should be a build plan available for 7.6.3 that works though.

glguy commented 9 years ago

I believe that the issue is that we removed some of the TRUSTWORTHY annotations from lens when GHC 7.10.1 started complaining that they were redundant. Unfortunately they were not redundant in all versions of GHC (as this is showing us)

ekmett commented 9 years ago

I know with GHC 7.2 transformers doesn't show up as SafeHaskell.

tomjaguarpaw commented 9 years ago

lens-4.11 profunctors-5.1.1

glguy commented 9 years ago

I think that the right solution is probably to remove the Safe annotation from the module and allow it to infer safe in environments where it is safe.

glguy commented 8 years ago

Lens as released on hackage has been fixed to build safe on older GHCs now.