ocaml - 是否可以在 Ocaml REPL 中跟踪辅助功能

标签 ocaml trace ocaml-toplevel

我想做的是跟踪在定义中具有限制范围的函数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/

相关文章:

ocaml - 我可以将变体类型定义为 "some other variant plus a new constructor"而无需复制粘贴垃圾邮件吗?

loops - OCaml 中退出循环的惯用异常

OCaml - 何时使用仿函数

java - 是否有办法跟踪 MuleMessage 以了解执行了哪些流程?

windows - 存在哪些其他 OCaml 顶级程序? (远景)

ocaml - 如何静默加载顶层模块

io - OCaml 格式和结构框 : Why does my output not match the example?

asp.net - 失败的请求跟踪 : "a failed request trace for this content already exists" 的 IIS/ASP.net 错误

调用跟踪 Windows 驱动程序

ocaml命令行找不到 "topfind"