4

我刚刚在虚拟机上完成了 Arch Linux 的全新安装并安装了 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 上,而我对类似问题的搜索却一无所获。

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

4

1 回答 1

3

您可能想看看https://github.com/kazu-yamamoto/ghc-mod。最新的提交称为“GHC 7.6.1 兼容性”,所以这个版本可能会解决你的问题。

于 2012-10-19T05:26:38.400 回答