Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] marshalling and code changes
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2002-07-29 (12:49)
From: Oleg <oleg_inconnu@m...>
Subject: [Caml-list] marshalling and code changes

Suppose I use Marshall module (and input_value / output_value pervasives) to 
serialize a sophisticated data type. If I make [small] changes to this data 
type, what is the best way to convert old saved data?

What if the new type is a supertype to the old one, can I load it safely?

I tried it with 

type old_type = Float of float | Int of int ;;
type new_type = Float of float | Int of int | S of string;;

and it seemed to have worked with input_value and output_value.

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: