
This is a new version of the installedPackageId patch for review. The only change since last time is that instead of making up a random string for the installedPackageId, we now call ghc --abi-hash M1 M2 ... to get a string representing a hash of the package ABI, where M1, M2 etc. are the exposed modules of the package. GHC's --abi-hash flag has not been pushed yet; I'm waiting to get the go-ahead on this patch and then I can push it all together. The upshot is that if you compile and install the same package twice, without changing anything, there's a reasonable chance you'll get the same InstalledPackageId the second time (I say reasonable chance, because GHC's ABI hashes are not completely stable). I can validate GHC with this patch (and related GHC changes), but I haven't tested much beyond that. Cheers, Simon