2014-02-28 30 views

回答

2

您家目錄中的.ocamlinit也適用於utop

[email protected]: ~ $ cat ~/.ocamlinit 
#load "graph.cmo";; 
let() = Printf.printf "LOADED!";; 

[email protected]: ~ $ 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 # 
+0

你在裏面寫了'#load「path/a.cmo」'嗎? –

+0

你打賭!對不起,我以爲你已經這樣做了,而且已經知道了。 – nlucaroni