[Haskell-cafe] Haskell + emacs + Ghc-mod 4.0.1
arnaud.oqube at gmail.com
Sat Apr 5 07:03:41 UTC 2014
OK, I forgot the —enable-tests flag to cabal install…
However, there seems to be some strange interactions I do not understand fully with the test section of cabal.
Here is the cabal file:
cabal-version: >= 1.8
base == 4.*
base == 4.*
, hspec >= 1.3
When I remove the test-suite section and open src/Thermometre.hs I got errors highlighting which is fine. C-c C-t does not give me types however ('Cannot guess type’ message).
When I leave the test-suite section then opening Thermometre.hs gives me a package error: ‘cannot satisfy -package Thermometre’ as there is a dependency from the tests to the main library.
How can I solve that?
On 03 Apr 2014, at 23:30, Kazu Yamamoto (山本和彦) <kazu at iij.ad.jp> wrote:
>> I upgrade my emacs configuration with latest ghc-mod and all of sudden
>> nothing works (again).
>> When I try to load a .hs file from a project I got the first line
>> highlighted with the error "cannot satisfy -package spec" and I cannot got
>> type, info or doc from that file. Also I do not have anymore syntax errors
>> highlighting I used to see.
> As this message suggests, you need to install spec for testing.
> % cabal install spec
> # I don't know what the spec package is. A typo for hspec?
> This is because ghc-mod obtains dependency for executables, libraries
> *and* testing.
> In general,
> % cabal install --only-dependencies
> would help you.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 496 bytes
Desc: Message signed with OpenPGP using GPGMail
More information about the Haskell-Cafe