[Haskell-cafe] ghc-mod version 4.1.0

Michal Antkiewicz mantkiew at gsd.uwaterloo.ca
Mon May 19 17:33:16 UTC 2014


Hi Bardur,

in such situations I use a shared sandbox instead of the "add-source".

execute

`cabal sandbox init --sandbox=../.shared-cabal-sandbox

in each project and build A, B, C, D.

Does it help with ghc-mod?
Michal


On Sat, May 17, 2014 at 2:18 PM, Bardur Arantsson <spam at scientician.net>wrote:

> 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,
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>



<mantkiew at gsd.uwaterloo.ca>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140519/3818ade0/attachment.html>


More information about the Haskell-Cafe mailing list