Re: r7rs and c-wrapper
Shiro Kawai <[email protected]> Sun, 6 Oct 2024 20:50:30 -1000
| Newsgroups | gmane.lisp.scheme.gauche |
|---|---|
| Message-ID | <CALN0JNHHDP773yKqCBwr6WjbfogDhezKQSt4nEox2Ew9bU=ypg@mail.gmail.com> |
I see. c-load calls %c-include, which tries to eval '(import c-wrapper.sandbox.1) in the target module, which defaults to the current module. If your current module is seeing R7RS import, it complains. Let me think what's the best way to address it. --shiro On Sun, Oct 6, 2024 at 12:25 AM Jens Thiele <[email protected]> wrote: > Hi, > > somehow c-wrapper doesn't work correctly in r7rs mode: > > $ gosh -r7 > gosh[r7rs.user]> (import (gauche keyword)) > gosh[r7rs.user]> (import (c-wrapper)) > gosh[r7rs.user]> (c-load "stdio.h" :module #f) > #<undef> > gosh[r7rs.user]> (printf "hello world!\n") > hello world! > 13 > gosh[r7rs.user]> (c-load "stdio.h") > *** ERROR: improper list not allowed: c-wrapper.sandbox.1 > While compiling: (import c-wrapper.sandbox.1) > Stack Trace: > _______________________________________ > 0 (report-error e) > 1 (map ($ (cut regexp-replace-all #/\./ <> "..") $ stringify $) ... > 2 (string-join #:G129 ".") > 3 (library-name->module-name import-set) > at "/usr/share/gauche-0.98/0.9.14/lib/r7rs-setup.scm":87 > 4 (rec (unwrap-syntax import-set)) > at "/usr/share/gauche-0.98/0.9.14/lib/r7rs-setup.scm":88 > 5 (proc (car xs)) > 6 (apply map f lis lists) > 7 (append-map %transfer-import-spec import-sets) > at "/usr/share/gauche-0.98/0.9.14/lib/r7rs-setup.scm":60 > 8 ((macro-transformer mac) expr cenv) > 9 (call-macro-expander gval program cenv) > 10 (pass1 program cenv) > 11 (thunk) > 12 (eval expr env) > at "/usr/share/gauche-0.98/0.9.14/lib/gauche/interactive.scm":359 > 13 (evaluator exp (vm-current-module)) > 14 (with-error-handler (^e (report-error e) #t) (^ () (let loop2 ... > > greetings > jens > > > _______________________________________________ > Gauche-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/gauche-devel > _______________________________________________ Gauche-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/gauche-devel