【发布时间】:2012-10-09 16:08:28
【问题描述】:
我刚刚将 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,而我对类似问题的搜索却一无所获。
关于如何解决这个问题的想法和解决方案?
【问题讨论】:
-
GHC 7.6.1 于 9 月发布。我猜您的选择基本上是 a) 降级到较旧的 GHC 版本(可能是 7.4.2?),或 b) 等待维护者更新软件包。
-
你知道...我什至没有想到这一点。我只是看着基本版本在正确的范围内,然后想,“为什么这不起作用?!”谢谢!
标签: haskell ghc cabal cabal-install