Search code examples
haskellintellij-ideacabalghc-mod

ghc-modi and cabal version


(Haskell newbie here)

I'm trying to configure HaskForce plugin into IntelliJ IDEA, configured "ghc-mod" with "legacy-interactive" in "GHC Modi" Flags. The root problem seems to be related to cabal version, although when I try autocompleting on any Haskell symbol, I get this:

ghc-modi error
           Unable to parse problems from ghc-modi: cabal-helper-wrapper.exe: ghc: readCreateProcess: does not exist (No such file or directory)

           ghc-mod: readCreateProcess: C:\ACME\projects\htest\.cabal-sandbox\cabal-helper-0.5.3.0-553kah86RQN6BuDX6XLBiX\cabal-helper-wrapper.exe "C:\\ACME\\projects\\htest" "C:\\ACME\\projects\\htest\\dist" (exit 1): failed

When I run this last command (C:\ACME\projects\htest\.cabal-sandbox\cabal-helper-0.5.3.0-553kah86RQN6BuDX6XLBiX\cabal-helper-wrapper.exe "C:\\ACME\\projects\\htest" "C:\\ACME\\projects\\htest\\dist"), it tries to install cabal 1.18:

cabal-helper-wrapper.exe: Installing Cabal version 1.18.1.3 failed.

I already have cabal, of version 1.22 (installed via Haskell Platform v7.10.2-a, released recently in August).

Is there any way to work around this issue (i.e. still use ghc-mod / ghc-modi)?


Solution

  • Updated Haskforce plugin (0.3-beta24) seems to work correctly with following ghc-mod:

    ghc-mod version 5.4.0.0 compiled by GHC 7.10.2