Cabal, System.Filepath

Peter Gammie peteg42 at
Thu Dec 6 19:24:47 EST 2007

On 07/12/2007, at 5:40 AM, Duncan Coutts wrote:
> On Thu, 2007-12-06 at 21:44 +0700, Peter Gammie wrote:
>> Why is ghc-pkg looking only at globally-installed packages?
> It's not ghc-pkg, it's Cabal that by default only looks at the global
> packages. You can configure with --user to have it look at the user
> ones. Personally I'm in favour of switching the default to --user.
> Of course it cannot use user packages and then install globally, and  
> the
> current default prefix is /usr/local which is usually root only, so if
> we switch the default to user installs then we'd have to switch the
> default prefix. I'd prefer that too though. However it's a change that
> would require general consensus.

Ah, I see. I didn't realise configure had a --user switch as well.

A stop-gap might be to generate a more helpful error message:

ghc-pkg --global list
<check for deps>
if unsatisfied dep
   ghc-pkg list
   if dep is satisfied now, print "Perhaps configure with --user?"

IMH and not so informed opinion, I think the defaults should be close  
to autoconf's, if only by the principle of least surprise.



More information about the Libraries mailing list