Meaning of ghc-pkg package-conf flags

Aaron Culich aculich at gmail.com
Fri Apr 15 04:16:48 CEST 2011


By default, even with --global it will still scan package.conf.d of the user
unless you also specify --no-user-package-conf like this:

ghc-pkg list --global --no-user-package-conf
--package-conf $HOME/sandbox/package.conf.d

You can also set the GHC_PACKAGE_PATH variable like this:

export GHC_PACKAGE_PATH=$HOME/sandbox/package.conf.d:
ghc-pkg list --no-user-package-conf

On Thu, Apr 14, 2011 at 3:09 PM, C Rodrigues <red5_2 at hotmail.com> wrote:

>  Hello,
>
>
> I'd like to know how ghc-pkg searches package databases and how the
> command-line flags affect the search.
>
>
> My model of ghc-pkg was that it builds a list of package databases and then
> searches them starting from the head.  I'd like to work with a sandboxed
> local package database.  Looking at what ghc-pkg list prints, I can infer
> what database list it's using:
>
>
> ghc-pkg list: [user-db, global-db]
>
>
> ghc-pkg list --global: [global-db]
>
>
> ghc-pkg list --global --package-conf=$HOME/sandbox/package.conf.d:
> [sandbox-db, global-db]
>
>
> However, even though ghc-pkg doesn't show my user database, it still
> reports broken packages that are in my user database.  So ghc-pkg isn't
> really scanning packages according to this database list.  What is it doing?
>
>
> _______________________________________________
> Glasgow-haskell-users mailing list
> Glasgow-haskell-users at haskell.org
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/glasgow-haskell-users/attachments/20110414/f8ad2250/attachment.htm>


More information about the Glasgow-haskell-users mailing list