part of compil to ocaml