Embedded transformer version is not counted when installing cabal-install

I am completely new to Haskell and I am trying to make Yesod work.

My version for kabbalah is the version for installing version 1.20.0.3 using version 1.20.0.2 of the Cabal library

This is what happens when I am right to install alex:

$ cabal install alex
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: alex-3.1.4 (user goal)
next goal: QuickCheck (dependency of alex-3.1.4)
rejecting: QuickCheck-2.8.1, 2.8 (global constraint requires ==2.7.6)
trying: QuickCheck-2.7.6
next goal: transformers (dependency of QuickCheck-2.7.6)
rejecting: transformers-0.4.3.0, 0.4.2.0, 0.4.1.0, 0.3.0.0, 0.2.2.1, 0.2.2.0,
0.2.1.0, 0.2.0.0, 0.1.4.0, 0.1.3.0, 0.1.1.0, 0.1.0.1, 0.1.0.0, 0.0.1.0,
0.0.0.0, 0.4.0.0 (global constraint requires installed instance)
Dependency tree exhaustively searched.

      

Second try:

$ cabal install alex happy yesod-bin --allow-newer
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: alex-3.1.4 (user goal)
trying: QuickCheck-2.7.6/installed-1a8... (dependency of alex-3.1.4)
trying: tf-random-0.5/installed-ef3... (dependency of
QuickCheck-2.7.6/installed-1a8...)
next goal: primitive (dependency of tf-random-0.5/installed-ef3...)
rejecting: primitive-0.5.0.1/installed-8e5... (global constraint requires
==0.6)
rejecting: primitive-0.6 (conflict: tf-random =>
primitive==0.5.0.1/installed-8e5...)
rejecting: primitive-0.5.4.0, 0.5.3.0, 0.5.2.1, 0.5.1.0, 0.5.0.1, 0.5, 0.4.1,
0.4.0.1, 0.4, 0.3.1, 0.3, 0.2.1, 0.2, 0.1 (global constraint requires ==0.6)
Dependency tree exhaustively searched.

      

What do I need to do to install alex?

Related question: cabal install --- global restriction requires an installed instance

Comment by @kosmikus on this question:

Thus, the Stackage LTS configuration file contains the limiting transformers installed, which means that only the existing version can be used with the transformers. This is reasonable since the GHC comes with a specific version of the transformers. For ghc-7.8 it is Transformers-0.3.0.0. For some reason this installed version is not covered by the cabal installation. Your incomplete journal does not contain enough information to understand why.

How can I fix my Stackage LTS config file? Where is Ubuntu located?

+3


source to share


2 answers


The cause of the problem was that my GHC was too old. I downloaded a new version and it resolved the problem.

Error (and wrong)

There must be a file in the current directory cabal.config

. Open it with any text editor and serach for string transformers installed

.

Once you've found it, replace it with transformers ==0.4.3.0

or whatever version you like.

This is a bad solution because, as dfeurer writes:



transformers

is very far in the package dependency structure. I believe it only depends on base

; I imagine that most of the packages on Hackage depend directly or indirectly on it. if you are an upgrade transformers

, virtually every dependency on the system will go sluggish, which is the opposite of what you are going if you are using Stackage.


Pure solution from Sibi

Use package bundles as they are. If you have a global package causing the problem, remove them and exclude using the stack. It's also helpful to use a sandbox for every project.

+1


source


Try cabal install alex --allow-newer



+1


source







All Articles