Reputation: 7688
I updated my .ocamlinit
to use the following settings according to Real World OCaml's installation instructions:
#use "topfind";;
#thread;;
#camlp4o;;
#require "core.top";;
#require "core.syntax";;
Running utop
works fine, and just produces some extra output at the beginning, but ocaml
produces a ton of startup messages:
/usr/lib/ocaml/threads: added to search path
/usr/lib/ocaml/unix.cma: loaded
/usr/lib/ocaml/threads/threads.cma: loaded
/usr/lib/ocaml/dynlink.cma: loaded
/usr/lib/ocaml/camlp4: added to search path
/usr/lib/ocaml/camlp4/camlp4o.cma: loaded
/usr/lib/ocaml/bigarray.cma: loaded
... (And so on, for ~50 lines or so!)
/home/jmu303/.opam/system/lib/herelib/pa_herelib.cma: loaded
#
Any way I can suppress these startup messages?
Upvotes: 1
Views: 116
Reputation: 1671
One way is to tell the toplevel that you're not in an interactive environment:
# Sys.interactive := false;
# #use "topfind";;
# Sys.interactive := true;
You can see the Batteries toplevel initialization code for an example of this approach: https://github.com/ocaml-batteries-team/batteries-included/blob/master/ocamlinit
Upvotes: 1