我正在使用需要camlp5的 OCaml 代码;但是,顶层(我使用的是utop)会自动加载更新的、不兼容的camlp4。这些是启动消息:
Findlib has been successfully loaded. Additional directives:
#require "package";; to load a package
#list;; to list the available packages
#camlp4o;; to load camlp4 (standard syntax)
#camlp4r;; to load camlp4 (revised syntax)
#predicates "p,q,...";; to set these predicates
Topfind.reset();; to force that packages will be reloaded
#thread;; to enable threads
即时通讯使用.ocamlinit
看起来像这样:
#use "topfind";;
#thread;;
我安装camlp5
了opam
它,它在我发出时出现ocamlfind list
;该文件camlp5.cma
也位于/home/<username>/.opam/4.02.1/lib/camlp5/camlp5.cma
. 但是尝试加载camlp5o
并camlp5r
失败Unknown directive camlp5o
。
我如何utop
知道camlp5
以及如何替换camlp4
为camlp5
默认预处理器?
提前谢谢了!