1,849 questions
174
votes
3
answers
57k
views
What is the difference between Cabal and Stack?
Yesterday I learnt about a new Haskell tool called Stack. At the first blush, it looks like it does much the same job as Cabal. So, what is the difference between them? Is stack a replacement for ...
123
votes
1
answer
2k
views
Emacs Interactive-Haskell repl non-response if either the cabal or working directory set to project directory
I'm running into odd behavior with the Interactive-Haskell repl in emacs. When I source a file, the emacs mini buffer shows a series of interactive prompts:
Start a new project named 'myproject'?
...
86
votes
4
answers
49k
views
How can I uninstall a version of a Cabal package?
Happstack Lite is breaking on me because it's getting blaze-html version 0.5 and it wants version 0.4. Cabal says that both versions 0.4.3.4 and 0.5.0.0 are installed. I want to remove the 0.5.0.0 ...
73
votes
5
answers
18k
views
Profiling builds with Stack
How do I tell stack to build my executable and all its dependencies with -prof?
Simply adding it to ghc-options in the .cabal file is not enough, because it only tries to build the executable with ...
70
votes
1
answer
4k
views
How can my Haskell program or library find its version number?
I would like my cabalised program to have a --version switch.
I would like it to report the same version as is present in the .cabal file.
If I have to update the version number separately in my ...
68
votes
3
answers
43k
views
How to install a package using stack?
Using cabal, I could install hakyll with the command:
cabal install hakyll
How can I do the same thing using stack?
66
votes
2
answers
15k
views
My cabal packages are FUBAR; how can I purge them and start over?
I forgot to enable building libs for profiling in my ~/.cabal/config before installing a bunch of packages on a new machine and now a --reinstall world to try to fix the situation has left everything ...
62
votes
5
answers
6k
views
How to reduce duplication in the build-depends fields of a .cabal file?
Here's a .cabal file:
Name: myprogram
Version: 0.1
-- blah blah blah
Cabal-version: >=1.9.2
Executable myprogram
HS-source-dirs: src
Main-is: ...
58
votes
2
answers
9k
views
How to make a Haskell cabal project with library+executables that still run with runhaskell/ghci?
If you declare a library + executable sections in a cabal file while avoiding double compilation of the library by putting the library into a hs-source-dirs directory, you cannot usually run your ...
51
votes
2
answers
14k
views
How can I set up a simple test with Cabal?
I have a Haskell project and Cabal package-description that allows me to build and install my package with
$ cabal configure
$ cabal build
$ cabal install
But what about cabal test? Cabal's help ...
48
votes
1
answer
2k
views
Independent subset of cabal packages set
Given a set of cabal packages, is there a way to automatically calculate subset of independent packages? In other words, subset of packages that will be sufficient to install them all.
For [network,...
46
votes
5
answers
12k
views
Cabal not installing dependencies when needing profiling libraries?
I want to compile my program with profiling, so I run:
$ cabal configure --enable-executable-profiling
...
$ cabal build
...
Could not find module 'Graphics.UI.GLUT':
Perhaps you havent ...
46
votes
3
answers
3k
views
How to use a DLL in a Haskell project?
I would like to use an external library, RDFox, in a Haskell project.
Context: I am working on Windows and Linux, both 64 bits, using GHC 7.10 and stack. RDFox is programmed in C++. RDFox shared ...
43
votes
3
answers
7k
views
Can I get `cabal install` to use multiple cores?
Does anyone know how to get cabal install to exploit parallelism? I'm compiling with GHC, and while I don't know if GHC itself can do parallel builds, surely cabal install could run multiple ...
41
votes
1
answer
8k
views
How to install/use a local version of package using Stack?
The situation is, I am trying to install Netwire using Stack. However, there is a problem in the latest netwire 5.0.1, as reported by dhobbs: http://hub.darcs.net/ertes/netwire/issue/13
Since I don'...