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