<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><br></div><div>Can you lift the class to the #lang module level? If not, why not? </div><div><br></div><br><div><div>On Jun 9, 2014, at 5:37 AM, seryojka wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">
<meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type">
<div bgcolor="#FFFFFF" text="#000000">
<div align="left"><tt>Hello, I'll repost here my question</tt><tt>
from SO:</tt><br>
</div>
<tt><br>
</tt>
<div class="post-text" itemprop="description">
<pre><code>#lang racket
(define-signature asdf^
(some-class%))
(define-unit asdf@
(import)
(export asdf^)
(define-serializable-class some-class%
(class object%
(inspect #f)
(super-new))))
</code></pre><p><tt>returns error</tt></p>
<pre><code>define-serializable-class: allowed only at the top level or within a module top level
</code></pre><p><tt>which is indeed expectable according to </tt><tt><a href="http://docs.racket-lang.org/reference/objectserialize.html" rel="nofollow"></a></tt><tt>documentation.
<br>
I use units for resolving mutually dependent definitions
(inside procedures bodies). What alternatives do I have to
perform my task? I could run with merging those units or
implementing my own serialization protocol, but it is not good
enough for me.<br>
<br>
</tt></p>
</div>
<tt><br>
</tt>
</div>
____________________<br> Racket Users list:<br> <a href="http://lists.racket-lang.org/users">http://lists.racket-lang.org/users</a><br></blockquote></div><br></body></html>