4

I can't find any documentation on what toplevel directives I can use in utop. All I could find is this list of directives supported by the default ocaml toplevel, but that list doesn't seem to be complete for utop and is missing things like #typeof, which I know works in utop.

hugomg
  • 68,213
  • 24
  • 160
  • 246

1 Answers1

5

I think it's the only one, that isn't documented. The other ones start with #utop or are documented by #utop_help. (The utop_prompt_* directives should be self-explaining)

You can list all registered directives with:

Hashtbl.iter (fun k _v -> print_endline k) Toploop.directive_table 

Third party libraries can also add, remove, or replace macros.

rafix
  • 1,739
  • 9
  • 9