Relax the types of write_ml and write_c.