在derive-2.3.0.2版本中出现了奇怪的错误

时间:2010-12-08 23:19:38

标签: haskell cabal cabal-install

我正在尝试使用cabal-install安装“yi”编辑器,而cabal-install又安装了包'derive-2.3.0.2'。我在导出编译期间遇到以下错误:

[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

当然,我尝试使用--ghc-option = -XTypeSynonymInstances构建它,这又会产生另一个编译错误。

我正在使用ubuntu maverick 32位,ghc-6.12.1和cabal-install 0.8.2。 ghc是从包存储库安装的。 Cabal的安装使用:

cabal-install cabal

亚历。

2 个答案:

答案 0 :(得分:1)

我会考虑报告错误或询问 haskell-cafe@haskell.org 地址。这应该是一个错误。您也可以尝试安装Hackage之一的旧版本。

答案 1 :(得分:0)

我在构建derive-2.3.0.2时也遇到了同样的错误(同时尝试安装Yi)。和你一样,添加TypeSynonymInstances语言扩展只会让事情变得更糟。

虽然我同意这应该被视为一个错误,但它并不是导致-2.4.1中的问题,这是Hackage的最新版本。如果已安装,则可以通过下载包源并相应地更改派生依赖性约束来构建Yi。 Yi然后为我构建/运行,但我只能想象原始约束可能存在潜在原因(派生< 2.4)。

我没有看过,但是也许是为了Yi的darcs也解决了一些问题。

祝你好运!