cabal

How can I make Cabal search for external programs?

I'm trying to write a Haskell program which requires the output of external programs (such as lame, the mp3 encoder). While declaring dependency on a library is easy in cabal, how can one declare dependency on an executable? ...

What is the relationship between ghc-pkg and cabal?

With respect to how packages are created, installed and used in Haskell, what is the relationship between ghc-pkg and cabal? What are their roles - when would you use one, over the other, or use both? Are they complementary tools, competitive tools, or simply tools that do different jobs? ...

hackage package dependencies and future-proof libraries

In the dependencies section of a cabal file: Build-Depends: base >= 3 && < 5, transformers >= 0.2.0 Should I be doing something like Build-Depends: base >= 3 && < 5, transformers >= 0.2.0 && < 0.3.0 (putting upper limits on versions of packages I depend on) or not? I'll use a real example: my "List" package on Hackage (List monad...

How do I get the Haskell Platform's ghc-pkg to work on MAC OSX

I have installed the latest Haskell Platform for MAC OSX and I get the error "Setup: failed to parse output of 'ghc-pkg dump'" when I do anything with Cabal. So I looked at my versions: ralphtq$ ghc-pkg list Cabal /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d Cabal-1.8.0.2 ralphtq-mac-mini:cabal-...

Which versions of packages can my Haskell package depend upon?

I'm nearly ready to upload my first package to Hackage! I have this in my hstest.cabal: Executable hstest Main-Is: hstest.hs Build-Depends: base, mtl, directory, ghc, ghc-paths, random, QuickCheck I understand that it's bad form to simply list which packages my package depends upon; instead I should state whic...

Does any method exist quickly to detect valid range versions of used library

I'm a beginner Haskell programmer. I have written some useful code for the last six month. And I want to release a library from it. The code will use system installation cabal as any Haskell library. A library is released with cabal has a meta data file where there is a logical predicate from the libraries and their versions. A develope...

How can my-program.hs get its version number from my-program.cabal at build time?

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 Haskell source code as well as in the .cabal file, I will eventually get them out of sync. So, how can my program, while being compiled under...

How do I get ghci to see packages I installed from cabal?

I've installed the such-and-such a package using cabal, and I can build a program that depends on it using cabal build. But when I load the same program in ghci, ghci complains that it "Could not find module `such-and-such'". I'm surprised this doesn't "just work." How do I tell ghci where to find the packages I've installed with cabal?...

mysterious cabal-install problems

With a clean install of the "Haskell Platform". (OS X Snow-Leopard & Platform 2010.1.0.1), doing this causes simple sequence causes very weird cabal install behaviour: $ cabal install time $ cabal install random $ ghc-pkg list random /Library/Frameworks/GHC.framework/Versions/612/usr/lib/ghc-6.12.1/package.conf.d random-1.0.0.2 /Us...

how can I build cabal-install on eeePc 701 / Ubuntu Netbook Remix 1.6 (Lucid)

Not a programming question, but the first time I see something like this. UNR 1.6 (based on Ubuntu 10.04) installs the 6.12.1 version of GHC. So, in order to build cabal-install-0.8.2, I have to install the libghc6- packages of parsec, mtl, network and zlib. Then, after launching 'sh ./bootstrap.sh', I get: Checking installed packages ...

{} in .cabal for Haddock-documentation in Haskell

If I got the line > { -# OPTIONS_GHC -fglasgow-exts -XTemplateHaskell #- } in the documentation-part (description) of the .cabal-file I'll get the error message haddock: parsing haddock prologue failed when running $ cabal haddock but if I get rid of the { and } everything works fine. Is there some way to escape {} so they can b...

wxHaskell fails because it depends on wx_macu-2.8

I install wxWidgets with macports then ran the command: sudo cabal install wx which output included: /bin/sh: wxdirect: command not found /bin/sh: wxdirect: command not found /bin/sh: wxdirect: command not found /bin/sh: wxdirect: command not found Configuring wxcore-0.12.1.6... setup: Missing dependency on a foreign library: * Missing ...

-package Cabal-1.8.0.6 breaks pango installation on Mac

When installing Haskell pango on mac (sudo cabal install pango), the first problem is that it tries to install packages I've already installed. I've install haskell98 (successfully), but pango tries to install it again, and when the compilation is complete it gives this error: Registering haskell98-1.0.1.1... Installing library in /User...

Conventions for Stability field of Cabal packages

Cabal allows for a freeform Stability field: stability: freeform The stability level of the package, e.g. alpha, experimental, provisional, stable. What are the community conventions about these stability values? What is considered experimental and what is provisional? I see only few packages are declared as stable. Wh...

Is DeriveFunctor a well-recognized extension? Cabal seems confused.

Cabal is giving me mixed messages. When I say: Extensions: DeriveFunctor It says: Warning: Unknown extensions: DeriveFunctor But when I say: GHC-Options: -XDeriveFunctor It says: Warning: Instead of 'ghc-options: -XDeriveFunctor' use 'extensions: DeriveFunctor' For now I'm just going to use the {#- LANGUAGE DeriveFunctor -#} ...