[Haskell-cafe] Cabal, lib and exe in one

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Wed May 2 12:22:24 EDT 2007


On Wed, 2007-05-02 at 13:58 +0100, Magnus Therning wrote:

> So, you are saying that I should split my library and its test app(s)
> into separate packages? That would also mean that I have to install the
> library before compiling and running the tests, right?

No, I don't think that's very practical at the moment. At the moment I'd
just keep it in one .cabal file and just add all the src dirs and .c
files etc that you need into each program section. It's not very pretty
but it's not completely unwieldy.

What we should probably do is make it easier to deal with a collection
of packages including registering packages in-place and then it'd become
quite practical to have multiple .cabal files, one for each lib and
binary in your system. And you'd be able to express the proper
dependencies between them.

This is the kind of thing that people have been thinking about for a
while, but there are some tricky issues and it's also quite a lot of
work.

> Hmmm, if that's the case then I have to say that cabal won't suit me
> very well.  Are there any options to cabal?

Nothing easy.

Duncan



More information about the Haskell-Cafe mailing list