multiple cabal files in one directory?

Christian Maeder Christian.Maeder at
Thu Jan 13 11:50:29 CET 2011

Am 12.01.2011 20:53, schrieb Henning Thielemann:
> Kathleen Fisher schrieb:
>> 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.  
> So your problem is maybe more a problem of CVS rearrangement than a
> Haskell packaging problem? If you have direct access to the CVS
> repository you might rearrange the '*,v' files in the CVS repository as
> you need. This rearrangement will not be logged by CVS, of course, but
> that is a known deficiency of 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 don't know enough about your languages, but putting Pads and Forest
> into two packages sounds reasonable. I would move them into separate
> directories if possible.

I would add two files pads.mycabal and forest.mycabal and use a wrapper
script that temporarily copies one file (i.e. argument $1) $1.mycabal to
$1.cabal for cabal calls.


More information about the Libraries mailing list