Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我找不到任何关于我可以在 utop 中使用哪些顶级指令的文档。我所能找到的只是默认 ocaml 顶层支持的指令列表,但该列表对于 utop 似乎并不完整,并且缺少诸如 utop 之类#typeof的内容,我知道这些内容在 utop 中有效。
#typeof
我认为这是唯一的,没有记录在案。其他的以 开头#utop或由#utop_help. (utop_prompt_*指令应该是不言自明的)
#utop
#utop_help
utop_prompt_*
您可以列出所有已注册的指令:
Hashtbl.iter (fun k _v -> print_endline k) Toploop.directive_table
第三方库也可以添加、删除或替换宏。