<?xml version="1.0" encoding="ISO-8859-1"?>

<!DOCTYPE message PUBLIC
  "-//MLarc//DTD MLarc output files//EN"
  "../../mlarc.dtd"[
  <!ATTLIST message
    listname CDATA #REQUIRED
    title CDATA #REQUIRED
  >
]>

  <?xml-stylesheet href="../../mlarc.xsl" type="text/xsl"?>


<message 
  url="2002/07/ff7adba2f7751b11a6ba288c8fc0167a"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-29T12:49:17"
  subject="[Caml-list] marshalling and code changes"
  prev="2002/07/e279fbfc81d25f8b7b40690d1165d72d"
  next="2002/07/08b5453c237ff76a342f53e57f63faec"
  next-in-thread="2002/07/953012c71fbcb073fef9a799a8a151f6"
  prev-thread="2002/07/e279fbfc81d25f8b7b40690d1165d72d"
  next-thread="2002/07/08b5453c237ff76a342f53e57f63faec"
  root="../../"
  period="month"
  listname="caml-list"
  title="Archives of the Caml mailing list">

<thread subject="[Caml-list] marshalling and code changes">
<msg 
  url="2002/07/ff7adba2f7751b11a6ba288c8fc0167a"
  from="Oleg &lt;oleg_inconnu@m...&gt;"
  author="Oleg"
  date="2002-07-29T12:49:17"
  subject="[Caml-list] marshalling and code changes">
<msg 
  url="2002/07/953012c71fbcb073fef9a799a8a151f6"
  from="James Leifer &lt;James.Leifer@i...&gt;"
  author="James Leifer"
  date="2002-07-29T13:59:54"
  subject="Re: [Caml-list] marshalling and code changes">
</msg>
</msg>
</thread>

<contents>
Hi

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.


Thanks
Oleg
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners

</contents>

</message>

