re-implementing ghci.
Fixing a bug of ".conf".
Using getPackageDBContents to get over the limitation of getInstalledPackages.

getInstalledPackages always requires GlobalPackageDB, sigh.