Can I get `cabal install` to use multiple cores?

I’m the one who was working on this Summer of Code project. The patches have been sent to Duncan, but he hasn’t reviewed them yet. Note that my code works at the package granularity, so you won’t get any speedup when building a single package. I’m currently working on a parallel wrapper around ghc –make, … Read more

How to use a DLL in a Haskell project?

You’ll need to use extra-lib-dirs and extra-libraries in the executable section of your .cabal file like so: name: MyApp version: 0.1.0.0 synopsis: homepage: author: simon.bourne category: build-type: Simple cabal-version: >=1.10 library exposed-modules: HelloWorld build-depends: base >= 4.7 && < 5 hs-source-dirs: src default-language: Haskell2010 executable MyApp main-is: Main.hs extra-lib-dirs: lib extra-libraries: helloWorld build-depends: base >= … Read more

Cabal not installing dependencies when needing profiling libraries?

I’ve enabled library-profiling: True in my ~/.cabal/config file. From then on, any new installations will automatically enable profiling. Unfortunately that still means I had to manually reinstall for the old packages already installed. Although, after a while of doing this manually, I now have most packages reinstalled with profiling enabled…

Independent subset of cabal packages set

Cabal is moving to a more NPM-like model, which will make dependency resolution much simpler. Each installed package will keep a local copy of its dependencies, trading a little disk space for the headache of installing multiple global packages with mutually exclusive package versioning demands. Under this model, the subset of packages required to install … Read more

How to make a Haskell cabal project with library+executables that still run with runhaskell/ghci?

Let’s assume you have a mylib library, and mylib-commandline and mylib-server executables. You use hs-source-dirs for the library and each executable so that each has their own project root, avoiding double compilation: mylib/ # Project root mylib.cabal src/ # Root for the library tests/ mylib-commandline/ # Root for the command line utility + helper modules … Read more