multiple cabal files in one directory?

Duncan Coutts duncan.coutts at
Thu Jan 13 18:51:18 CET 2011

On 12 January 2011 17:54, Kathleen Fisher <kathleen.fisher at> wrote:
> I can explain why the question occurred to me, but I'm a newbie to Haskell library construction, so I could have just set things up badly.
> I have two libraries that both implement embedded domain specific languages in haskell, pads and forest, with forest depending on pads.  Because they are both languages, I put the Pads modules in Language.Pads.XXX and the Forest modules in Language.Forest.XXX.  I have a single development space with a directory Language with subdirectories Pads and Forest.  Now I want to to be able to install these libraries with cabal.  The place where it seems like I am supposed to put the cabal file is the directory containing the Language directory, but that means I need one cabal file for Pads and another for Forest.  Rearranging my directory structure to separate the two packages is a pain because the files are under version control in CVS.
> I'm guessing I'm missing the right model for how to arrange Haskell source code bases.  Suggestions for how I should do things differently?

I think the simplest model would be as follows:



So the top level of the source repository contains two subdirs, one
for each package. If you want them to be separate packages then this
is the simplest. I appreciate that CVS does not make it easy to move
files and directories around.

I agree that if you typically develop these two packages together but
want to be able to distribute them separately then it would be nicer
to be able to have multiple .cabal files in one directory.


More information about the Libraries mailing list