linux - Haskell make recipe 使用 GHC 的悖论定理证明器失败

标签 linux haskell makefile ghc theorem-proving

我正在尝试安装源自 here 的悖论定理证明器.

当我运行 makefile 时,这是运行的命令: ghc -optl -static -lstdc++ -I../instantiate -I../minisat/current-base ../minisat/current-base/Solver.or ../minisat/current-base/Prop.or ../instantiate/MiniSatWrapper.or ../instantiate/MiniSatInstantiateClause.or -fglasgow-exts -O2 -static -threaded -main-is Paradox.Main.main --make Paradox.Main -o 悖论

它会导致如下几个错误:

Flags.hs:52:8:
    Could not find module ‘Char’
    Use -v to see a list of the files searched for.

用于各种模块,包括但不限于CharCPUTimeIO

最后的错误信息是

Makefile:38: recipe for target 'paradox.exe' failed
make: *** [paradox.exe] Error 1

我不了解 Haskell,我对 GNU make 也不是很有经验,但我正在尝试为一个项目安装这个包,但它非常晦涩,无法为我的操作系统打包(我正在运行 Arch Linux)。据我所知,它没有为任何操作系统打包,因此有必要从源代码安装。

据我所知,问题始于以下错误消息:

在命令行上:警告: -fglasgow-exts 已弃用:改为使用单独的扩展

我使用的是 Arch Linux 软件包存储库中提供的 GHC 版本:package link

最佳答案

看起来悖论是为一个相当旧的 GHC 版本编写的。您可以使用 GHC 7.8 或更早版本并设置来修复所有这些“找不到模块”错误

GHC     = ghc -hide-package base -package haskell98

在 Makefile 中,尽管之后您可能会遇到更多错误。

关于-fglasgow-exts的警告大多是无害的,你可以忽略它。

关于linux - Haskell make recipe 使用 GHC 的悖论定理证明器失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30874199/

相关文章:

c - 按照基本示例构建 .c 文件来创建驱动程序将不起作用

linux - 在Linux中,我想搜索目录中存在的文件和目录的数量

linux - 从一个文件复制内容并需要使用 sed 替换到另一个文件中

linux - Yesod haskell-stack 安装-fPIC

haskell - Haskell 中的舍入 NaN

sqlite - 一个棘手的 GNU make 问题

c++ - 使用 env_time.cc :19:10: fatal error: 'windows.h' file not found 构建 Tensorflow iOS

linux - 在匹配前删除换行符 - Linux

linux - Shell 脚本,回显消息后在同一行读取

list - Haskell:一个列表与另一个列表的子序列的叉积