0

在我的项目中,我使用的是按此处所述安装的 OCanren 包:https ://github.com/JetBrains-Research/OCanren#Installation 。

我有一个test.ml使用 OCanren 的文件:

open OCanren

let _ = inj

dune同一目录中的一个文件:

(executable
  (name      test)
  (libraries ocanren mtime mtime.clock.os mtime.clock mtime.top)
  (flags     (:standard -rectypes)))

这是我尝试构建可执行文件时遇到的问题:

$ dune build test.exe
File "_none_", line 1:
Error: No implementations provided for the following modules:
         Mtime_clock referenced from ~/.opam/4.07.1+fp+flambda/lib/ocanren/OCanren.cmxa(Timer)
         Mtime referenced from ~/.opam/4.07.1+fp+flambda/lib/ocanren/OCanren.cmxa(Timer),
           ~/.opam/4.07.1+fp+flambda/lib/ocanren/OCanren.cmxa(Core)
Done: 19/20 (jobs: 1)(base) 

如何提供 Mtime_clock 和 Mtime 的实现?

4

1 回答 1

0

解决方案是在dune文件中将 Mtime 包放在 OCanren 之前:

(executable
  (name      test)
  (libraries mtime mtime.clock.os ocanren)
  (flags     (:standard -rectypes)))
于 2020-08-26T17:53:52.677 回答