[Haskell-cafe] ghc-mod version 4.1.0

Carlo Hamalainen carlo at carlo-hamalainen.net
Wed May 21 07:56:07 UTC 2014


On 17/05/14 20:18, Bardur Arantsson wrote:
> 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.

Does it work if you create a sandbox in each of the directories A, B, C,
and D?

My thinking is that if you are adding the directories A, B, and C using
"cabal sandbox add-source" then they should be able to be built
independently. And of course you'd have to run

cabal sandbox add-source /path/to/project/A   # in directory B
cabal sandbox add-source /path/to/project/A   # in directory C
cabal sandbox add-source /path/to/project/B   # in directory D
cabal sandbox add-source /path/to/project/C   # in directory D

to get the dependencies.

I've tried this out with a test project and it seems to work ok. Also
"cabal repl" works in each of the subdirectories.

-- 
Carlo Hamalainen
http://carlo-hamalainen.net



More information about the Haskell-Cafe mailing list