~/.ghc directory is not read with 9.2.1
The release notes say:
GHC now follows by default the XDG Base Directory Specification. If $HOME/.ghc is found it will fallback to the old paths to give you time to migrate. This fallback will be removed in three releases.
For example (using cabal-env
or cabal install --lib
):
% cat $HOME/.ghc/x86_64-linux-9.2.1/environments/default | head
-- This is GHC environment file written by cabal-env
--
clear-package-db
global-package-db
package-db /cabal/store/ghc-9.2.1/package.db
package-id aeson-2.0.2.0-f201c4fbcf91b39f203b012923d1ebbfceb70b01ff28767bd78c384f82e3c446
package-id base-4.16.0.0
-- cabal-env packages: aeson
-- cabal-env plan:
-- cabal-env /Td6WFoAAATm1rRGAgAhARYAAAB0L+Wj4HllGBJdAD2IiGZT0UYdkKRpnoLIXvjSQtxNmBJ3ut3hijGg
% ghci-9.2.1
GHCi, version 9.2.1: https://www.haskell.org/ghc/ :? for help
Loaded GHCi configuration from /home/phadej/.ghci
Prelude> :m +Data.Aeson
<no location info>: error:
Could not find module ‘Data.Aeson’
Perhaps you meant Data.Version (from base-4.16.0.0)
package environment is not read.
This is due to !4567 (closed).