regression in ghc / cabal integration in 9.2.1

Albert Y. C. Lai trebla at vex.net
Sat Oct 30 20:08:01 UTC 2021


On 2021-10-30 3:43 p.m., Brandon Allbery wrote:
> Wasn't there specifically a new cabal version released to deal with
> 9.2.1? 3.4.1.0 / 3.6.2.0?

There is a double fault here.

Firstly yes, one should use a newer version of cabal-install that is 
known to support GHC 9.2.

So, 3.6.2.0 it is! But GHC 9.2.1 will also play a role...

$ cabal --version
cabal-install version 3.6.2.0
compiled using version 3.6.2.0 of the Cabal library

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 9.2.1

$ cabal install --lib vector
Resolving dependencies...
Build profile: -w ghc-9.2.1 -O1
In order, the following will be built (use -v for more details):
  - primitive-0.7.3.0 (lib) (requires download & build)
  - vector-0.12.3.1 (lib) (requires download & build)
[... success ...]

$ cat .ghc/x86_64-linux-9.2.1/environments/default
clear-package-db
global-package-db
package-db /home/trebla/.cabal/store/ghc-9.2.1/package.db
package-id ghc-9.2.1
package-id bytestring-0.11.1.0
package-id unix-2.7.2.2
package-id base-4.16.0.0
package-id time-1.11.1.1
package-id hpc-0.6.1.0
package-id filepath-1.4.2.1
package-id process-1.6.13.2
package-id array-0.5.4.0
package-id integer-gmp-1.1
package-id containers-0.6.5.1
package-id ghc-boot-9.2.1
package-id binary-0.8.9.0
package-id ghc-prim-0.8.0
package-id ghci-9.2.1
package-id rts
package-id terminfo-0.4.1.5
package-id transformers-0.5.6.2
package-id deepseq-1.4.6.0
package-id ghc-boot-th-9.2.1
package-id pretty-1.1.3.6
package-id template-haskell-2.18.0.0
package-id directory-1.3.6.2
package-id text-1.2.5.0
package-id 
vector-0.12.3.1-0ee0edddd7c1da5d41be6dd7eaa35c896ea170a10f2152c1d1b9be10fa606f06

$ ghci
GHCi, version 9.2.1: https://www.haskell.org/ghc/  :? for help
ghci>

(Foreshadowing: Wait a second! Where is the obligatory message "Loaded 
package environment etc etc"?)

ghci> import Data.Vector

<no location info>: error:
     Could not find module ‘Data.Vector’
     Perhaps you meant Data.Functor (from base-4.16.0.0)



More information about the Glasgow-haskell-users mailing list