[Haskell-cafe] Is it possible for cabal sandboxes to use $HOME/.cabal/lib?

Aldo Davide aldodavide at gmx.com
Sun Apr 5 00:36:27 UTC 2015


On April 04, 2015 at 6:40 PM, Albert Y. C. Lai wrote:
> On 2015-03-30 04:57 PM, Aldo Davide wrote:
> > So basically, I think it would be useful for cabal to be able to support an arbitrary list of directories, e.g.:
> >
> > /home/user/projects/foo/.cabal-sandbox/x86_64-linux-ghc-7.8.4-packages.conf.d
> > /home/user/.ghc/x86_64-linux-7.8.4/package.conf.d
> > /usr/lib64/ghc-7.8.4/package.conf.d
> >
> > Whenever a package is needed, then it would look it up in all of those directories. If a new package is to be installed, it would be installed in the topmost directory. In other words, it would overlay these directories one on top of the other, with the topmost one being used for read-write and the other ones being read-only.
> 
> This has always been available. See my
> 
> http://www.vex.net/~trebla/haskell/sicp.xhtml#sandbox
> 
> In fact, read the whole thing.

Thanks for the link to the article, interesting stuff. It's good to see that ghc as well as the install sub-command of cabal accept an arbitrary stack of package dbs. Unfortunately, I still haven't found a way to make sandboxes use these capabilities. I tried to create a cabal.config file inside a sandbox (like the comment at the top of cabal.sandbox.config suggests), but it does not make any difference if I include a package-db line in there.


More information about the Haskell-Cafe mailing list