How to show the types of each declaraion of a ocaml program?
问题 I like to use ocaml in a terminal to get interactive result or type from each ocaml command, for instance: Objective Caml version 3.11.2 # let a = 5;; val a : int = 5 But when there are many commands, it is normal that we put all in a file like test.ml , then compile it. At the moment, I use ocamlc -o test test.ml . But when I do test in a terminal, I could not see the types of each declaration, which is a pity. Does anyone know how to show that? Thank you very much. 回答1: In the toplevel you