source subdirectory in package
Simon Marlow
simonmar at microsoft.com
Mon Jun 13 08:43:05 EDT 2005
On 13 June 2005 12:19, Serge D. Mechveliani wrote:
> Dear GHC developers,
>
> I am testing Cabal in ghc-6.4.
> Consider a project of the modules U1.hs, subdir/V1.hs
> put to the source root of $(HOME)/user1/
> Provide some simplest source for U1, V1,
> and the package description
>
> -- u1.cabal ---------------------
> name: u1
> version: 0.0
> build-depends: data
> exposed-modules: U1 V1
> ghc-options: -isubdir
> ---------------------------------
>
> Then,
> runhaskell Setup.hs configure --ghc --prefix=$HOME/t/user1/inst
> and
> runhaskell Setup.hs build
> yield
>
> Preprocessing library u1-0.0...
> can't find source for V1 in ["."]
The Cabal in GHC 6.4 supports source files in a single directory only
(although you can use hierarchical module names). To put your source
files in a subdirectory, add the field
hs-source-dir: subdir
to your .cabal file.
The current version of Cabal allows multiple source directories, so you
can say
hs-source-dirs: "." subdir
Cheers,
Simon
More information about the Glasgow-haskell-bugs
mailing list