Hello Ludovic,

> >     david@rascar:~ 8 $ guile
> >     GNU Guile 2.0.0.160-39be
> 
> I think commit ad4bd7c2c0c931a91160772e5ebf40af0f471874 (in 2.0.2) fixes
> this.  Can you check with 2.0.2?

  [I should have pulled the latest off course, I am sorry]

I slightly modified the mg-*.scm files:

        mg-1 and mg-2:

        [a]     did not need to use :duplicates;
        [b]     I commented out define-generic, on purpose, since it is my
                understanding [is it right?] that :accessor will do it for me;

        mg-3:

        [c]     added (ice-9 format) in mg-3 since it did show
                'another' [maybe] problem.

I got the same errors:

1] with (ice-9 format):

david@asterix:/usr/local/share/guile/alto/2.0/tests 1 $ guile
GNU Guile 2.0.2.3-21b6d
...
scheme@(guile-user)> (use-modules (mg-3))
(letstry)

mg-3.scm:19:2: In procedure letstry:
mg-3.scm:19:2: In procedure module-lookup: Unbound variable: format

Entering a new prompt.  Type `,bt' for a backtrace or `,q' to continue.

2] without:

..
(use-modules (mg-3))                                                            
                        
(letstry)                                                                       
                        
..
mg-3.scm:19:30: In procedure letstry:
mg-3.scm:19:30: In procedure module-lookup: Unbound variable: dialog


Cheers,
David
(define-module (mg-1)
  :use-module (oop goops)

  :duplicates (merge-generics)

  :export (<widget-a>
	    dialog
	    ))


(define-generic dialog)

(define-class <widget-a> ()
  (dialog :accessor dialog :init-keyword :dialog :init-value 'dialog-a)
  )

(define-module (mg-2)
  :use-module (oop goops)

  :duplicates (merge-generics)

  :export (<widget-b>
	    dialog
	    ))

(define-generic dialog)

(define-class <widget-b> ()
  (dialog :accessor dialog :init-keyword :dialog :init-value 'dialog-b)
  )


(define-module (mg-3)
  :use-module (ice-9 format)
  :use-module (oop goops)
  :use-module (mg-1)
  :use-module (mg-2)

  :duplicates (merge-generics)

  :export (a
	   b
	   letstry))


(define a (make <widget-a>))
(define b (make <widget-b>))

(define (letstry)
  (format #t "Dialog a: ~S~%" (dialog a))
  (format #t "Dialog b: ~S~%" (dialog b)))


#!

(use-modules (macros push))
(push! "/usr/local/share/guile/alto/2.0/tests"
       %load-path)

(use-modules (mg-3))
(letstry)

!#

Reply via email to