ubuntu - Haskell - GHC 错误 : Could not find module ‘Prelude’/Perhaps you haven't installed the profiling libraries for package ‘base-4.12.0.0’ ?

标签 ubuntu haskell compiler-errors profiling ghc

我刚刚安装了haskell-platform来自 Ubuntu 存储库(它带有 GHC 版本 8.6.5 )as instructed by the website .
现在,在尝试编译一个用于分析的程序时,使用 ghc -O2 -prof myCode.hs ,我遇到以下错误消息:

myCode.hs:1:1: error: 
    Could not find module ‘Prelude’
    Perhaps you haven't installed the profiling libraries for package ‘base-4.12.0.0’?
System.IO 也是如此模块。
它们不应该带有默认的 Haskell 安装吗?我该如何进行?
也许我应该清除所有这些并让 Haskell 形成另一个来源( StackGhcup 等?这有关系吗?)
我对此很陌生,因此感谢您提供任何帮助。

最佳答案

在 Ubuntu 上,基本上所有的 Haskell 软件包都是平淡无奇的,-prof口味。您需要后者进行分析。
ghcup 也很好。没有必要全部清除—— ghcup 和包管理器可以干净地共存。

关于ubuntu - Haskell - GHC 错误 : Could not find module ‘Prelude’/Perhaps you haven't installed the profiling libraries for package ‘base-4.12.0.0’ ?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69829878/

相关文章:

php - Docker 容器上的 Couchbase PHP SDK 2.6

python - 无法使用 Python3 在 Ubuntu 上安装 selenium

haskell - hsc2hs 和 c2hs 之间的区别?

haskell - 在类型级别编码身份验证的存在/不存在

c++ - "multiple definition of value"在 g++ 而非 gcc 中编译具有未初始化全局的 C 程序时

android - Windows 10在我的应用程序上创建了问题

C++ 外部对象放置

python - 如何解决 python 包的无法在静态 TLS block 中分配内存错误

PHP 5.4 无法修改 header 信息 - header 已发送

haskell - Data.Map中键/值关系的静态保证