[gambit-list] various
Christian Jaeger
christian at pflanze.mine.nu
Wed Nov 5 13:09:23 EST 2008
David St-Hilaire wrote:
> Christoph Bauer wrote:
>
>> - is there a way to copy a record (define-structure) or
>> to convert it to a list, like table-copy and table->list? for tables
>>
For copying, there happens to be a function in the Gambit _io part which
does what you want:
(define-prim (##readtable-copy rt)
(let ((copy (##vector-copy rt)))
(##subtype-set! copy (macro-subtype-structure))
copy))
so you could just use that one.
For turning into a list, you can mis-use |##vector->list|.
Note that those don't do type checking so be sure you actually pass them
a structure (check with |##structure?|).
> The syntax-case form is not supported by default by gambit-c, it is rather the
> "lower level" define-macro form which is used. If you want to use syntax-case
> macros, you have to include it with:
>
> (include "~~/syntax-case.scm")
>
This should probably be:
(load "~~/syntax-case")
without the suffix, so it can be compiled (like with '(compile-file
(path-expand "~~/syntax-case")) ) and the compiled object is loaded.
Christian.
More information about the Gambit-list
mailing list