Ocaml 如何在utop中自动加载cmo
我已经建立了自己的Ocaml 如何在utop中自动加载cmo,ocaml,Ocaml,我已经建立了自己的graph.cmo 我想utop在每次启动时自动加载它 我该怎么做呢?主目录中的.ocamlinit也可以与utop一起使用 nlucaroni@pissarro: ~ $ cat ~/.ocamlinit #load "graph.cmo";; let () = Printf.printf "LOADED!";; nlucaroni@pissarro: ~ $ utop Welcome to utop version 1.11 (using OCaml version 4
graph.cmo
我想utop
在每次启动时自动加载它
我该怎么做呢?主目录中的
.ocamlinit
也可以与utop
一起使用
nlucaroni@pissarro: ~ $ cat ~/.ocamlinit
#load "graph.cmo";;
let () = Printf.printf "LOADED!";;
nlucaroni@pissarro: ~ $ utop
Welcome to utop version 1.11 (using OCaml version 4.01.0)!
Camlp4 Parsing version 4.01.0
LOADED!
Type #utop_help for help about using utop.
utop #
你在里面写
#加载“path/a.cmo”
吗?当然!对不起,我以为你已经这么做了,我早就知道了。