启用分析的 Haskell 重新安装基础

标签 haskell profiling ghc cabal haskell-platform

我正在尝试按照列出的说明重新安装启用了分析的 Haskell 库 here

但是,每当 cabal 尝试重新安装其中一个库时,我都会收到以下消息:

LibraryNameHere.hs:1:1:
    Could not find module `Prelude'
    Perhaps you haven't installed the profiling libraries for package `base'?
    Use -v to see a list of the files searched for.

当我尝试重新安装 base启用分析后,我收到以下消息:
me@machine:~/.cabal/$ cabal install -p base
Resolving dependencies...
All the requested packages are already installed:
base-4.5.0.0
Use --reinstall if you want to reinstall anyway.
me@machine:~/.cabal/$ cabal install --reinstall -p base
Resolving dependencies...
cabal: Could not resolve dependencies:
next goal: base (user goal)
rejecting: base-4.7.0.0, 4.6.0.1, 4.6.0.0, 4.5.1.0, 4.5.0.0, 4.4.1.0, 4.4.0.0,
4.3.1.0, 4.3.0.0, 4.2.0.2, 4.2.0.1, 4.2.0.0, 4.1.0.0, 4.0.0.0 (only already
installed instances can be used)
rejecting: base-3.0.3.2 (conflict: base => base>=4.0 && <4.3)
rejecting: base-3.0.3.1 (conflict: base => base>=4.0 && <4.2)

如何在启用分析的情况下重新安装 base?

最佳答案

如果 base默认情况下,分析库不包含在您的 Haskell/GHC 安装中,它们将通过操作系统的包管理器包含在单独的包中。

Debian Linux 系统:
sudo apt-get install ghc-prof

关于启用分析的 Haskell 重新安装基础,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23450592/

相关文章:

haskell - SDL_image 无法安装

'try' 未捕获的异常

file - 在 haskell 中移动目录的最有效方法

haskell - 'MutVar#'是什么意思?

haskell - 单子(monad)内部的多态性

haskell - 如何编译BNF转换器?

haskell - 如何注释掉文学haskell中的行

profiling - Fortran 和 MPI 的优秀分析器

android - 跟踪 Android/iOS 下移动应用程序的数据库工作负载

java - 远程分析 Java 应用程序