[racket] serializable class definition inside unit body
Can you lift the class to the #lang module level? If not, why not?
On Jun 9, 2014, at 5:37 AM, seryojka wrote:
> Hello, I'll repost here my question from SO:
>
> #lang racket
>
> (define-signature asdf^
> (some-class%))
>
> (define-unit asdf@
> (import)
> (export asdf^)
>
>
> (define-serializable-class some-class%
> (class object%
> (inspect #f)
> (super-new))))
> returns error
>
> define-serializable-class: allowed only at the top level or within a module top level
> which is indeed expectable according to documentation.
> 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.
>
>
>
> ____________________
> Racket Users list:
> http://lists.racket-lang.org/users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140609/e37706d4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4463 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20140609/e37706d4/attachment.p7s>