+
+ <sect3 id="ghc-package-path">
+ <title>The <literal>GHC_PACKAGE_PATH</literal> environment variable</title>
+ <indexterm><primary>Environment variable</primary><secondary><literal>GHC_PACKAGE_PATH</literal></secondary>
+ </indexterm>
+ <indexterm><primary><literal>GHC_PACKAGE_PATH</literal></primary></indexterm>
+ <para>The <literal>GHC_PACKAGE_PATH</literal> environment variable may be
+ set to a <literal>:</literal>-separated (<literal>;</literal>-separated
+ on Windows) list of files containing package databases. This list of
+ package databases is used by GHC and ghc-pkg, with earlier databases in
+ the list overriding later ones. This order was chosen to match the
+ behaviour of the <literal>PATH</literal> environment variable; think of
+ it as a list of package databases that are searched left-to-right for
+ packages.</para>
+
+ <para>If <literal>GHC_PACKAGE_PATH</literal> ends in a separator, then
+ the default user and system package databases are appended, in that
+ order. e.g. to augment the usual set of packages with a database of
+ your own, you could say (on Unix):
+<screen>
+$ export GHC_PACKAGE_PATH=$HOME/.my-ghc-packages.conf:</screen>
+ (use <literal>;</literal> instead of <literal>:</literal> on
+ Windows).</para>
+
+ <para>To check whether your <literal>GHC_PACKAGE_PATH</literal> setting
+ is doing the right thing, <literal>ghc-pkg list</literal> will list all
+ the databases in use, in the reverse order they are searched.</para>
+ </sect3>