This file is indexed.

/usr/share/doc/racket/reference/serialization.html is in racket-doc 6.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>13.9&nbsp;Serialization</title><link rel="stylesheet" type="text/css" href="../scribble.css" title="default"/><link rel="stylesheet" type="text/css" href="extras.css" title="default"/><link rel="stylesheet" type="text/css" href="../racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-style.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../manual-racket.css" title="default"/><link rel="stylesheet" type="text/css" href="../doc-site.css" title="default"/><script type="text/javascript" src="../scribble-common.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../manual-racket.js"></script><script type="text/javascript" src="../doc-site.js"></script><script type="text/javascript" src="../local-redirect/local-redirect.js"></script><script type="text/javascript" src="../local-redirect/local-user-redirect.js"></script><!--[if IE 6]><style type="text/css">.SIEHidden { overflow: hidden; }</style><![endif]--></head><body id="doc-racket-lang-org"><div class="tocset"><div class="tocview"><div class="tocviewlist tocviewlisttopspace"><div class="tocviewtitle"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_0&quot;);">&#9658;</a></td><td></td><td><a href="index.html" class="tocviewlink" data-pltdoc="x"><span style="font-weight: bold">The Racket Reference</span></a></td></tr></table></div><div class="tocviewsublisttop" style="display: none;" id="tocview_0"><table cellspacing="0" cellpadding="0"><tr><td align="right">1&nbsp;</td><td><a href="model.html" class="tocviewlink" data-pltdoc="x">Language Model</a></td></tr><tr><td align="right">2&nbsp;</td><td><a href="notation.html" class="tocviewlink" data-pltdoc="x">Notation for Documentation</a></td></tr><tr><td align="right">3&nbsp;</td><td><a href="syntax.html" class="tocviewlink" data-pltdoc="x">Syntactic Forms</a></td></tr><tr><td align="right">4&nbsp;</td><td><a href="data.html" class="tocviewlink" data-pltdoc="x">Datatypes</a></td></tr><tr><td align="right">5&nbsp;</td><td><a href="structures.html" class="tocviewlink" data-pltdoc="x">Structures</a></td></tr><tr><td align="right">6&nbsp;</td><td><a href="mzlib_class.html" class="tocviewlink" data-pltdoc="x">Classes and Objects</a></td></tr><tr><td align="right">7&nbsp;</td><td><a href="mzlib_unit.html" class="tocviewlink" data-pltdoc="x">Units</a></td></tr><tr><td align="right">8&nbsp;</td><td><a href="contracts.html" class="tocviewlink" data-pltdoc="x">Contracts</a></td></tr><tr><td align="right">9&nbsp;</td><td><a href="match.html" class="tocviewlink" data-pltdoc="x">Pattern Matching</a></td></tr><tr><td align="right">10&nbsp;</td><td><a href="control.html" class="tocviewlink" data-pltdoc="x">Control Flow</a></td></tr><tr><td align="right">11&nbsp;</td><td><a href="concurrency.html" class="tocviewlink" data-pltdoc="x">Concurrency and Parallelism</a></td></tr><tr><td align="right">12&nbsp;</td><td><a href="Macros.html" class="tocviewlink" data-pltdoc="x">Macros</a></td></tr><tr><td align="right">13&nbsp;</td><td><a href="input-and-output.html" class="tocviewselflink" data-pltdoc="x">Input and Output</a></td></tr><tr><td align="right">14&nbsp;</td><td><a href="security.html" class="tocviewlink" data-pltdoc="x">Reflection and Security</a></td></tr><tr><td align="right">15&nbsp;</td><td><a href="os.html" class="tocviewlink" data-pltdoc="x">Operating System</a></td></tr><tr><td align="right">16&nbsp;</td><td><a href="memory.html" class="tocviewlink" data-pltdoc="x">Memory Management</a></td></tr><tr><td align="right">17&nbsp;</td><td><a href="unsafe.html" class="tocviewlink" data-pltdoc="x">Unsafe Operations</a></td></tr><tr><td align="right">18&nbsp;</td><td><a href="running.html" class="tocviewlink" data-pltdoc="x">Running Racket</a></td></tr><tr><td align="right"></td><td><a href="doc-bibliography.html" class="tocviewlink" data-pltdoc="x">Bibliography</a></td></tr><tr><td align="right"></td><td><a href="doc-index.html" class="tocviewlink" data-pltdoc="x">Index</a></td></tr></table></div></div><div class="tocviewlist"><table cellspacing="0" cellpadding="0"><tr><td style="width: 1em;"><a href="javascript:void(0);" title="Expand/Collapse" class="tocviewtoggle" onclick="TocviewToggle(this,&quot;tocview_1&quot;);">&#9660;</a></td><td>13&nbsp;</td><td><a href="input-and-output.html" class="tocviewlink" data-pltdoc="x">Input and Output</a></td></tr></table><div class="tocviewsublistbottom" style="display: block;" id="tocview_1"><table cellspacing="0" cellpadding="0"><tr><td align="right">13.1&nbsp;</td><td><a href="ports.html" class="tocviewlink" data-pltdoc="x">Ports</a></td></tr><tr><td align="right">13.2&nbsp;</td><td><a href="Byte_and_String_Input.html" class="tocviewlink" data-pltdoc="x">Byte and String Input</a></td></tr><tr><td align="right">13.3&nbsp;</td><td><a href="Byte_and_String_Output.html" class="tocviewlink" data-pltdoc="x">Byte and String Output</a></td></tr><tr><td align="right">13.4&nbsp;</td><td><a href="Reading.html" class="tocviewlink" data-pltdoc="x">Reading</a></td></tr><tr><td align="right">13.5&nbsp;</td><td><a href="Writing.html" class="tocviewlink" data-pltdoc="x">Writing</a></td></tr><tr><td align="right">13.6&nbsp;</td><td><a href="pretty-print.html" class="tocviewlink" data-pltdoc="x">Pretty Printing</a></td></tr><tr><td align="right">13.7&nbsp;</td><td><a href="Reader_Extension.html" class="tocviewlink" data-pltdoc="x">Reader Extension</a></td></tr><tr><td align="right">13.8&nbsp;</td><td><a href="Printer_Extension.html" class="tocviewlink" data-pltdoc="x">Printer Extension</a></td></tr><tr><td align="right">13.9&nbsp;</td><td><a href="" class="tocviewselflink" data-pltdoc="x">Serialization</a></td></tr><tr><td align="right">13.10&nbsp;</td><td><a href="fasl.html" class="tocviewlink" data-pltdoc="x">Fast-<wbr></wbr>Load Serialization</a></td></tr></table></div></div></div><div class="tocsub"><div class="tocsubtitle">On this page:</div><table class="tocsublist" cellspacing="0"><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serializable~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">serializable?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">serialize</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">deserialize</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialized~3d~3f%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">serialized=?</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize-module-guard%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">deserialize-<wbr></wbr>module-<wbr></wbr>guard</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">serializable-<wbr></wbr>struct</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._define-serializable-struct%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>serializable-<wbr></wbr>struct</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%2Fversions%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">serializable-<wbr></wbr>struct/<span class="mywbr"> &nbsp;</span>versions</span></span></a></td></tr><tr><td><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._define-serializable-struct%2Fversions%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktStxLink">define-<wbr></wbr>serializable-<wbr></wbr>struct/<span class="mywbr"> &nbsp;</span>versions</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-deserialize-info%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>deserialize-<wbr></wbr>info</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">prop:<span class="mywbr"> &nbsp;</span>serializable</span></span></a></td></tr><tr><td><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-serialize-info%29%29" class="tocsublink" data-pltdoc="x"><span class="RktSym"><span class="RktValLink">make-<wbr></wbr>serialize-<wbr></wbr>info</span></span></a></td></tr></table></div></div><div class="maincolumn"><div class="main"><div class="navsettop"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Printer_Extension.html" title="backward to &quot;13.8 Printer Extension&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="input-and-output.html" title="up to &quot;13 Input and Output&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="fasl.html" title="forward to &quot;13.10 Fast-Load Serialization&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div><h4 x-source-module="(lib &quot;scribblings/reference/reference.scrbl&quot;)" x-part-tag="&quot;serialization&quot;">13.9<tt>&nbsp;</tt><a name="(part._serialization)"></a><a name="(mod-path._racket/serialize)"></a>Serialization</h4><p><div class="SIntrapara"><table cellspacing="0" cellpadding="0" class="defmodule"><tr><td align="left"><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._require%29%29" class="RktStxLink" data-pltdoc="x">require</a></span><span class="stt"> </span><a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/serialize</span></a><span class="RktPn">)</span></td><td align="right"><span class="RpackageSpec"><span class="Smaller">&nbsp;package:</span> <span class="stt">base</span></span></td></tr></table></div><div class="SIntrapara">The bindings documented in this section are provided by the <a href="" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/serialize</span></a> library, not <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket/base</span></a> or <a href="index.html" class="RktModLink" data-pltdoc="x"><span class="RktSym">racket</span></a>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._serializable~3f))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serializable~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">serializable?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v</span> appears to be serializable, without
checking the content of compound values, and <span class="RktVal">#f</span> otherwise.
See <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span> for an enumeration of serializable values.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._serialize))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValDef RktValLink" data-pltdoc="x">serialize</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serializable~3f%29%29" class="RktValLink" data-pltdoc="x">serializable?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns a value that encapsulates the value <span class="RktVar">v</span>. This value
includes only readable values, so it can be written to a stream with
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span> or <span class="RktSym"><a href="fasl.html#%28def._%28%28lib._racket%2Ffasl..rkt%29._s-exp-~3efasl%29%29" class="RktValLink" data-pltdoc="x">s-exp-&gt;fasl</a></span>, later read from a stream using
<span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> or <span class="RktSym"><a href="fasl.html#%28def._%28%28lib._racket%2Ffasl..rkt%29._fasl-~3es-exp%29%29" class="RktValLink" data-pltdoc="x">fasl-&gt;s-exp</a></span>, and then converted to a value
like the original using <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span>. Serialization followed
by deserialization produces a value with the same graph structure and
mutability as the original value, but the serialized value is a plain
tree (i.e., no sharing).</div></p><p>The following kinds of values are serializable:</p><ul><li><p>structures created through <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span> or
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%2Fversions%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct/versions</a></span>, or more generally
structures with the <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="RktValLink" data-pltdoc="x">prop:serializable</a></span> property (see
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="RktValLink" data-pltdoc="x">prop:serializable</a></span> for more information);</p></li><li><p><a href="structures.html#%28tech._prefab%29" data-pltdoc="x">prefab</a> structures;</p></li><li><p>instances of classes defined with <span class="RktSym"><a href="objectserialize.html#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._define-serializable-class%29%29" class="RktStxLink" data-pltdoc="x">define-serializable-class</a></span>
or <span class="RktSym"><a href="objectserialize.html#%28form._%28%28lib._racket%2Fprivate%2Fclass-internal..rkt%29._define-serializable-class%2A%29%29" class="RktStxLink" data-pltdoc="x">define-serializable-class*</a></span>;</p></li><li><p><a href="booleans.html#%28tech._boolean%29" class="techoutside" data-pltdoc="x"><span class="techinside">booleans</span></a>, <a href="numbers.html#%28tech._number%29" class="techoutside" data-pltdoc="x"><span class="techinside">numbers</span></a>, <a href="characters.html#%28tech._character%29" class="techoutside" data-pltdoc="x"><span class="techinside">characters</span></a>, <a href="reader.html#%28tech._interned%29" class="techoutside" data-pltdoc="x"><span class="techinside">interned</span></a> symbols,
<a href="symbols.html#%28tech._unreadable._symbol%29" class="techoutside" data-pltdoc="x"><span class="techinside">unreadable symbols</span></a>, <a href="strings.html#%28tech._string%29" class="techoutside" data-pltdoc="x"><span class="techinside">strings</span></a>, <a href="bytestrings.html#%28tech._byte._string%29" class="techoutside" data-pltdoc="x"><span class="techinside">byte strings</span></a>, <a href="pathutils.html#%28tech._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">paths</span></a> (for a
specific convention), <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=void_undefined.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#&lt;void&gt;</span></span></a>, and the empty list;</p></li><li><p><a href="pairs.html#%28tech._pair%29" class="techoutside" data-pltdoc="x"><span class="techinside">pairs</span></a>, <a href="mpairs.html#%28tech._mutable._pair%29" class="techoutside" data-pltdoc="x"><span class="techinside">mutable pairs</span></a>, <a href="vectors.html#%28tech._vector%29" class="techoutside" data-pltdoc="x"><span class="techinside">vectors</span></a>, <a href="flonums.html#%28tech._flvector%29" class="techoutside" data-pltdoc="x"><span class="techinside">flvectors</span></a>, <a href="fixnums.html#%28tech._fxvector%29" class="techoutside" data-pltdoc="x"><span class="techinside">fxvectors</span></a>,
<a href="boxes.html#%28tech._box%29" class="techoutside" data-pltdoc="x"><span class="techinside">box</span></a>es, <a href="hashtables.html#%28tech._hash._table%29" class="techoutside" data-pltdoc="x"><span class="techinside">hash tables</span></a>, and <a href="sets.html#%28tech._set%29" class="techoutside" data-pltdoc="x"><span class="techinside">sets</span></a>;</p></li><li><p><span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%29%29" class="RktValLink" data-pltdoc="x">date</a></span>, <span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%2A%29%29" class="RktValLink" data-pltdoc="x">date*</a></span>, <span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._arity-at-least%29%29" class="RktValLink" data-pltdoc="x">arity-at-least</a></span> and <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span>
structures; and</p></li><li><p><a href="Module_Names_and_Loading.html#%28tech._module._path._index%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path index</span></a> values.</p></li></ul><p>Serialization succeeds for a compound value, such as a pair, only if
all content of the value is serializable.  If a value given to
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span> is not completely serializable, the
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._exn~3afail~3acontract%29%29" class="RktValLink" data-pltdoc="x">exn:fail:contract</a></span> exception is raised.</p><p>If <span class="RktVar">v</span> contains a cycle (i.e., a collection of objects that
are all reachable from each other), then <span class="RktVar">v</span> can be serialized
only if the cycle includes a mutable value, where a <a href="structures.html#%28tech._prefab%29" class="techoutside" data-pltdoc="x"><span class="techinside">prefab</span></a>
structure counts as mutable only if all of its fields are mutable.</p><blockquote class="refpara"><blockquote class="refcolumn"><blockquote class="refcontent"><p>The <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span> functions
currently do not handle certain cyclic values that <span class="RktSym"><a href="Reading.html#%28def._%28%28quote._~23~25kernel%29._read%29%29" class="RktValLink" data-pltdoc="x">read</a></span> and
<span class="RktSym"><a href="Writing.html#%28def._%28%28quote._~23~25kernel%29._write%29%29" class="RktValLink" data-pltdoc="x">write</a></span> can handle, such as <span class="RktVal">'</span><span class="RktVal">#0=</span><span class="RktVal">(</span><span class="RktVal">#0#</span><span class="RktVal">)</span>.</p></blockquote></blockquote></blockquote><p>See <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span> for information on the format of serialized
data.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._deserialize))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValDef RktValLink" data-pltdoc="x">deserialize</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Given a value <span class="RktVar">v</span> that was produced by <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>,
produces a value like the one given to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>, including
the same graph structure and mutability.</div></p><p>A serialized representation <span class="RktVar">v</span> is a list of six or seven
elements:</p><ul><li><p>An optional list <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">1</span><span class="RktVal">)</span>, <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">2</span><span class="RktVal">)</span>, or <span class="RktVal">'</span><span class="RktVal">(</span><span class="RktVal">3</span><span class="RktVal">)</span> that represents
the version of the serialization format. If the first element
of a representation is not a list, then the version is
<span class="RktVal">0</span>. Version 1 adds support for mutable pairs,
version 2 adds support for <a href="symbols.html#%28tech._unreadable._symbol%29" class="techoutside" data-pltdoc="x"><span class="techinside">unreadable symbols</span></a>,
and version 3 adds support for <span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%2A%29%29" class="RktValLink" data-pltdoc="x">date*</a></span> structures.</p></li><li><p>A non-negative exact integer <span class="RktVar">s-count</span> that represents the
number of distinct structure types represented in the
serialized data.</p></li><li><p>A list <span class="RktVar">s-types</span> of length <span class="RktVar">s-count</span>, where
each element represents a structure type. Each structure type
is encoded as a pair. The <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> of the pair is
<span class="RktVal">#f</span> for a structure whose deserialization information
is defined at the top level, otherwise it is a quoted
<a href="Module_Names_and_Loading.html#%28tech._module._path%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path</span></a> or a byte string (to be converted into a
platform-specific path using <span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._bytes-~3epath%29%29" class="RktValLink" data-pltdoc="x">bytes-&gt;path</a></span>) for a module
that exports the structure&rsquo;s deserialization information.  The
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> of the pair is the name of a binding (at the top
level or exported from a module) for deserialization
information, either a symbol or a string representing an
<a href="symbols.html#%28tech._unreadable._symbol%29" class="techoutside" data-pltdoc="x"><span class="techinside">unreadable symbol</span></a>. These two are used with either
<span class="RktSym">namespace-variable-binding</span> or <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>
to obtain deserialization information. See
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-deserialize-info%29%29" class="RktValLink" data-pltdoc="x">make-deserialize-info</a></span> for more information on the
binding&rsquo;s value. See also <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize-module-guard%29%29" class="RktValLink" data-pltdoc="x">deserialize-module-guard</a></span>.</p></li><li><p>A non-negative exact integer, <span class="RktVar">g-count</span> that represents the
number of graph points contained in the following list.</p></li><li><p>A list <span class="RktVar">graph</span> of length <span class="RktVar">g-count</span>, where each element
 represents a serialized value to be referenced during the
 construction of other serialized values. Each list element is
 either a box or not:</p><ul><li><p>A box represents a value that is part of a cycle, and for
deserialization, it must be allocated with <span class="RktVal">#f</span> for
each of its fields. The content of the box indicates the
shape of the value:</p><ul><li><p>a non-negative exact integer <span class="RktVar">i</span> for an instance
of a structure type that is represented by the
<span class="RktVar">i</span>th element of the <span class="RktVar">s-types</span> list;</p></li><li><p><span class="RktVal">'</span><span class="RktVal">c</span> for a pair, which fails on
deserialization (since pairs are immutable; this
case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>);</p></li><li><p><span class="RktVal">'</span><span class="RktVal">m</span> for a mutable pair;</p></li><li><p><span class="RktVal">'</span><span class="RktVal">b</span> for a box;</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">v</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a non-negative exact integer <span class="RktVar">s</span>
for a vector of length <span class="RktVar">s</span>;</p></li><li><p>a list whose first element is <span class="RktVal">'</span><span class="RktVal">h</span> and whose
remaining elements are symbols that determine the
hash-table type:</p><ul><li><p><span class="RktVal">'</span><span class="RktVal">equal</span> &#8212;<wbr></wbr> <span class="RktPn">(</span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._make-hash%29%29" class="RktValLink" data-pltdoc="x">make-hash</a></span><span class="RktPn">)</span></p></li><li><p><span class="RktVal">'</span><span class="RktVal">equal</span><span class="stt"> </span><span class="RktVal">'</span><span class="RktVal">weak</span> &#8212;<wbr></wbr> <span class="RktPn">(</span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._make-weak-hash%29%29" class="RktValLink" data-pltdoc="x">make-weak-hash</a></span><span class="RktPn">)</span></p></li><li><p><span class="RktVal">'</span><span class="RktVal">weak</span> &#8212;<wbr></wbr> <span class="RktPn">(</span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._make-weak-hasheq%29%29" class="RktValLink" data-pltdoc="x">make-weak-hasheq</a></span><span class="RktPn">)</span></p></li><li><p>no symbols &#8212;<wbr></wbr> <span class="RktPn">(</span><span class="RktSym"><a href="hashtables.html#%28def._%28%28quote._~23~25kernel%29._make-hasheq%29%29" class="RktValLink" data-pltdoc="x">make-hasheq</a></span><span class="RktPn">)</span></p></li></ul></li><li><p><span class="RktVal">'</span><span class="RktVal">date*</span> for a <span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%2A%29%29" class="RktValLink" data-pltdoc="x">date*</a></span> structure, which
fails on deserialization (since dates are immutable;
this case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>);</p></li><li><p><span class="RktVal">'</span><span class="RktVal">date</span> for a <span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%29%29" class="RktValLink" data-pltdoc="x">date</a></span> structure, which
fails on deserialization (since dates are immutable;
this case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>);</p></li><li><p><span class="RktVal">'</span><span class="RktVal">arity-at-least</span> for an
<span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._arity-at-least%29%29" class="RktValLink" data-pltdoc="x">arity-at-least</a></span> structure, which fails on
deserialization (since arity-at-least are immutable; this
case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>); or</p></li><li><p><span class="RktVal">'</span><span class="RktVal">mpi</span> for a <a href="Module_Names_and_Loading.html#%28tech._module._path._index%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path index</span></a>, which
fails on deserialization (since a module path index is immutable;
this case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>).</p></li><li><p><span class="RktVal">'</span><span class="RktVal">srcloc</span> for a <span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span> structure, which
fails on deserialization (since srclocs are immutable;
this case does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>).</p></li></ul><p>The <span class="RktVal">#f</span>-filled value will be updated with content specified
by the fifth element of the serialization list <span class="RktVar">v</span>.</p></li><li><p>A non-box represents a <span style="font-style: italic">serial</span> value to be
 constructed immediately, and it is one of the following:</p><ul><li><p>a boolean, number, character, interned symbol, or empty list,
representing itself.</p></li><li><p>a string, representing an immutable string.</p></li><li><p>a byte string, representing an immutable byte
string.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">?</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a non-negative exact integer
<span class="RktVar">i</span>; it represents the value constructed for the
<span class="RktVar">i</span>th element of <span class="RktVar">graph</span>, where <span class="RktVar">i</span> is
less than the position of this element within
<span class="RktVar">graph</span>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is a number <span class="RktVar">i</span>; it
represents an instance of a structure type that is
described by the <span class="RktVar">i</span>th element of the
<span class="RktVar">s-types</span> list. The <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> of the pair is
a list of serials representing arguments to be
provided to the structure type&rsquo;s deserializer.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">q</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is an immutable value; it represents
the quoted value.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">f</span>; it
represents an instance of a <a href="structures.html#%28tech._prefab%29" class="techoutside" data-pltdoc="x"><span class="techinside">prefab</span></a> structure
type. The <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cadr%29%29" class="RktValLink" data-pltdoc="x">cadr</a></span> of the pair is a <a href="structures.html#%28tech._prefab%29" class="techoutside" data-pltdoc="x"><span class="techinside">prefab</span></a>
structure type key, and the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cddr%29%29" class="RktValLink" data-pltdoc="x">cddr</a></span> is a list of
serials representing the field values.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">void</span>,
representing <a href="http://download.racket-lang.org/docs/6.1/html/local-redirect/index.html?doc=guide&amp;rel=void_undefined.html&amp;version=6.1" class="RktModLink Sq" data-pltdoc="x"><span class="nobreak"><span class="RktRes">#&lt;void&gt;</span></span></a>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">su</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a character string; it represents an
<a href="symbols.html#%28tech._unreadable._symbol%29" class="techoutside" data-pltdoc="x"><span class="techinside">unreadable symbol</span></a>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">u</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is either a byte string or character
string; it represents a mutable byte or character
string.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">p</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a byte string; it represents a
path using the serializer&rsquo;s path convention
(deprecated in favor of <span class="RktVal">'</span><span class="RktVal">p+</span>).</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">p+</span>, whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cadr%29%29" class="RktValLink" data-pltdoc="x">cadr</a></span> is a byte string, and whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cddr%29%29" class="RktValLink" data-pltdoc="x">cddr</a></span>
is one of the possible symbol results of
<span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28quote._~23~25kernel%29._system-path-convention-type%29%29" class="RktValLink" data-pltdoc="x">system-path-convention-type</a></span>; it represents a
path using the specified convention.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">c</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a pair of serials; it represents an
immutable pair.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">c!</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a pair of serials; it represents a
pair (but formerly represented a mutable pair), and
does not appear in output generated by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">m</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a pair of serials; it represents a
mutable pair.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">v</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents an
immutable vector.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">v!</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
mutable vector.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">vl</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
<a href="flonums.html#%28tech._flvector%29" class="techoutside" data-pltdoc="x"><span class="techinside">flvector</span></a>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">vx</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
<a href="fixnums.html#%28tech._fxvector%29" class="techoutside" data-pltdoc="x"><span class="techinside">fxvector</span></a>.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">b</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a serial; it represents an immutable
box.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">b!</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a serial; it represents a mutable
box.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">h</span>, whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cadr%29%29" class="RktValLink" data-pltdoc="x">cadr</a></span> is either <span class="RktVal">'</span><span class="RktVal">!</span> or <span class="RktVal">'</span><span class="RktVal"><span class="nobreak">-</span></span>
(mutable or immutable, respectively), whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._caddr%29%29" class="RktValLink" data-pltdoc="x">caddr</a></span> is a list of symbols (containing
<span class="RktVal">'</span><span class="RktVal">equal</span>, <span class="RktVal">'</span><span class="RktVal">weak</span>, both, or neither)
that determines the hash table type, and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdddr%29%29" class="RktValLink" data-pltdoc="x">cdddr</a></span> is a list of pairs, where the
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> of each pair is a serial for a
hash-table key and the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a serial for
the corresponding value.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">date*</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
<span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%2A%29%29" class="RktValLink" data-pltdoc="x">date*</a></span> structure.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">date</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
<span class="RktSym"><a href="time.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._date%29%29" class="RktValLink" data-pltdoc="x">date</a></span> structure.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">arity-at-least</span>
and whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a serial; it represents an
<span class="RktSym"><a href="procedures.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._arity-at-least%29%29" class="RktValLink" data-pltdoc="x">arity-at-least</a></span> structure.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">mpi</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a pair; it represents a
<a href="Module_Names_and_Loading.html#%28tech._module._path._index%29" class="techoutside" data-pltdoc="x"><span class="techinside">module path index</span></a> that joins the paired
values.</p></li><li><p>a pair whose <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> is <span class="RktVal">'</span><span class="RktVal">srcloc</span> and whose
<span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a list of serials; it represents a
<span class="RktSym"><a href="exns.html#%28def._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._srcloc%29%29" class="RktValLink" data-pltdoc="x">srcloc</a></span> structure.</p></li></ul></li></ul></li><li><p>A list of pairs, where the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> of each pair is a
non-negative exact integer <span class="RktVar">i</span> and the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> is a
serial (as defined in the previous bullet). Each element
represents an update to an <span class="RktVar">i</span>th element of <span class="RktVar">graph</span>
that was specified as a box, and the serial describes how to
construct a new value with the same shape as specified by the
box. The content of this new value must be transferred into the
value created for the box in <span class="RktVar">graph</span>.</p></li><li><p>A final serial (as defined in the two bullets back)
representing the result of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span>.</p></li></ul><p>The result of <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span> shares no mutable values with the
argument to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span>.</p><p>If a value provided to <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span> is a simple tree (i.e., no
sharing), then the fourth and fifth elements in the serialized
representation will be empty.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._serialized~3d~3f))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialized~3d~3f%29%29" class="RktValDef RktValLink" data-pltdoc="x">serialized=?</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._boolean~3f%29%29" class="RktValLink" data-pltdoc="x">boolean?</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v1</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">v2</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Returns <span class="RktVal">#t</span> if <span class="RktVar">v1</span> and <span class="RktVar">v2</span> represent the same
serialization information.</div></p><p>More precisely, it returns the same value that <span class="RktPn">(</span><span class="RktSym"><a href="booleans.html#%28def._%28%28quote._~23~25kernel%29._equal~3f%29%29" class="RktValLink" data-pltdoc="x">equal?</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="stt"> </span><span class="RktVar">v1</span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="stt"> </span><span class="RktVar">v2</span><span class="RktPn">)</span><span class="RktPn">)</span> would return if</p><ul><li><p>all structure types whose deserializers are accessed with
distinct module paths are actually distinct types;</p></li><li><p>all structure types are transparent; and</p></li><li><p>all structure instances contain only the constituent values
recorded in each of <span class="RktVar">v1</span> and <span class="RktVar">v2</span>.</p></li></ul><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>parameter</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._deserialize-module-guard))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize-module-guard%29%29" class="RktValDef RktValLink" data-pltdoc="x">deserialize-module-guard</a></span></span><span class="RktPn"></span><span class="RktPn">)</span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr><tr><td><span class="RktPn">(</span><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize-module-guard%29%29" class="RktValDef RktValLink" data-pltdoc="x">deserialize-module-guard</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">guard</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">guard</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path~3f%29%29" class="RktValLink" data-pltdoc="x">module-path?</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="void.html#%28def._%28%28quote._~23~25kernel%29._void~3f%29%29" class="RktValLink" data-pltdoc="x">void?</a></span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">A parameter whose value is called by <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span> before
dynamically loading a module via <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>. The two
arguments provided to the procedure are the same as the arguments to
be passed to <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>. The procedure can raise an
exception to disallow the <span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._dynamic-require%29%29" class="RktValLink" data-pltdoc="x">dynamic-require</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/serialize..rkt)._serializable-struct))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">serializable-struct</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVar">maybe-super</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">field</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">struct-option</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span>, but instances of the structure type are
serializable with <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>.  This form is allowed only at
the top level or in a module&rsquo;s top level (so that deserialization
information can be found later).</div></p><p>Serialization only supports cycles involving the created structure
type when all fields are mutable (or when the cycle can be broken
through some other mutable value).</p><p>In addition to the bindings generated by <span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._struct%29%29" class="RktStxLink" data-pltdoc="x">struct</a></span>,
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span> binds
<span class="RktSym">deserialize-info:</span><span class="RktVar">id</span><span class="RktSym">-v0</span> to
deserialization information. Furthermore, in a module context, it
automatically <span class="RktSym"><a href="require.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._provide%29%29" class="RktStxLink" data-pltdoc="x">provide</a></span>s this binding in a <span class="RktSym">deserialize-info</span>
submodule using <span class="RktSym"><a href="module.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._module%2B%29%29" class="RktStxLink" data-pltdoc="x">module+</a></span>.</p><p>The <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span> form enables the construction of
structure instances from places where <span class="RktVar">id</span> is not accessible,
since deserialization must construct instances. Furthermore,
<span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span> provides limited access to field
mutation, but only for instances generated through the deserialization
information bound to
<span class="RktSym">deserialize-info:</span><span class="RktVar">id</span><span class="RktSym">-v0</span>. See
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-deserialize-info%29%29" class="RktValLink" data-pltdoc="x">make-deserialize-info</a></span> for more information.</p><p>The <span class="RktSym"><span class="nobreak">-v</span>0</span> suffix on the deserialization enables future
versioning on the structure type through
<span class="RktSym">serializable-struct/version</span>.</p><p>When a supertype is supplied as <span class="RktVar">maybe-super</span>,
compile-time information bound to the supertype identifier must
include all of the supertype&rsquo;s field accessors. If any field mutator
is missing, the structure type will be treated as immutable for the
purposes of marshaling (so cycles involving only instances of the
structure type cannot be handled by the deserializer).</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span><span class="hspace">&nbsp;</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">point-x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">1</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/serialize..rkt)._define-serializable-struct))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._define-serializable-struct%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-serializable-struct</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id-maybe-super</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">field</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">struct-option</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span>, but with the supertype syntax and
default constructor name of <span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define-struct%29%29" class="RktStxLink" data-pltdoc="x">define-struct</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/serialize..rkt)._serializable-struct/versions))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%2Fversions%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">serializable-struct/versions</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id</span><span class="hspace">&nbsp;</span><span class="RktVar">maybe-super</span><span class="hspace">&nbsp;</span><span class="RktVar">vers</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">field</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktVar">other-version-clause</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">struct-option</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr><tr><td><span class="stt">&nbsp;</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="specgrammar"><tr><td align="right" valign="baseline"><span class="RktVar">other-version-clause</span></td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="center" valign="baseline">=</td><td align="left" valign="baseline"><span class="stt">&nbsp;</span></td><td align="left" valign="baseline"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktVar">other-vers</span><span class="hspace">&nbsp;</span><span class="RktVar">make-proc-expr</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">cycle-make-proc-expr</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span>, but the generated deserializer
binding is
<span class="RktSym">deserialize-info:</span><span class="RktVar">id</span><span class="RktSym">-v</span><span class="RktVar">vers</span>. In
addition,
<span class="RktSym">deserialize-info:</span><span class="RktVar">id</span><span class="RktSym">-v</span><span class="RktVar">other-vers</span>
is bound for each <span class="RktVar">other-vers</span>. The <span class="RktVar">vers</span> and each
<span class="RktVar">other-vers</span> must be a literal, exact, nonnegative integer.</div></p><p>Each <span class="RktVar">make-proc-expr</span> should produce a procedure, and the
procedure should accept as many argument as fields in the
corresponding version of the structure type, and it produce an
instance of <span class="RktVar">id</span>. Each <span class="RktVar">cycle-make-proc-expr</span> should
produce a procedure of no arguments; this procedure should return two
values: an instance <span class="RktSym">x</span> of <span class="RktVar">id</span> (typically with
<span class="RktVal">#f</span> for all fields) and a procedure that accepts another
instance of <span class="RktVar">id</span> and copies its field values into <span class="RktSym">x</span>.</p><p><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><p>Examples:</p></td></tr><tr><td><blockquote class="SCodeFlow"><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct</a></span><span class="hspace">&nbsp;</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">#:mutable</span><span class="hspace">&nbsp;</span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ps</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">2</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ps</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(point 1 2)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktVal">10</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym">set-point-x!</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="define.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define%29%29" class="RktStxLink" data-pltdoc="x">define</a></span><span class="hspace">&nbsp;</span><span class="RktSym">xs</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktSym">xs</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#0=(point #0# 10)</span></p></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%2Fversions%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct/versions</a></span><span class="hspace">&nbsp;</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">1</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktSym">z</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktVal">0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">Constructor for simple v0 instances:</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktSym">x</span><span class="hspace">&nbsp;</span><span class="RktSym">y</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktCmt">;</span><span class="RktCmt">&nbsp;</span><span class="RktCmt">Constructor for v0 instance in a cycle:</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="let.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._let%29%29" class="RktStxLink" data-pltdoc="x">let</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktPn">[</span><span class="RktSym">p0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktVal">#f</span><span class="hspace">&nbsp;</span><span class="RktVal">0</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="values.html#%28def._%28%28quote._~23~25kernel%29._values%29%29" class="RktValLink" data-pltdoc="x">values</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym">p0</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="lambda.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._lambda%29%29" class="RktStxLink" data-pltdoc="x">lambda</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">p</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">set-point-x!</span><span class="hspace">&nbsp;</span><span class="RktSym">p0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point-x</span><span class="hspace">&nbsp;</span><span class="RktSym">p</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym">set-point-y!</span><span class="hspace">&nbsp;</span><span class="RktSym">p0</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point-y</span><span class="hspace">&nbsp;</span><span class="RktSym">p</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">]</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="hspace">&nbsp;&nbsp;&nbsp;</span><span class="RktPn">#:mutable</span><span class="hspace">&nbsp;</span><span class="RktPn">#:transparent</span><span class="RktPn">)</span></td></tr></table></td></tr><tr><td><table cellspacing="0" cellpadding="0"><tr><td></td></tr></table></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym">point</span><span class="hspace">&nbsp;</span><span class="RktVal">4</span><span class="hspace">&nbsp;</span><span class="RktVal">5</span><span class="hspace">&nbsp;</span><span class="RktVal">6</span><span class="RktPn">)</span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(point 4 5 6)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktSym">ps</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">(point 1 2 0)</span></p></td></tr><tr><td><span class="stt">&gt; </span><span class="RktPn">(</span><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span><span class="hspace">&nbsp;</span><span class="RktSym">xs</span><span class="RktPn">)</span></td></tr><tr><td><p><span class="RktRes">#0=(point #0# 10 0)</span></p></td></tr></table></blockquote></td></tr></table></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>syntax</p></div></div><table cellspacing="0" cellpadding="0" class="RktBlk RForeground"><tr><td><span class="RktPn">(</span><a name="(form._((lib._racket/serialize..rkt)._define-serializable-struct/versions))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._define-serializable-struct%2Fversions%29%29" class="RktStxDef RktStxLink" data-pltdoc="x">define-serializable-struct/versions</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">id-maybe-super</span><span class="hspace">&nbsp;</span><span class="RktVar">vers</span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktVar">field</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktVar">other-version-clause</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktVar">struct-option</span><span class="hspace">&nbsp;</span><span class="RktMeta">...</span><span class="RktPn">)</span></td></tr></table></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">Like <span class="RktSym"><a href="#%28form._%28%28lib._racket%2Fserialize..rkt%29._serializable-struct%2Fversions%29%29" class="RktStxLink" data-pltdoc="x">serializable-struct/versions</a></span>, but with the supertype syntax and
default constructor name of <span class="RktSym"><a href="define-struct.html#%28form._%28%28lib._racket%2Fprivate%2Fbase..rkt%29._define-struct%29%29" class="RktStxLink" data-pltdoc="x">define-struct</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><p class="RForeground"><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._make-deserialize-info))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-deserialize-info%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-deserialize-info</a></span></span><span class="hspace">&nbsp;</span><span class="RktVar">make</span><span class="hspace">&nbsp;</span><span class="RktVar">cycle-make</span><span class="RktPn">)</span><span class="hspace">&nbsp;</span>&rarr;<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></p></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">make</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._procedure~3f%29%29" class="RktValLink" data-pltdoc="x">procedure?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">cycle-make</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="values.html#%28def._%28%28quote._~23~25kernel%29._values%29%29" class="RktValLink" data-pltdoc="x">values</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="procedures.html#%28def._%28%28quote._~23~25kernel%29._procedure~3f%29%29" class="RktValLink" data-pltdoc="x">procedure?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a deserialization information record to be used by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span>. This information is normally tied to a
particular structure because the structure has a
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="RktValLink" data-pltdoc="x">prop:serializable</a></span> property value that points to a top-level
variable or module-exported variable that is bound to deserialization
information.</div></p><p>The <span class="RktVar">make</span> procedure should accept as many arguments as the
structure&rsquo;s serializer put into a vector; normally, this is the number
of fields in the structure. It should return an instance of the
structure.</p><p>The <span class="RktVar">cycle-make</span> procedure should accept no arguments, and it
should return two values: a structure instance <span class="RktSym">x</span> (with dummy
field values) and an update procedure. The update procedure takes
another structure instance generated by the <span class="RktVar">make</span>, and it
transfers the field values of this instance into <span class="RktSym">x</span>.</p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>value</p></div></div><p class="RForeground"><a name="(def._((lib._racket/private/serialize..rkt)._prop~3aserializable))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="RktValDef RktValLink" data-pltdoc="x">prop:serializable</a></span></span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym">property?</span></p></blockquote></td></tr></table></blockquote></div><div class="SIntrapara">This property identifies structures and structure types that are
serializable. The property value should be constructed with
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-serialize-info%29%29" class="RktValLink" data-pltdoc="x">make-serialize-info</a></span>.</div></p><p><div class="SIntrapara"><blockquote class="SVInsetFlow"><table cellspacing="0" cellpadding="0" class="boxed RBoxed"><tr><td><blockquote class="SubFlow"><div class="RBackgroundLabel SIEHidden"><div class="RBackgroundLabelInner"><p>procedure</p></div></div><table cellspacing="0" cellpadding="0" class="prototype RForeground"><tr><td><span class="RktPn">(</span><a name="(def._((lib._racket/private/serialize..rkt)._make-serialize-info))"></a><span title="Provided from: racket/serialize | Package: base"><span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-serialize-info%29%29" class="RktValDef RktValLink" data-pltdoc="x">make-serialize-info</a></span></span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">to-vector</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">deserialize-id</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">can-cycle?</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td></tr><tr><td><span class="hspace">&nbsp;</span></td><td><span class="hspace">&nbsp;</span></td><td><span class="RktVar">dir</span><span class="RktPn">)</span></td><td><span class="hspace">&nbsp;</span></td><td>&rarr;</td><td><span class="hspace">&nbsp;</span></td><td><span class="RktSym"><a href="data-structure-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%29%29" class="RktStxLink" data-pltdoc="x">any</a></span></td></tr></table></blockquote></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">to-vector</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span><span class="hspace">&nbsp;</span><span class="RktPn">. </span><span class="RktSym"><a href="function-contracts.html#%28form._%28%28lib._racket%2Fcontract%2Fbase..rkt%29._-~3e%29%29" class="RktStxLink" data-pltdoc="x"><span class="nobreak">-&gt;</span></a></span><span class="RktPn"> .</span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="vectors.html#%28def._%28%28quote._~23~25kernel%29._vector~3f%29%29" class="RktValLink" data-pltdoc="x">vector?</a></span><span class="RktPn">)</span></td></tr><tr><td><table cellspacing="0" cellpadding="0" class="argcontract"><tr><td><span class="hspace">&nbsp;&nbsp;</span></td><td><span class="RktVar">deserialize-id</span></td><td><span class="hspace">&nbsp;</span></td><td>:</td><td><span class="hspace">&nbsp;</span></td><td><table cellspacing="0" cellpadding="0" class="RktBlk"><tr><td><span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._or%29%29" class="RktStxLink" data-pltdoc="x">or</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="stxops.html#%28def._%28%28lib._racket%2Fprivate%2Fstx..rkt%29._identifier~3f%29%29" class="RktValLink" data-pltdoc="x">identifier?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktPn">(</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._cons%2Fc%29%29" class="RktValLink" data-pltdoc="x">cons/c</a></span><span class="hspace">&nbsp;</span><span class="RktSym"><a href="symbols.html#%28def._%28%28quote._~23~25kernel%29._symbol~3f%29%29" class="RktValLink" data-pltdoc="x">symbol?</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span class="RktSym"><a href="Module_Names_and_Loading.html#%28def._%28%28quote._~23~25kernel%29._module-path-index~3f%29%29" class="RktValLink" data-pltdoc="x">module-path-index?</a></span><span class="RktPn">)</span><span class="RktPn">)</span></td></tr></table></td></tr></table></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">can-cycle?</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="data-structure-contracts.html#%28def._%28%28lib._racket%2Fcontract%2Fprivate%2Fmisc..rkt%29._any%2Fc%29%29" class="RktValLink" data-pltdoc="x">any/c</a></span></td></tr><tr><td><span class="hspace">&nbsp;&nbsp;</span><span class="RktVar">dir</span><span class="hspace">&nbsp;</span>:<span class="hspace">&nbsp;</span><span class="RktSym"><a href="Manipulating_Paths.html#%28def._%28%28lib._racket%2Fprivate%2Fmisc..rkt%29._path-string~3f%29%29" class="RktValLink" data-pltdoc="x">path-string?</a></span></td></tr></table></blockquote></div><div class="SIntrapara">Produces a value to be associated with a structure type through the
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._prop~3aserializable%29%29" class="RktValLink" data-pltdoc="x">prop:serializable</a></span> property. This value is used by
<span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._serialize%29%29" class="RktValLink" data-pltdoc="x">serialize</a></span>.</div></p><p>The <span class="RktVar">to-vector</span> procedure should accept a structure instance
and produce a vector for the instance&rsquo;s content.</p><p>The <span class="RktVar">deserialize-id</span> value indicates a binding for deserialize
information, to either a module export or a top-level definition. It
must be one of the following:</p><ul><li><p>If <span class="RktVar">deserialize-id</span> is an identifier, and if
<span class="RktPn">(</span><span class="RktSym"><a href="stxcmp.html#%28def._%28%28quote._~23~25kernel%29._identifier-binding%29%29" class="RktValLink" data-pltdoc="x">identifier-binding</a></span><span class="stt"> </span><span class="RktVar">deserialize-id</span><span class="RktPn">)</span> produces a list, then
the third element is used for the exporting module, otherwise the
top-level is assumed. Before trying an exporting module directly,
its <span class="RktSym">deserialize-info</span> submodule is tried; the module
itself is tried if no <span class="RktSym">deserialize-info</span>
submodule is available or if the export is not found. In either case, <span class="RktSym"><a href="stxops.html#%28def._%28%28quote._~23~25kernel%29._syntax-e%29%29" class="RktValLink" data-pltdoc="x">syntax-e</a></span> is used to
obtain the name of an exported identifier or top-level definition.</p></li><li><p>If <span class="RktVar">deserialize-id</span> is a symbol, it indicates a
top-level variable that is named by the symbol.</p></li><li><p>If <span class="RktVar">deserialize-id</span> is a pair, the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._car%29%29" class="RktValLink" data-pltdoc="x">car</a></span> must be
a symbol to name an exported identifier, and the <span class="RktSym"><a href="pairs.html#%28def._%28%28quote._~23~25kernel%29._cdr%29%29" class="RktValLink" data-pltdoc="x">cdr</a></span> must be
a module path index to specify the exporting module.</p></li></ul><p>See <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._make-deserialize-info%29%29" class="RktValLink" data-pltdoc="x">make-deserialize-info</a></span> and <span class="RktSym"><a href="#%28def._%28%28lib._racket%2Fprivate%2Fserialize..rkt%29._deserialize%29%29" class="RktValLink" data-pltdoc="x">deserialize</a></span> for more
information.</p><p>The <span class="RktVar">can-cycle?</span> argument should be false if instances should
not be serialized in such a way that deserialization requires creating
a structure instance with dummy field values and then updating the
instance later.</p><p>The <span class="RktVar">dir</span> argument should be a directory path that is used to
resolve a module reference for the binding of <span class="RktVar">deserialize-id</span>.
This directory path is used as a last resort when
<span class="RktVar">deserialize-id</span> indicates a module that was loaded through a
relative path with respect to the top level. Usually, it should be
<span class="RktPn">(</span><span class="RktSym"><a href="if.html#%28form._%28%28lib._racket%2Fprivate%2Fletstx-scheme..rkt%29._or%29%29" class="RktStxLink" data-pltdoc="x">or</a></span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="eval.html#%28def._%28%28quote._~23~25kernel%29._current-load-relative-directory%29%29" class="RktValLink" data-pltdoc="x">current-load-relative-directory</a></span><span class="RktPn">)</span><span class="stt"> </span><span class="RktPn">(</span><span class="RktSym"><a href="Filesystem.html#%28def._%28%28quote._~23~25kernel%29._current-directory%29%29" class="RktValLink" data-pltdoc="x">current-directory</a></span><span class="RktPn">)</span><span class="RktPn">)</span>.</p><div class="navsetbottom"><span class="navleft"><form class="searchform"><input class="searchbox" style="color: #888;" type="text" value="...search manuals..." title="Enter a search string to search the manuals" onkeypress="return DoSearchKey(event, this, &quot;6.1&quot;, &quot;../&quot;);" onfocus="this.style.color=&quot;black&quot;; this.style.textAlign=&quot;left&quot;; if (this.value == &quot;...search manuals...&quot;) this.value=&quot;&quot;;" onblur="if (this.value.match(/^ *$/)) { this.style.color=&quot;#888&quot;; this.style.textAlign=&quot;center&quot;; this.value=&quot;...search manuals...&quot;; }"/></form>&nbsp;&nbsp;<a href="../index.html" title="up to the documentation top" data-pltdoc="x" onclick="return GotoPLTRoot(&quot;6.1&quot;);">top</a></span><span class="navright">&nbsp;&nbsp;<a href="Printer_Extension.html" title="backward to &quot;13.8 Printer Extension&quot;" data-pltdoc="x">&larr; prev</a>&nbsp;&nbsp;<a href="input-and-output.html" title="up to &quot;13 Input and Output&quot;" data-pltdoc="x">up</a>&nbsp;&nbsp;<a href="fasl.html" title="forward to &quot;13.10 Fast-Load Serialization&quot;" data-pltdoc="x">next &rarr;</a></span>&nbsp;</div></div></div><div id="contextindicator">&nbsp;</div></body></html>