隐藏的软件包(升级到Fedora 33之后吗?)

时间:2020-11-04 18:14:12

标签: haskell fedora ghc

我刚刚升级到Fedora 33,至少是对于Data.Vector和System.Random,我得到的东西是:

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.)

有什么想法吗?

编辑:我升级了另一个系统,并且两个模块都很好。也许是当地的阴谋集团配置错误?

编辑2:ghc-pkg list将这两个程序包都显示为非隐藏(即,它们不在括号中)。什么是最重要的?

编辑3:删除.ghc / x86_64-linux-8.8.4 / environments / default可解决此问题。通过查看,并未列出所有系统软件包。我需要那个吗?它是如何产生的?

编辑4:问题似乎是cabal install --lib创建了一个不包含所有系统软件包的默认环境。我会提交一个错误...

1 个答案:

答案 0 :(得分:0)

我不知道根本原因,但是我警告不要在现代的Haskell安装中使用裸ghci。相反,我建议cabal v2-repl --build-depends vector确保加载兼容的vector软件包。