Ludovic,

Just one remaining loose end from your previous email ...

> As for circular dependencies, I think there's nothing special here: the
> problem is the same as for any other binding.

Strictly no, there's nothing special, but in practice there is.  This
is because modules normally consist mostly of defines which delay the
evaluation of their procedure bodies ... which generally allows
circular dependencies not to be a problem.  In the reader case,
however, the reader is used during the initial evaluation of the
module code.

So for example:

  (define-module (A)         | (define-module (B)
    #:use-module (B)         |   #:use-module (A)
    #:export (a-proc))       |   #:export (b-proc))
                             |
  (define (a-proc) b-proc)   | (define (b-proc) a-proc)

is fine, but

  (define-module (A)         | (define-module (B)
    #:use-module (B)         |   #:use-module (A)
    #:reader b-reader        |   #:export (b-reader))
    #:export (a-proc))       |
                             |
  (define (a-proc) ...)      | (define (b-reader) ...)

is only OK if the loading of (A) is initiated before that of (B).

Regards,
        Neil



_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel

Reply via email to