method to_file (x : 'a) file_name = let channel = open_out file_name in Marshal.to_channel channel x flags; close_out channel