If I have GHC installed in /opt/ghc and all the Haskell libraries in /opt/haskell (–global), how would I go about GHC upgrades?
All I need to do to upgrade GHC is remove its directory and untar a new one.
How do I make this new GHC installation aware about all the packages in /opt/haskell?
Do I have to recompile all the packages with the new GHC? Is there a bulk register command or something?
Thanks.
This is a bad idea. Packages compiled with one GHC aren’t compatible with packages compiled with another; the ABI isn’t stable, and upgrading to a new major version of GHC practically guarantees that previously-compiled libraries won’t work. You’ll have to recompile your packages when you upgrade GHC, I’m afraid.
See this GHC FAQ entry: Do I have to recompile all my code if I upgrade GHC?