Hi !
I found in RealWorldOcaml that one can load some .top file for pretty printing utilities:
The
core.toppackage (which you should have loaded by default in your.ocamlinitfile) loads in printers for the Core extensions already, so you don’t need to do anything special to use the s-expression printer.
ocamlfind list | grep top find effectively a core.top package. I tried modifying my .ocamlinit file to load core.top, but I did not succeed. (and I did not find something on it online, even if it must be documented in utop docs…) How do we do this ?
Here is my .ocamlinit file:
(* Added by OPAM. *)
let () =
try Topdirs.dir_directory (Sys.getenv "OCAML_TOPLEVEL_PATH")
with Not_found -> ()
;;
(* ## added by OPAM ... ## you can edit, but keep this line *)
#use "topfind";;
(* ## end of OPAM user-setup addition for ocamltop / base ## keep this line *)
#require "core";;
Thanks !
[EDIT] : my bad, it was so simple: # require "core.top". Solution found there.