當我手動頂層輸入#use "topfind" ;;
,它的工作原理如下:關於「topfind」?
#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 #use "topfind" ;;
- : unit =()
然而,當我在~/.ocamlinit
文件放在#use "topfind";;
,這是行不通的:
>cat ~/.ocamlinit
#use "topfind";;
#require "str";;
(* #use "money.ml" ;; *)
>ocaml
Objective Caml version 3.12.0
# #list ;;
Unknown directive `list'.
這似乎是一個奇怪的問題,不是嗎?