Когда я вручную ввожу #use "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 = ()
Однако, когда я помещаю #use "topfind";;
в файл ~/.ocamlinit
, это не работает:
>cat ~/.ocamlinit
#use "topfind";;
#require "str";;
(* #use "money.ml" ;; *)
>ocaml
Objective Caml version 3.12.0
# #list ;;
Unknown directive `list'.
Странный вопрос, не так ли?