derive-2.3.0.2 构建期间出现奇怪的错误

发布于 2024-10-06 13:42:09 字数 909 浏览 0 评论 0原文

我正在尝试使用 cabal-install 安装“yi”编辑器,这又会安装包“derive-2.3.0.2”。在 derive 编译期间出现以下错误:

[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

亚历克斯.

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

不离久伴 2024-10-13 13:42:09

我会考虑报告错误或询问[电子邮件受保护] 地址。这应该是一个错误。您也可以尝试从 Hackage 安装旧版本之一。

I would consider reporting a bug or asking on the [email protected] adress. This is supposed to be a misstake. You can probably also try to install one of the older versions from Hackage.

作妖 2024-10-13 13:42:09

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

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

我还没看过,但也许达尔克前往易的部分也已经解决了这个问题。

祝你好运!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文