Can OCaml check tail recursion

Is there a way to get ocaml to tell me if a function implements recursion using tail recursion? I do not want to read the code. I mean, get ocaml to tell me, say this:

let x = tail_recursion f;;
+4
source share
1 answer

You can compile the source code with "-annot". It will create an annotation file that some editors can use.

In caml (emacs) mode, the ist command:

 M-x caml-types-show-call
+4
source

Source: https://habr.com/ru/post/1525723/


All Articles