sandbox hashcode in dist directory

Mikhail Glushenkov the.dead.shall.rise at
Mon Nov 11 00:26:58 UTC 2013


On Sun, Nov 10, 2013 at 11:26 PM, Tim Docker <tim at> wrote:
> However since starting to use cabal sandboxes, the generated code ends up in
> a directory like this:
>     dist/dist-sandbox-c4c8b1d4/build/autogen/
> What is this hashcode for? Is it always generated when using a sandbox? If I
> have code (like ghc-mod) that needs to access the
> build directory, how do I work out the value of the hashcode?

So that you can use the same add-source dependency with several
different sandboxes and also build it standalone. See discussion in

As to how generate the hash code yourself, the relevant part of the
source code is
That function takes the absolute path to the current sandbox
('/path/to/.cabal-sandbox') as input.

()  ascii ribbon campaign - against html e-mail
/\   - against proprietary attachments

More information about the cabal-devel mailing list