trivelt's comment
有最好的答案-使用utop!-但如果你或其他人想使用
ocaml
您可以直接设置
Sys.interactive
到
false
使大多数状态消息静音。例如:
噪音:
$ ocaml
OCaml version 4.06.0
# #use "topfind";;
- : unit = ()
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
- : unit = ()
更安静:
$ ocaml
OCaml version 4.06.0
# Sys.interactive := false;;
- : unit = ()
# #use "topfind";;
- : unit = ()
- : unit = ()
你可以把
Sys.interactive := false;;
在您的
.ocamlinit
文件和
Sys.interactive := true;;
最后,如果你想让这项工作自动进行。