[plt-scheme] problems with structures in extensions

From: Alex Ott (ott at jet.msk.su)
Date: Fri Jul 23 05:47:50 EDT 2004


I'm have a problem creating structure type in mzscheme extension. See
attached file mzexts.c. 
The instance constructor, filed accessors, etc. works fine:

Welcome to MzScheme version 299.11, Copyright (c) 2004 PLT Scheme, Inc.
> (require "mzexts")    
> (define s (make-str 1 2 3))
> s
> (str? s)
> (str-fa s)

But I can't create the subtype of this structure type:

> (define-struct (str2 str) (fc fd))
stdin::69: define-struct: parent struct type not defined at: str in: (define-struct (str2 str) (fc fd))
> (define-struct (str2 struct:str) (fc fd))
stdin::104: define-struct: parent struct type not defined at: struct:str in: (define-struct (str2 struct:str) (fc fd))

What is wrong in my extension?


-------------- next part --------------
A non-text attachment was scrubbed...
Name: mzexts.c
Type: application/octet-stream
Size: 1159 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20040723/7128ccad/attachment.obj>
-------------- next part --------------

With best wishes, Alex Ott
Jet Infosystems,       http://www.jetinfosoft.ru/
                       +7 (095) 411 76 01

Posted on the users mailing list.