[Haskell-cafe] ghc-mod version 4.1.0

Bardur Arantsson spam at scientician.net
Sat May 17 18:18:32 UTC 2014


On 2014-05-01 04:58, Kazu Yamamoto (山本和彦) wrote:
> Hello guys,
> 
> I have released ghc-mod version 4.1.0. In this version, ghc-modi
> provides "info" and "type" commands. This means that you can display
> types and information of expressions very quickly on Emacs.
> 
> 	http://hackage.haskell.org/package/ghc-mod
> 
> Thanks to GHC's -fdefer-type-errors, "type" and "info" can work even
> if the file contains type errors. Yay! Of course, you can make use of
> GHC's hole. For more information, please read the "Types" subsection
> of the following page:
> 
> 	http://mew.org/~kazu/proj/ghc-mod/en/emacs.html
> 
> Enjoy!
> 

Hi,

I've been trying this thing out (including the Emacs integration) and
it's working pretty well so far, but I've run into a limitation that's a
bit frustrating.

I have a multi-project setup sort of like the following:

  project/
    A/
    B/ (depends on A)
    C/ (depends on A)
    D/ (depends on B + C)

(where D is an executable "example" project)

To compile everything I've created a sandbox for the D project in
project/D/ and run all my cabal commands from there. I've added A, B,
and C via the "add-source" sandbox feature.

If I edit a file in the D project, ghc-mod works beautifully, but if I
edit anything in A, B, or C ghc-mod (understandably) cannot find the
sandbox and complains about various packages (that A, B or C depend on)
not being installed.

It there some way to make this work?

Would it help to actually create the sandbox in the project's main
directory (A, B, C, D are subdirectories) and then add them all as source?

Any help/guidance in getting this to work would be appreciated.

Regards,



More information about the Haskell-Cafe mailing list