cabal-new refers to the v2, or "new-style" set of commands for the cabal-install package manager and dependency resolver for building and installing Haskell libraries.
Questions tagged [cabal-new]
22 questions
9
votes
1 answer
How to actually use already-installed versions of a package, or find out why it's not possible?
Cabal-newstyle has a habit to occasionally install, like, all dependencies from scratch for no apparent reason. For a project using lens and other common packages, this can take upwards of ½ hour, which is annoying especially when the purpose is…

leftaroundabout
- 117,950
- 5
- 174
- 319
6
votes
1 answer
How can I pass test-options with cabal new-test?
In the old cabal, you could pass test options like --color and --match=name by doing cabal test --test-option=--color --test-option=--match=name. Can this be done with cabal new-test? I don't see a --test-option in the help output of cabal new-test…

MaxGabriel
- 7,617
- 4
- 35
- 82
6
votes
2 answers
How can I stream test results with cabal new-test?
Using cabal test, you're able to stream results with cabal test --show-details=streaming.
I can't find a comparable option for cabal new-test. Is it possible to stream results using new-test?

MaxGabriel
- 7,617
- 4
- 35
- 82
5
votes
1 answer
How to create "cabal.project" file?
I want to create a Cabal project with the possibility to include multiple packages in the same project. When I read Cabal documentation, it says that one has to create a "cabal.project" file. Is this file created manually into the project root or is…

ezyman
- 155
- 8
5
votes
1 answer
How to create binary distributions of applications with cabal (the tool) or stack
I've written an application in Haskell and it's starting to become slightly useful to users. However my application isn't targeted at technically adept folks, let alone Haskell developers, so building my application from source isn't really…

Kritzefitz
- 2,644
- 1
- 20
- 35
4
votes
0 answers
ghc fails to find a library that I built and installed with cabal new-install --lib
I am building a Haskell library with Cabal that I would like to install to use in some other projects. I am using Windows PowerShell and new style Cabal commands. I have ghc 8.10.1 and Cabal 3.2.0.0 and used Chocolatey to install them. cabal…

Liisi
- 329
- 1
- 6
4
votes
1 answer
How to instruct haddock to link to hackage documentation for hackage packages?
So, I am using haddock (through cabal) to generate documentation for my local Haskell package. It has no trouble hyperlinking its own local html documents to each other. However, whenever my package references a symbol from another package, it does…

PyRulez
- 10,513
- 10
- 42
- 87
3
votes
1 answer
How to run shake without stack
I created the recommended build.sh file from the "Running" section of the Shake manual:
#!/bin/sh
mkdir -p _shake
ghc --make Shakefile.hs -v -rtsopts -threaded -with-rtsopts=-I0 -outputdir=_shake -o _shake/build && _shake/build "$@"
but running…

avh4
- 2,635
- 1
- 22
- 25
3
votes
2 answers
How can I generate HTML code coverage reports with new cabal?
Running stack test --coverage generates a nice HTML report showing what lines your test suite covers. How can I achieve the same thing using cabal new-test?
I'm able to pass --enable-coverage to generate a .tix file but I'm not sure what to run on…

MaxGabriel
- 7,617
- 4
- 35
- 82
3
votes
1 answer
CLI arguments in `new-bench` command in `cabal`
I'm trying to pass the --small option from hs-gauge benchmarking library.
I am looking to something similar to what is in stack so I could simply write:
cabal new-bench --benchmark-arguments="--small"
How can I pass the argument to the cabal…

vrom911
- 694
- 1
- 5
- 16
2
votes
1 answer
How to profile TemplateHaskell built with Cabal?
Full project at https://github.com/ysangkok/cabal-profiling-issue
The project contains scaffolding generated by cabal init. I'll paste the most interesting source snippets now.
In Main.hs I have:
newtype Wrapper = Wrapper Int
deriveConvertible…

Janus Troelsen
- 20,267
- 14
- 135
- 196
2
votes
2 answers
How to work together with cabal-3 and ghc (ghc-pkg, too)?
With the release of cabal-3, the packages from Hackage are installed in a new location that the compiler ghc and ghc-pkg know nothing about.
In other words, packages are installed but not registered for ghc. Ghci, ghc, ghc-pkg cannot work.
For…

Vladimir
- 541
- 2
- 8
2
votes
0 answers
Reinstalling the same version of a package with cabal new-install
I am working on a Haskell package. I have not yet uploaded it to Hackage and the version number is 0.1.0.0. I am using new style Cabal commands.
In order to test the package while I'm working on it (to make the library available to the test…

Liisi
- 329
- 1
- 6
2
votes
1 answer
How can I use Stackage's cabal.config files with nix-style cabal?
Stackage provides a cabal.config file with each snapshot, e.g. this one. How can I make cabal new-configure a project with the package versions from that file?
(Alternatively: Is there another way to configure a nix-style cabal project with…

sjakobi
- 3,546
- 1
- 25
- 43
1
vote
1 answer
How to import a lib from one cabal package to another
So my folder structure is like this
.
├── eulerlibs
│ ├── EulerLibs
│ └── eulerlibs.cabal
├── flake.lock
├── flake.nix
├── p001
│ ├── Main.hs
│ └── p001.cabal
├── p002
│ ├── Main.hs
│ └── p002.cabal
├── p003
│ ├── Main.hs
│ └──…

natto
- 63
- 5