我想做的是跟踪在定义中具有限制范围的函数aux
:
let example = function
arg ->
let rec aux =
(* some recursive function body*)
in
aux arg
;;
使用#trace
或类似的顶级命令,以便在调用example
时出现跟踪。
(不只是将辅助函数复制粘贴到其他名称并将其传递到顶层)
注意:我在 emacs 上使用 tuareg 模式
最佳答案
没有。在顶层,您只能跟踪顶层函数。
关于ocaml - 是否可以在 Ocaml REPL 中跟踪辅助功能,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62886750/