Make program name and project version configurable
cProjectVersion in a few places and
ghc is hardcoded as the program name. This is used for example for determining the location of the user package database (
getAppUserDataDirectory "ghc") and the names of dynamic libraries.
I've been working around this for GHCJS, but it requires copying quite a bit of code. I have a patch that adds the program name and version to
Settings that I'll submit once I've tested GHCJS with HEAD.
My patch just allows these settings to be changed by GHC API clients. However, we could also make GHC itself read its own values from the
settings file. This way we could add a version tag to a GHC installation without recompiling, keeping its packages and package databases separate from existing ones.
Let me know if there's any interest in this and I'll add it to the patch.