Hi, (No need to post to both lists.)
schemer <[EMAIL PROTECTED]> writes: > ;; ------------------------------ > ;; file a.scm > (define-module (a) > #:use-module (oop goops) > #:duplicates merge-generics) > > (define-class <a> () > (a > #:init-value 0 > #:getter /val)) > > (export <a> /val) > > ;; ------------------- > ;; file ab.scm > (define-module (ab) > #:use-module (oop goops) > #:use-module (a) > #:use-module (ice-9 pretty-print) > #:duplicates merge-generics) > > (define-class <ab> () > (ab > #:init-value 0 > #:getter /val)) > > (pretty-print (generic-function-methods /val)) > > (export /val <ab>) Guile's behavior is admittedly unclear, but your example is wrong: module `(ab)' shouldn't export `/val' since it is just adding a new method to the existing generic bound to `/val'. Thus it should either, not export it, or just re-export it: ===File ~/tmp/guilish/ab.scm================================ ;; ------------------- ;; file ab.scm (define-module (ab) #:use-module (oop goops) #:use-module (a) #:use-module (ice-9 pretty-print)) (define-class <ab> () (ab #:init-value 0 #:getter /val)) (pretty-print (generic-function-methods /val)) (export <ab>) (re-export /val) ============================================================ This fixes the problem: $ guile -L . guile> (module-ref (resolve-module '(ab)) '/val) (#<<accessor-method> (<ab>) b72cc200> #<<accessor-method> (<a>) b72daf00>) #<<generic> /val (2)> Thanks, Ludovic. _______________________________________________ Guile-user mailing list Guile-user@gnu.org http://lists.gnu.org/mailman/listinfo/guile-user