1
votes

I need to install Haskell's QuickCheck. I try to run cabal install QuickCheck, and receive the following messages:

Resolving dependencies...
In order, the following would be installed:
primitive-0.6 (new package)
template-haskell-2.9.0.0 (latest: 2.10.0.0) (reinstall) changes:
containers-0.5.5.1 -> 0.5.6.3
tf-random-0.5 (new package)
QuickCheck-2.8.1 -base4point8 (new package)

cabal: The following packages are likely to be broken by the reinstalls:
ghc-7.8.3
Use --force-reinstalls if you want to install anyway.

I am quite new to Haskell, but I have a sneaking suspicion that breaking ghc is not a viable solution. Any advice? Thanks!

PS. ghc and cabal-install were installed using MacPorts. The ghc version is, as indicated above, 7.8.3. The port version of cabal-install is hs-cabal-install @1.18.0.5_1. Additionally, I've encountered this error on two different machines; one is running OS 10.9, the other 10.10.

2
Use sandboxes to separate your different package databases and not mess up your main environment: haskell.org/cabal/users-guide/…JP Moresmau
Try installing with the flags --constraint='template-haskell installed' --constraint='containers installed'.Rufflewind

2 Answers

1
votes

For a per-user cabal installation and not a sandbox, running cabal install --reinstall --force-reinstalls QuickCheck is fine. Using sandboxes is still much better though.

0
votes

I am also new to Haskell but it seems that people should use stack nowadays.

If so,

$ git clone https://github.com/stackbuilders/quickcheck-manual $ cd quickcheck-manual/ $ stack setup $ stack install

Ref/See https://github.com/stackbuilders/quickcheck-manual