logo       

RE: source subdirectory in package: msg#00036

lang.haskell.glasgow.bugs

Subject: RE: source subdirectory in package

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


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise