문제

I am trying to install the "yi" editor using cabal-install, which in turns installs the package 'derive-2.3.0.2'. I get the following error during derive's compilation:

[53 of 58] Compiling Data.Derive.Internal.Traversal ( Data/Derive/Internal/Traversal.hs, dist/build/Data/Derive/Internal/Traversal.o )

Data/Derive/Internal/Traversal.hs:34:0:
    Illegal instance declaration for `Applicative (Writer w)'
        (All instance types must be of the form (T t1 ... tn)
         where T is not a synonym.
         Use -XTypeSynonymInstances if you want to disable this.)
    In the instance declaration for `Applicative (Writer w)'
cabal: Error: some packages failed to install:
derive-2.3.0.2 failed during the building phase. The exception was:
ExitFailure 1

Of course, I tried to build it with --ghc-option=-XTypeSynonymInstances, which in turn gives another compilation error.

I am using ubuntu maverick 32-bit, with ghc-6.12.1 and cabal-install 0.8.2. The ghc was installed from the package repository. Cabal was installed using:

cabal-install cabal

Alex.

도움이 되었습니까?

해결책

I would consider reporting a bug or asking on the haskell-cafe@haskell.org adress. This is supposed to be a misstake. You can probably also try to install one of the older versions from Hackage.

다른 팁

I get the same error building derive-2.3.0.2 (also while trying to install Yi). As with you, adding the TypeSynonymInstances language extension only made things worse.

While I agree this should be considered a bug, it is not a problem in derive-2.4.1, which is the latest version on Hackage. If you have that installed, you can build Yi by downloading the package source and changing the derive dependency constraint accordingly. Yi then builds/runs for me, but I can only imagine there might have been an underlying reason for the original constraint (derive < 2.4).

I haven't looked, but perhaps the darcs head for Yi has some of this resolved as well.

Good Luck!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top