gpt4 book ai didi

haskell - ghc-mod 安装失败

转载 作者:行者123 更新时间:2023-12-02 16:09:23 25 4
gpt4 key购买 nike

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

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

最佳答案

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

关于haskell - ghc-mod 安装失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12967549/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com