By default, any dependencies of the package are installed into the global or user package databases. If you’re building several different packages that have incompatible dependencies, this can cause the build to fail. One way to avoid this problem is to build each package in an isolated environment (“sandbox”), with a sandbox-local package database. Because sandboxes are per-project, inconsistent dependencies can be simply disallowed.
Questions tagged [cabal-sandbox]
10 questions
6
votes
1 answer
how to manage cabal sandboxes
The current documentation of cabal shows a sandbox subcommand.
The respective page on github no longer contains the section on sandboxes.
I'm using cabal version 3.2.0.0, but the sandbox subcommand is absent. What is the correct way to manage…

Bernhard Wagner
- 1,681
- 12
- 15
6
votes
1 answer
Cabal install sandbox can't reinstall base or any other dependencies
EDIT FOR FUTURE SOULS STUMBLING ONTO THIS:
It would be unwise to copy any of my commands below, do not execute them. Just check out Zeta's answer for why I was approaching this incorrectly.
ORIGINAL QUESTION
My sandbox seems to be getting caught on…

Mittenchops
- 18,633
- 33
- 128
- 246
4
votes
0 answers
What does cabal install --shadow-installed-packages do?
cabal install --help says this about --shadow-installed-packages:
If multiple package instances of the same version are installed, treat all but one as shadowed.
But I used this option in a sandbox and it seems that all installed packages were…

WilQu
- 7,131
- 6
- 30
- 38
2
votes
1 answer
Dependency conflicts of base in Haskell cabal
There comes up with a problem that cabal's base is conflicted with the dependency in .cabal file, it seems that my base version is too high, so is there a way to downgrade my base package version in the cabal sandbox.
Resolving…

handora
- 559
- 5
- 14
2
votes
1 answer
How can I use GHC with a cabal sandbox that's not in the current working directory?
If I create a cabal sandbox with cabal sandbox init, I can use cabal repl or cabal exec ghc(i) to work with those packages without creating a project:
$ mkdir /tmp/example && cd /tmp/example
$ cabal sandbox init
$ cabal install QuickCheck
$ cabal…

Zeta
- 103,620
- 13
- 194
- 236
1
vote
0 answers
ghc.exe: unable to load package
I have recently started learning haskell and have never used the cabal package manager before. I'm currently working on a project that requires me to user the io-streams package.
I of course already have the Haskell Platform installed on my…

calumj_dev
- 25
- 9
1
vote
1 answer
Cannot run Hakyll on macOS Sierra: malformed mach-o: load commands size
I can compile Hakyll, but when I try to run it I get a linking error.
First I install Hakyll in a sandbox:
cabal sandbox init
cabal install Hakyll
This completes successfully.
Then I create a plain site using hakyll-init and move the files up a…

John J. Camilleri
- 4,171
- 5
- 31
- 41
1
vote
0 answers
Haskell - fail to load interface for 'System.Console.ANSI' after installing package
I've been learning haskell for the pask few days, and I find it to be very interesting though I'm not used to pure functional paradigm.
I've been trying to make my first "real" program (after helloworld, fizzbuzz & co), which is to make a Snake game…

Zawarudio
- 85
- 1
- 16
0
votes
1 answer
Cabal: Post Build Hook inside a Sandbox
I am creating a simple post-build-hook for Cabal. The problem comes when I try to work in a sandbox. My hook is expecting the compiled code under:
dist/something
but when the build happens inside a sandbox the path…

Randomize
- 8,651
- 18
- 78
- 133
0
votes
1 answer
Haskell: ByteString issue when I use getArgs
I am working inside a sandbox with ghc 7.10.3 and I have this simple code:
main :: IO ()
main = do
args <- getArgs
case args of
[ newOauthConsumerKey, newOauthConsumerSecret ] -> do
let appOauth = newOAuth { oauthServerName =…

Randomize
- 8,651
- 18
- 78
- 133