Linking executables and the library of a Cabal package
description
Duncan Coutts
duncan.coutts at worc.ox.ac.uk
Tue Oct 16 18:52:08 EDT 2007
On Mon, 2007-10-15 at 14:32 -0400, John D. Ramsdell wrote:
> I'm sure this will be an easy question for those on this list. What
> do you need to add to a Cabal package description so as to allow an
> executable in the description to be built from the library it also
> describes? I searched the Cabal documentation many times, but came up
> empty handed.
> Name: a
> Version: 1.0
> Build-Depends: base
> Exposed-Modules: A
>
> Executable: b
> Main-Is: Main.hs
> Other-Modules: A
> Hs-Source-Dirs: exec
I think the problem here is search paths. Try adding . to the
Hs-Source-Dirs, or alternatively moving everything into the root dir
rather than under exec.
This smells like a bug in cabal to me.
Duncan
More information about the Libraries
mailing list