guile-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: srfi-18 requirements


From: Julian Graham
Subject: Re: srfi-18 requirements
Date: Mon, 15 Oct 2007 18:26:35 -0400

Alright, so I've completed the parts of SRFI-18 that absolutely needed
to be written in C.  I didn't modify the signatures of any existing
parts of the API, although I did add some new functions and change
behavior in a few places where I don't think it'll affect too many
people (and which I'll describe at length once I've got things rolled
up into a patch).

Now I'm working on the things that can be implemented in Scheme.
SRFI-18 defines a few functions whose names conflict with some of
Guile's built-in primitives -- e.g., make-mutex and
make-condition-variable -- and which have slightly different behavior
(SRFI-18 make-condition-variable takes an optional argument that you
can use to "name" the condition var).  To work around this, I was
going to create backup bindings of the original primitives and then
refer to them in my scheme reimplementations, a la:

(define guile:make-condition-variable make-condition-variable)
(define (make-condition-variable . foo)
  (let ((m (guile:make-condition-variable))) (do-something)))

...and even if the user noticed the slightly different behavior, that
would be okay, because she'd specifically requested it by loading
(srfi srfi-18).

Unfortunately, it doesn't seem possible to refer to a top-level
primitive function from within a module body.  I get "Unbound
variable: make-condition-variable."  What am I doing wrong?
(Strangely enough, this doesn't seem to be an issue for 'make-mutex'.)


Regards,
Julian




reply via email to

[Prev in Thread] Current Thread [Next in Thread]