Add type printing to print.ml