首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >ghc无法使用ghc-7.8构建

ghc无法使用ghc-7.8构建
EN

Stack Overflow用户
提问于 2014-07-19 20:20:16
回答 1查看 182关注 0票数 2

我试图用ghc-7.8.3构建ghc-mtl-1.2.1.0,并得到以下错误消息:

代码语言:javascript
运行
复制
Control/Monad/Ghc.hs:42:15:
    No instance for (GHC.MonadIO Ghc)
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (GHC.ExceptionMonad Ghc)

Control/Monad/Ghc.hs:46:15:
    No instance for (MonadIO GHC.Ghc)
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (MonadIO Ghc)

Control/Monad/Ghc.hs:49:15:
    No instance for (GHC.MonadIO Ghc)
      arising from the 'deriving' clause of a data type declaration
    Possible fix:
      use a standalone 'deriving instance' declaration,
        so you can specify the instance context yourself
    When deriving the instance for (GHC.GhcMonad Ghc)

同样的错误与ghc-7.8.2。

我已经尝试找出在称为Ghc和/或GHC和/或MonadIO的9000多个类型和/或模块中,哪种类型和/或模块负责,但到目前为止还没有结果。

所以我的问题是:

  • 损坏的原因是什么?
  • 是否有可能在不将评级从7.8.3下调的情况下修复它?
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2014-07-20 19:18:32

回答我自己的问题。

问题是变压器-0.4.1.0软件包,这是安装在变压器旁边-0.3.0.0,随ghc而来。变压器包提供Control.Monad.IO.Class.MonadIO类。它被拉到构建两次,一次从变压器-0.4.1.0和一次从变压器-0.3.0.0,这导致了冲突。

我已经看到了重复的包,但没有意识到它是问题的根源。我的错误是,我有隐藏变压器-0.4.1.0与ghc-pkg hide,试图构建ghc,问题持续存在,我决定变压器不是原因。当然,躲藏是不够的,我应该把它移除。

卸载变压器-0.4.1.0并降低其依赖性解决了问题。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/24844604

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档