irrelevant package

Simon Marlow simonmar at microsoft.com
Mon Jun 13 11:06:39 EDT 2005


On 13 June 2005 14:34, Serge D. Mechveliani wrote:

> I am testing  packages  in  ghc-6.4.
> I set
>       docon.cabal,
> 
> which declares dependence on `data':     build-depends: data
> The attempt to build  docon  by
> 
>   cd $doconSource
>   runhaskell Setup.hs configure --ghc --prefix=$doconSource/inst
>   runhaskell Setup.hs build
> 
> produces
> 
>   configuring ...
>   compiling ...
>   ...
>   DPrelude.hs:1:0:
>     Module `DPrelude' is a member of package dumatel-1.2.6.4.
>     To compile this module, please use -ignore-package
> dumatel-1.2.6.4. 
> 
> These does exist a package  dumatel-1.2.6.4,  and both the above
> packages have  DPrelude  among the module names.
> But why does Cabal look into irrelevant package? The dependence is
> set: only `data'.

This is "fixed" in newer versions of Cabal.

However, you are heading for problems here.  When you install a package
P that includes a module M, you prevent the user from having any modules
called M unless they say '-hide-package P' (see previous discussions on
this subject).

For this reason, we strongly recommend using hierarchical module names.

At the moment, Cabal "exposes" all the packages it imports.  Perhaps we
should have an option to install an unexposed package, to allow
installation of packages that contain non-hierarchical module names.
Isaac - what do you think?

Cheers,
	Simon


More information about the Libraries mailing list