4

仮想マシンに Arch Linux を新規インストールし、GHC (7.6.1) をインストールしました。cabal-install のバージョンは 1.16.0-2 です。

もちろんghc-modが必要なghcmod-vimプラグインを含む、haskellコーディング用の環境セットアップを取得しようとしています。

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 に答える