guile-devel
[Top][All Lists]
Advanced

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

Re: Several questions.


From: Neil Jerram
Subject: Re: Several questions.
Date: 21 Apr 2001 10:53:39 +0100
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

>>>>> "Dirk" == Dirk Herrmann <address@hidden> writes:

    Dirk> The problem comes from the fact that SCM_DEBUG=1 also makes
    Dirk> sure that no deprecated code is compiled into guile.  But,
    Dirk> we don't have a possibility yet to make sure that deprecated
    Dirk> code is also taken out from the scheme code.  Therefore, the
    Dirk> problem that you have encountered indicates that there is a
    Dirk> scheme level reference to something that is deprecated on
    Dirk> the C level.  Unfortunately, the scheme reference cannot
    Dirk> easily be removed without breaking backwards compatibility.

*top-level-lookup-closure* is used by set-current-module in
boot-9.scm.  But doesn't our definition of deprecation mean that there
must be an alternative, non-deprecated way of achieving the same
thing?  So it should be possible to rewrite set-current-module without
referring to *top-level-lookup-closure*.

Or is set-current-module deprecated as well?  In this case, we could
enhance `call-with-deprecation' such that, if the variable
`inhibit-deprecated-calls' is non-#f, it doesn't call its thunk at
all, and then rewrite set-current-module like this:

(define (set-current-module m)
  (call-with-deprecation
   "set-current-module is deprecated; stick with the one you have already."
   (lambda ()
     (fluid-set! the-module m)
     (if m
         (begin
           ;; *top-level-lookup-closure* is now deprecated
           (fluid-set! *top-level-lookup-closure*
                       (module-eval-closure (fluid-ref the-module)))
           (fluid-set! scm:eval-transformer (module-transformer (fluid-ref 
the-module))))
         (fluid-set! *top-level-lookup-closure* #f))))

I don't think this actually applies in the `set-current-module' case,
as I'm pretty sure it's not supposed to be deprecated, but this
mechanism could be used for other Scheme level deprecations to avoid
attempting to reference variables that don't exist because of
deprecations in C.

Regards,
        Neil



reply via email to

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