ghc-mod无法安装

时间:2012-10-19 04:46:27

标签: haskell ghc cabal cabal-install

我刚刚将虚拟机安装到虚拟机并安装了GHC(7.6.1),cabal-install版本为1.16.0-2

我正在尝试为haskell编码设置环境,包括ghcmod-vim插件,当然这需要ghc-mod。

运行cabal install ghc-mod会出现几个错误

Gap.hs:81:19:
    Couldn't match expected type `PprStyle -> String' with `[Char]'
    Expected type: String
      Actual type: PprStyle -> String
    Probable cause: `renderWithStyle' is applied to too few arguments
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:81:35:
    Couldn't match expected type `DynFlags' with actual type `SDoc'
    In the first argument of `renderWithStyle', namely `d'
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:81:37:
    Couldn't match type `SDoc' with `SDoc'
    In the second argument of `renderWithStyle', namely `stl'
    In the expression: renderWithStyle d stl
    In an equation for `renderMsg':
        renderMsg d stl = renderWithStyle d stl

Gap.hs:114:28:
    Couldn't match type `Module' with `ModuleName'
    Expected type: ModSummary -> ModuleName
      Actual type: ModSummary -> Module
    In the second argument of `(.)', namely `ms_mod'
    In the first argument of `map', namely `(IIModule . ms_mod)'
    In the first argument of `(<$>)', namely `map (IIModule . ms_mod)'

我真的不明白这些编译器错误是如何发生的,因为ghc-mod 1.11.0似乎已经在6月份被放入了Hackage,而我对类似问题的搜索却没有发现。

关于如何解决这个问题的想法和解决方案?

1 个答案:

答案 0 :(得分:3)

您可能需要查看https://github.com/kazu-yamamoto/ghc-mod。最新的提交称为“GHC 7.6.1兼容性”,因此该版本可能会解决您的问题。