我很难在:https://www.cl.cam.ac.uk/~jrh13/atp/中运行关于逻辑和推理的代码。
例如,在最近的版本中,新版本似乎不承认Num库。我尝试过不同的在线编译器,但都失败了。然后,唯一的方法是安装编写代码的确切版本: 3.09.3
因此,问题是:我如何安装该版本?我能把我的欧帕姆降级吗?或者你会推荐另一种选择。我用Mac。
我尝试了opam switch create 3.09.3,并报告了以下问题:
The following actions failed
│ λ build ocaml-base-compiler 3.09.3
└─
┌─ The following changes have been performed (the rest was aborted)
│ ∗ install base-bigarray base
│ ∗ install base-threads base
│ ∗ install base-unix base发布于 2021-04-27 15:55:51
你安装的一切都是正确的,没有必要降低opam的等级。你并没有真正说明问题出在哪里。错误消息显示某些东西最终失败了,但是实际的错误消息在上面。还有一条包含错误日志路径的消息。我试着用3.09.3在矿用机器上安装opam switch create 3.09.3,没有任何问题,
$ opam switch create 3.09.3
<><> Gathering sources ><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ocaml-base-compiler.3.09.3] downloaded from cache at https://opam.ocaml.org/cache
<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
∗ installed base-bigarray.base
∗ installed base-threads.base
∗ installed base-unix.base
∗ installed ocaml-base-compiler.3.09.3
∗ installed ocaml-config.1
∗ installed ocaml.3.09.3
Done.这可能是因为你的系统存在一些问题,比如你的空间耗尽了。
尽管如此,您仍然可以尝试在现代版本的OCaml中运行这些示例。要在现代版本的nums中启用OCaml,您需要安装软件包(它不再沿OCaml编译器分发,但仍然可以在opam中使用),
opam install num然后,可以使用以下方法在toplevel ( ocaml解释器)中加载num
#use "topfind";;
#require "num-top";num-top库将加载nums库,甚至安装toplevel打印机,以使您与任意精确数字的交互更加方便。这两行应该取代init.ml文件中的init.ml行。
https://stackoverflow.com/questions/67285262
复制相似问题