cabal sandbox and the dist directory

Bram Neijt bneijt at
Thu Aug 14 20:25:15 UTC 2014

I found the dist directory still being there a nice feature. For each
project I want to start I want the newest stuff, but some of my longer
running things tend to require older dependencies and I don't want to
have to upgrade. This means that I have multiple small project that
could share a 700MB sandbox, while my larger projects can have their

What I do is use a single sandbox and symlink the cabal.sandbox.config
file in place. This means there is no .cabal-sandbox next to my code,
but there is a dist directory, which I use to run the executable and
inspect the build artifacts. [1]

Moving dist into cabal-sandbox would mean that I would have to either
symlink my dist in also, or use the full path to my sandbox location
every time I want to look at the build artifacts.

How would you easily share a sandbox between multiple projects if dist
is moved into the sandbox?



[1] I did:
mkdir project
mkdir cabal-sandbox
cd cabal-sandbox; cabal sandbox init
cd ../project
ln -s ../cabal-sandbox/cabal.sandbox.config

On Thu, Aug 14, 2014 at 8:57 PM, Johan Tibell <johan.tibell at> wrote:
> Hi Daniel,
> I think we eventually want to move dist/ inside the sandbox and eventually
> move the sandbox out of the package directory too. This is too support a
> world which is less focused on a single package. See my answer here:
> On Thu, Aug 14, 2014 at 8:15 PM, Daniel Trstenjak
> <daniel.trstenjak at> wrote:
>> Hi,
>> currently it's conceptually and practically a bit unpleasant, that the
>> sandbox is a bit holey, because the 'dist' directory remains when
>> deleting the sandbox.
>> Is there a special reason for this behaviour?
>> In the case of a sandbox, why is there a 'dist' directory at all,
>> respectively why isn't it located inside of the '.cabal-sandbox'
>> directory?
>> Greetings,
>> Daniel
>> _______________________________________________
>> cabal-devel mailing list
>> cabal-devel at
> _______________________________________________
> cabal-devel mailing list
> cabal-devel at

More information about the cabal-devel mailing list