[Nix-dev] Ghc-mod and the new cabal-1.22
meditans at gmail.com
Tue Jan 20 06:14:37 CET 2015
after an upgrade I hit a new problem with ghc-mod. It seems that
ghc-mod can work with cabal-1.22 only if we have ghc-7.10.
So I decided to lookup for possible solution.
The first thing that came to my mind was patching cabal to the 1.20
version. So, this was my config.nix before:
This a dummy version that I wrote after ttuegel's advices on #nixos:
The problem with this approach (other than the lack of binary cache,
which is annoying because I run nixOS in a VM, and compilation is
slow) was essentially this installation error I was not able to solve:
So, for the next approach, I upgraded to haskellng as advised by
Peter's posts in the mailing list, and then to ghc 7.10.
The problem with this approach is that many libraries I'm using are
not ready to be compiled with 7.10, for constraints in versions
(example: fgl with the constraint for base).
The last thing I tried was to use ghc-mod without a cabal file,
because I know that ghc-mod works outside of cabal projects. The
problem with not recognizing modules rendered this path pretty useless
So, I have some questions. The first is (no surprise here):
- How do you suggest to create an environment that works with ghc-mod
(and, added bonus, has a binary cache?). How are you using ghc-mod
right now (I mean, with an updated nixos-unstable)?
And then, keeping in mind that ghc-mod is, after haskell-mode, the
only ide plugin immediately avaiable on nixos for haskell development
(Chris Done's tools do not compile), the second question:
- Could it be worth to downgrade the cabal to 1.20 as before, until
the new version of the compiler stabilizes to the new version? I'm
curious to hear your ideas here.
More information about the nix-dev