Can I concentrate procedures from various modules in one module and use
this module in the other modules?

For example, suppose I have these modules:

(define-module (foo)
  #:export (foo-proc))

(define-module (bar)
  #:export (bar-proc))

`foo' is a module that exports procedure `foo-proc' and `bar' is another
module that exports `bar-proc'.

I want to concentrate `foo-proc' and `bar-proc' in a single `quux'
module, and then use this `quux' module in `foo' and `bar'.

(define-module (quux)
  #:use-module (foo)
  #:re-export (foo-proc)
  #:use-module (bar)
  #:re-export (bar-proc))

(define-module (foo)
  #:use-module (quux)
  #:export (foo-proc))

(define-module (bar)
  #:use-module (quux)
  #:export (bar-proc))

Unfortunately on the REPL, when I try to change to module (say) `foo',
there is an `ERROR: Undefined variable: foo-proc'.

Reply via email to