Implement ${pkgroot} spec, allows relocatable registered packages
authorDuncan Coutts <duncan@well-typed.com>
Mon, 23 May 2011 21:10:45 +0000 (22:10 +0100)
committerDuncan Coutts <duncan@well-typed.com>
Wed, 25 May 2011 11:16:56 +0000 (12:16 +0100)
commit40b6bd47cf00f025426746bbd7abdd0eda2a3afd
treeb64b4cafc66af1b3631882db3de3c1d1242c4fa8
parent78185538b0d9513b1b287a98cbf96cd120c7ef8f
Implement ${pkgroot} spec, allows relocatable registered packages

Historically ghc implemented relocatable packages by allowing
"$topdir" in the package registration info and having ghc expand
this with its notion of $topdir. The topdir refers to where ghc
itself is installed (specifically the libdir).

The ${pkgroot} spec takes this idea and makes it portable.
(http://www.haskell.org/pipermail/libraries/2009-May/011772.html)
Instead of paths relative to where ghc is installed, they can be
relative to the package database itself. Thus it is no longer a
ghc-specific idea and can work for package collections other than
the global package db.
compiler/main/Packages.lhs
utils/ghc-pkg/Main.hs