1
votes

I just upgraded to Fedora 33, and at least for Data.Vector and System.Random, I am getting stuff like:

Prelude> import Data.Vector

<no location info>: error:
    Could not load module ‘Data.Vector’
    It is a member of the hidden package ‘vector-0.12.1.2’.
    You can run ‘:set -package vector’ to expose it.
    (Note: this unloads all the modules in the current scope.)

Any ideas?

EDIT: I upgraded another system, and both modules are fine. Maybe some local cabal misconfiguration?

EDIT 2: ghc-pkg list shows both packages as non-hidden (ie they are not in parenthesis). What is overriding this?

EDIT 3: Removing .ghc/x86_64-linux-8.8.4/environments/default solves the issue. By looking at it, not all system packages are listed. Do I need that? How was it generated?

EDIT 4: The problem seems to be that cabal install --lib creates a default environment which does not include all the system packages. I'll file a bug...

1
You should run it with ghci -package vector, or use :set -package vector to do that in the session you already started.Willem Van Onsem
Well, sure :P But it was not like that before.Sergio Losilla

1 Answers

0
votes

I don't know the root cause but I would warn against using bare ghci on a modern Haskell install. Instead I would suggest cabal v2-repl --build-depends vector to ensure a compatible vector package is loaded.