使用cabal安装haskell评测库时出现问题



我有一个cabal项目,我正试图在打开评测的情况下编译它。我按照这里的说明进行操作,但cabal build失败,并出现以下错误:

app/WordMap.hs:5:1: error:
Could not find module ‘Data.HashMap.Strict’
Perhaps you haven't installed the profiling libraries for package ‘unordered-containers-0.2.19.1’?
Use -v (or `:set -v` in ghci) to see a list of the files searched for.
|
5 | import qualified Data.HashMap.Strict as HashMap
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

我为此所做的唯一更改是将-prof-fprof-auto添加到.cab文件中的ghc-options中。没有这些选项,它编译得很好。

我使用的是GHC版本9.2.4和cabal版本3.6.2.0。

我试过运行cabal install unordered-containers --enable-profiling --lib --reinstall(以及它的各种衍生物(,但似乎不起作用。该命令完成得很好,但不会更改cabal build的输出。

我还尝试过从cabal商店中对包进行rm'ing,然后通过评测再次安装包。仍然不起作用。

找到了前进的道路。我需要从.cab ghc选项中删除-prof-fprof-auto,然后只运行cabal v2-run <project> --enable-profiling -- +RTS -p

阴谋集团文档中的更多信息。

最新更新