
Hi all
Thanks for the help you gave me on and off list. I wanted to let you know the solution in the end. The issue rested on the old version of cabal that I had (1.16). I had to install a newer version of cabal, but not 1.22, so using:
cabal install cabal-install --constraint "Cabal <1.22"
The gotcha here is that I had to then adjust my path so that the local ~/.cabal/bin directory comes first in the $PATH to ensure my local cabal was being used.
All the best
Alan
From: Alan Buxton [mailto:alanbuxton@gmail.com]
Sent: 23 June 2015 18:47
To: 'The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell'
Subject: RE: [Haskell-beginners] ghc-mod and cabal "could not find module Prelude"
Thanks for the suggestions:
Imants:
There is
library
build-depends: base ==4.6.*
(The cabal file was generated by cabal init and so I would hope it's legit :))
I installed Haskell on my Ubuntu just by doing sudo apt-get install haskell-platform.
Interestingly, if I do use ghc-mod on a real file with some errors in I get unnecessarily verbose error messages similar to described here: http://mail.haskell.org/pipermail/beginners/2015-February/014573.html I wonder if the issues are related somehow?
Norbert:
I’m not sure what exactly you are suggesting but if I even take the version constraint out of the cabal file so I have build-depends: base (without any version specified) then I get the same issue.
From: Beginners [mailto:beginners-bounces@haskell.org] On Behalf Of Norbert Melzer
Sent: 23 June 2015 17:49
To: The Haskell-Beginners Mailing List - Discussion of primarily beginner-level topics related to Haskell
Subject: Re: [Haskell-beginners] ghc-mod and cabal "could not find module Prelude"
Just add base as dependency in the version constraints matching that base that is delivered with your version of GHC.
Alan Buxton