Questions tagged [cabal]

Cabal is a package distribution and build system for the Haskell programming language.

Cabal stands for Common Architecture for Building Applications and Libraries. It is a package distribution and build system for the Haskell programming language. It is integrated with Hackage, a central package archive of open-source software written in Haskell. Cabal can refer both to the Cabal library which Setup.hs files can link against in order to build Haskell packages, and the command-line tool, which provides a range of additional functionality, including automatically fetching packages from , solving dependency graphs of version constraints to obtain install plans, managing sandboxed package environments, and much more.

More information about Cabal can be found at the Cabal website.

1793 questions
26
votes
1 answer

Installing & Building GHC with OSX Mavericks GHC

Why doesn't my GHC 7.6.3 work after upgrading to OSX Mavericks?
katychuang
  • 1,018
  • 8
  • 18
25
votes
2 answers

How to install Haskell (Platform or Stack) in 2018 on Linux?

I am trying to learn Haskell from the book Learn You a Haskell by Miran Lipovača. Both the book and haskell.org recommends installing the Haskell Platform but there is no download for Manjaro Linux (Arch based) which I use. I found this guide from…
Klorax
  • 579
  • 2
  • 6
  • 10
25
votes
2 answers

How to Run Multiple Test Files with Haskell Stack Project

I want to setup an existing Haskell project with Stack. The existing project uses multiple files under a test directory; these separate test files by default, Stack (or cabal?) appears to utilize a single test/Spec.hs for testing. How can I continue…
1ijk
  • 1,417
  • 2
  • 19
  • 31
25
votes
1 answer

How to load tests in ghci with stack

I created a very simple project with stack. It contains: an executable, a library and test targets in the associated cabal file. When I load the code to ghci via stack ghci, I can't access test there, even if they are in separate module. Is there…
Konstantin Solomatov
  • 10,252
  • 8
  • 58
  • 88
25
votes
1 answer

How to link custom object file with Haskell library?

I've created a Haskell package that makes FFI calls to functions defined in CUDA code. I'd like to compile .cu file to an object (.o) file during package build and force linker to link it in. So far, I tried to use a technique found this question.…
25
votes
3 answers

Depending on a local package in cabal

I've written a few packages containing some extra functions for dealing with common types that reflect the way I like to use them (for instance, I prefer to treat Bson documents as maps, rather than lists of fields). I keep these packages in local…
mskel
  • 842
  • 9
  • 16
25
votes
1 answer

ExitFailure 9 when trying to install ghc-mod using Cabal

When I try to install it with cabal, I get ~$ cabal install ghc-mod Resolving dependencies... [1 of 1] Compiling Main ( /tmp/haskell-src-exts-1.13.5-21238/haskell-src-exts-1.13.5/Setup.hs,…
user316146
  • 1,307
  • 1
  • 12
  • 19
24
votes
1 answer

Cabal doesn't work on Mac OS X Lion because of gcc path

I just did a fresh installation of Mac OS X Lion, and installed Xcode 4.3 & Haskell platform 2011.4.0.0. When I tried installing packages by Cabal, I got the following error: cabal install cabal-install Resolving dependencies... Configuring…
Garriot Zhang
  • 386
  • 2
  • 6
24
votes
2 answers

Haskell cabal-install errors

I am having lots of problems with cabal-install: 1: Every time I do cabal update, it tells me to do cabal install cabal-install, so I do, and then when I do cabal update again, it says the same thing. 2: When I try to install ghc-mod from…
functorial
  • 687
  • 5
  • 13
24
votes
4 answers

Could cabal warn about unused package in dependencies?

For given cabal project how could unused dependencies packages be retrieved? Is there a way to get something like warning during cabal install process if there is a package mentioned in project dependency and there is no any usage of it, so it could…
24
votes
1 answer

Producing multiple executables from single project

With the following project structure: src/FirstExecutable.hs src/SecondExecutable.hs my-amazing-project.cabal and the following cabal setup: name: my-amazing-project version: 0.1.0.0 build-type: …
Nikita Volkov
  • 42,792
  • 11
  • 94
  • 169
23
votes
1 answer

How to avoid recompiling in this cabal file?

I've been working on this Haskell project, and I have a cabal file for it. Now, my project is structured as a library that implements a simple interpreter. I also have a very short Main file which needs to be build into an executable to call the…
chrisdb
  • 1,115
  • 6
  • 12
23
votes
1 answer

OSX, ghci, dylib, what is the correct way?

I need to build some C code and then reference that C code via the FFI. I would like to use my binding from inside ghci on osx. On of my constraints is that I cannot just hand the C sources to ghc in the .cabal file. This is due to a limitation…
Jason Dagit
  • 13,684
  • 8
  • 33
  • 56
23
votes
2 answers

Are there tools that would be suitable for maintaining a changelog for a Cabal Haskell package?

I'm working fast and furiously on a new Haskell package for compiler writers. I'm going through many minor version numbers daily, and the Haskell packaging system, Cabal, doesn't seem to offer any tools for updating version numbers or for…
Norman Ramsey
  • 198,648
  • 61
  • 360
  • 533
23
votes
1 answer

Specifying a custom remote-repo in a cabal sandbox

I would like to work on a project in a cabal sandbox. But instead of using the same remote-repo as my non-sandboxed code (i.e., Hackage), I'd like to point to a different remote repo. I tried creating a cabal.config file in the project directory…
Michael Snoyman
  • 31,100
  • 3
  • 48
  • 77