[Haskell-beginners] Question about ghc and cabal: finding packages

Henk-Jan van Tuyl hjgtuyl at chello.nl
Thu Aug 19 05:06:40 EDT 2010

On Thu, 19 Aug 2010 09:12:49 +0200, C Gosch <ch.gosch at googlemail.com>  

> Hi everyone,
> I have installed ghc 6.12.3 and the Haskell platform; now, when I install
> packages from hackage using
>    cabal install <package-name>,
> they get installed in ~/.cabal,
> which is fair enough.
> However, when I call a
>    runhaskell Setup.lhs configure
> that used to work on a different computer with the same software setup,
> ghc (or is it cabal?) complains that it cannot find the packages I have  
> just
> installed.
> Checking again revealed that they are indeed installed, just not in the  
> ghc
> installation directory,
> but under ~/.cabal.
> How can I tell cabal and/or ghc where to look for libraries?
> Thanks, again, for any help!
> Christian

The command "cabal install " installs a package locally by default,  
whereas "runhaskell Setup" installs globally. When installing globally,  
the local packages are ignored.

Henk-Jan van Tuyl


More information about the Beginners mailing list