
I'm attempting to use ghc-mod and emacs to get on the fly compiling working again. This is always pleasing when it works, but it seems a never ending challenge to get it to find all my dependences :-( Several of my cabal packages require autogenerated code which used to end up in dist/build/autogen. ghc-mod is configured to search this directory, as per: https://github.com/kazu-yamamoto/ghc-mod/blob/169069f6232c617f06f24b9caa40f8... 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? Thanks, Tim

Hi,
On Sun, Nov 10, 2013 at 11:26 PM, Tim Docker
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 https://github.com/haskell/cabal/issues/1281 As to how generate the hash code yourself, the relevant part of the source code is https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Clie... That function takes the absolute path to the current sandbox ('/path/to/.cabal-sandbox') as input. -- () ascii ribbon campaign - against html e-mail /\ www.asciiribbon.org - against proprietary attachments

Thanks for the quick reply - I'll make an attempt to get ghc-mod to be compatible with this. Tim On 11/11/13 11:26, Mikhail Glushenkov wrote:
Hi,
On Sun, Nov 10, 2013 at 11:26 PM, Tim Docker
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 https://github.com/haskell/cabal/issues/1281
As to how generate the hash code yourself, the relevant part of the source code is https://github.com/haskell/cabal/blob/master/cabal-install/Distribution/Clie... That function takes the absolute path to the current sandbox ('/path/to/.cabal-sandbox') as input.
participants (2)
-
Mikhail Glushenkov
-
Tim Docker