首页 > 解决方案 > 如何在 BuckleScript 中编译带有接口的文件?

问题描述

没有bsb,如何编译一个不合格的.ml文件?

$ touch test.ml
$ touch test.mli
$ bsc test.ml
File "test.ml", line 1:
Error: Could not find the .cmi file for interface test.mli.

我什至还没有尝试用ocamlfind图书馆做到这一点,很确定当我走到那一步时我会想自杀。

Dune不支持 BuckleScriptbsb据我所知,不支持任何 OCaml 测试工具(ppx_inline_test、ppx_expect)或 ppx_deriving 插件……我在这里束手无策。帮助我弄清楚如何实际使用BuckleScript。

标签: compiler-errorsocamlreasonbucklescriptbsb

解决方案


我没有尝试,但下面应该可以工作。 bsc -c test.mli test.ml


推荐阅读