[英]ghc-mod fails to install
I've just done a fresh install of Arch Linux to a virtual machine and installed GHC (7.6.1), and cabal-install is version 1.16.0-2 我刚刚在虚拟机上安装了Arch Linux并安装了GHC(7.6.1),而cabal-install是版本1.16.0-2
I'm trying to get an environment setup for haskell coding, including the ghcmod-vim plugin, which of course requires ghc-mod. 我正在尝试获得haskell编码的环境设置,包括ghcmod-vim插件,当然这需要ghc-mod。
Running cabal install ghc-mod gives several errors 运行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)'
I don't really understand how these compiler errors are happening given that ghc-mod 1.11.0 seems to have been put on Hackage in June, and my searches for similar issues has turned up nothing. 我真的不明白这些编译器错误是如何发生的,因为ghc-mod 1.11.0似乎已经在6月份被用于Hackage,而我对类似问题的搜索却没有发现。
Thoughts and solutions on how to fix this? 如何解决这个问题的想法和解决方案?
You might want to have a look at https://github.com/kazu-yamamoto/ghc-mod . 您可能需要查看https://github.com/kazu-yamamoto/ghc-mod 。 The latest commit is called "GHC 7.6.1 compatibility", so this version might solve your problem.
最新的提交称为“GHC 7.6.1兼容性”,因此该版本可能会解决您的问题。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.