ghc-mod and ghc-modi problem
IntelliJ 14.0.1, Haskell 0.4.1-beta, Windows 8.1
Settings in IntelliJ for Haskell:
| Setting | Value |
|---|---|
| cabal executable | cabal |
| cabal data path | C:\Users\Me\AppData\Roaming\cabal |
| ghc-mod execuable | C:\Users\Me\AppData\Roaming\cabal\bin\ghc-mod.exe |
| ghc-modi execuable | C:\Users\Me\AppData\Roaming\cabal\bin\ghc-modi.exe |
Project is compiled and ran OK.
Clicking Ctrl+Shift+T on some symbol produces the error:
ghc-modi failed
ghc-modi failed with error: NG BUG: GMEString "user error (ghc not found)"
You can disable ghc-modi in Settings | Haskell
If "Use ghc-mod automatic check" is checked - the above error keeps appearing on each key-down as I type.
Thank you.
ghc-modi can't find ghc. Try to add ghc to your PATH.
Just re-checked - the ghc is on my path (D:\Programming\Haskell Platform\2014.2.0.0\bin), but I keep getting the error.
Also what should be set for cabal data path? I'm new to cabal.
Oh. I think have found a bug, but a have no Windows machine to check. Is ghc path is last in your PATH variable?
cabal data path is path where cabal stores packages. There must be folder repo-cache.
It is not last. The ghc.exe is in D:\Programming\Haskell Platform\2014.2.0.0\bin
> echo %PATH%
D:\Programming\Haskell Platform\2014.2.0.0\lib\extralibs\bin;
D:\Programming\Haskell Platform\2014.2.0.0\bin;
C:\ProgramData\Oracle\Java\javapath;
C:\Windows\system32;
C:\Windows;
C:\Windows\System32\Wbem;
C:\Windows\System32\WindowsPowerShell\v1.0\;
D:\Programming\Haskell Platform\2014.2.0.0\mingw\bin;
C:\Users\Mickey\AppData\Roaming\cabal\bin;
I cannot find repo-cache folder on my PC. The closest I have is C:\Users\Mickey\AppData\Roaming\cabal\packages.
By the way, cabal.exe exists in D:\Programming\Haskell Platform\2014.2.0.0\lib\extralibs\bin and in C:\Users\Mickey\AppData\Roaming\cabal\bin. I have rename the one in D:\Programming\Haskell Platform\2014.2.0.0\lib\extralibs\bin in order to make the updates work correctly.
You have to set cabal data path to D:\Users\Mickey\AppData\Roaming\cabal.
Thank you
IntelliJ IDEA 14.0.2, Haskell Platform 2014.2.0.0. Having the same issue. The command line is being able to find out ghc.exe, so it must be in the PATH, however this plugin claims ghc not found. No solution suggested above worked.
I meet the same issue... And also meet this: AssertionError: Wrong line separators: '...not found)\r\n' at offset 49
Same problem.
Open IDE. Create project - all works fine. Close IDE, open IDE, open creaed projects - errors starting.
ghc-modi failed ghc-modi failed with error: NG BUG: GMEIOException user error (ghc not found) You can disable ghc-modi in Settings | Haskell
@ka3a4ok Copy ghc.exe to the same directory as ghc-modi. Use where ghc-modi and where ghc to see where they are.
edit: you also need to move cabal.exe somewhere else. It can't be in the same directory as the new copy of ghc.exe or cabal init, cabal configure, etc... won't work anymore.
So I suddenly started having this problem today. Everything was working perfectly, and when I booted up and launched IntelliJ this morning, ghc-modi is broken with this same error message. As far as I can tell, everything is in the correct place (Haskell Platform, cabal data path.) Nothing should have changed.
@mtomassoli Thank you, that fixed the issue. I made a symbolic link to ghc.exe in the place where ghc-modi.exe was located.