public inbox for kawa@sourceware.org
 help / color / mirror / Atom feed
* synchronized in r7rs library
@ 2014-12-28 21:49 Seth Alves
  2014-12-28 22:18 ` Per Bothner
  0 siblings, 1 reply; 4+ messages in thread
From: Seth Alves @ 2014-12-28 21:49 UTC (permalink / raw)
  To: kawa mailing list

[-- Attachment #1: Type: text/plain, Size: 461 bytes --]

Calling (synchronized ...) from inside an r7rs library fails.

     -seth

$ ./kawa-r7rs-sync.scm
./kawa-r7rs-sync.scm:12:7: warning - no declaration seen for synchronized
Argument  '#<macro synchronized>' to 'apply-to-args' has wrong type 
(kawa.lang.Macro) (expected: procedure)
     at gnu.kawa.functions.ApplyToArgs.applyN(ApplyToArgs.java:165)
     at gnu.mapping.ProcedureN.apply3(ProcedureN.java:48)
     at blerg.foo(kawa-r7rs-sync.scm:12)
     ...





[-- Attachment #2: kawa-r7rs-sync.scm --]
[-- Type: text/x-scheme, Size: 284 bytes --]

#! /bin/sh
#| -*- scheme -*-
exec /usr/local/bin/kawa $0 "$@"
|#

(define-library (blerg)
  (export foo)
  (import (scheme base))
  (begin
    (define lock-var #t)
    (define (foo)
      (synchronized lock-var
                    #t))))

(import (scheme base)
        (blerg))
(foo)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-12-29  1:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-28 21:49 synchronized in r7rs library Seth Alves
2014-12-28 22:18 ` Per Bothner
2014-12-29  0:31   ` Seth Alves
2014-12-29  1:56     ` Per Bothner

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).