1

I want to enable Frege, basically Haskell on JVM (https://github.com/Frege) in IntelliJ IDEA. It requires path to

ghc-mod

and

ghc-modi.

Therefore, I installed Haskell Platform for Windows 64 bit. Since Cabal is already part of the Platform, I tried

"cabal install ghc-mod"

which should have installed the package into

"c:\Users\%Username%\AppData\Roaming\cabal\bin"

Cabal printed into the console

"Resolving dependencies...", then
"Downloading x"..., and
"Configuring x",

where x is the name of some package.

This happened for couple of packages and then Cabal froze forever. What I did then was repeating the process with Haskell Platform 32bit, nevertheless, the result was the same.

Based on this experience, I decided to follow a tutorial on how to install haskell parts separately (http://blog.nikosbaxevanis.com/2015/04/15/setting-up-haskell-on-windows/). I managed to download GHC for Windows, I adjusted PATH, downloaded Cabal for Windows, run

"cabal.exe install"

and

"cabal.exe update"

and in a bash shell run

"cabal.exe install cabal-install"

As in the previous case, cabal froze, I kept run it over the night, but nothing happened at all. This is just an example of what happened in the bash:

$ ./cabal-1.22.0.0-i386-unknown-mingw32.exe install cabal-install
Resolving dependencies...
Downloading mtl-2.2.1...
Downloading network-2.6.2.1...
Downloading random-1.1...
Configuring mtl-2.2.1...
Downloading stm-2.4.4.1...
Configuring network-2.6.2.1...
Downloading text-1.2.2.0...
Configuring random-1.1...
Downloading zlib-0.6.1.1...
Configuring stm-2.4.4.1...

I'm starting to feel desperate. Haskell itself run correctly when using the Platform, the only reason why I need to interact with Cabal is the ghc-mod package, just because of the IDE. At the same time, I consider having the IDE as substantial.

Any suggestion or comment is welcome. Thanks.

user2039784
  • 199
  • 9
  • Had you choosen to use the eclipse plugin instead, you could already be productive. The IDEA plugin for Frege doesn't really have IDE like features to offer, AFAIK. – Ingo Feb 18 '16 at 19:56
  • I agree with Ingo. You can also try Atom with Haskell syntax highlighting. You won't get more from IntelliJ Idea anyway. – Lech Głowiak Feb 18 '16 at 20:03
  • You have better chances to get an answer if you add the Haskell tag, as the question is really about installing ghc-mod. – Ingo Feb 18 '16 at 21:28
  • `cabal` does some work itself, but mainly it calls other things. Run `cabal install ghc-mod -v3` to see exactly what it's doing, and exactly what hangs. There is no evidence that any of this is related to frege or your IDE - seems to be an issue with cabal and this particular package (as evidently, it's able to install other packages) or with some linking issues (which are horribly common on windows) but usually that is an "error" not a hang. – user2407038 Feb 19 '16 at 01:17
  • I found out that the parameter -j1 needs to be added, so that the command looks like this: "cabal.exe install -j1 cabal-install -v3". Then at the end of the console print stays: configure: WARNING: unrecognized options: --with-compiler, --with-gcc checking build system type... x86_64-pc-mingw64 checking host system type... x86_64-pc-mingw64 checking for gcc... gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.exe checking for suffix of executables... .exe checking whether we are cross compiling... After this, it hangs again. – user2039784 Feb 19 '16 at 19:29

0 Answers0