reimplement set2ml without camlp4