unofficial mirror of bug-guile@gnu.org 
 help / color / mirror / Atom feed
From: David Pirotte <david@altosw.be>
To: ludo@gnu.org (Ludovic Courtès)
Cc: bug-guile@gnu.org
Subject: Re: module system / (oop goops) / :duplicates (merge-generics) / bug?
Date: Wed, 6 Jul 2011 16:22:44 -0300	[thread overview]
Message-ID: <20110706162244.2bf4b90a@rascar> (raw)
In-Reply-To: <87vcvfcrjc.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1288 bytes --]

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

[-- Attachment #2: mg-1.scm --]
[-- Type: text/x-scheme, Size: 256 bytes --]


(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)
  )


[-- Attachment #3: mg-2.scm --]
[-- Type: text/x-scheme, Size: 256 bytes --]


(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)
  )



[-- Attachment #4: mg-3.scm --]
[-- Type: text/x-scheme, Size: 486 bytes --]


(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	other threads:[~2011-07-06 19:22 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-05 21:32 module system / (oop goops) / :duplicates (merge-generics) / bug? David Pirotte
2011-07-06 16:17 ` Ludovic Courtès
2011-07-06 19:22   ` David Pirotte [this message]
2011-07-07 11:37     ` Andy Wingo
2011-07-07 16:26       ` David Pirotte
2011-07-07 20:59         ` Andy Wingo
2011-07-08 17:05           ` David Pirotte
2011-07-09 10:02             ` Andy Wingo
2011-07-09 15:08               ` David Pirotte
2011-07-11 15:49                 ` Andy Wingo
2011-07-12  1:25                   ` David Pirotte
2011-08-18 11:01                     ` Andy Wingo
2011-08-19  5:40                       ` David Pirotte
2011-08-29 17:05                         ` David Pirotte
2011-08-30  2:56                           ` David Pirotte
2011-09-02 11:26                           ` Andy Wingo
2011-09-06 15:41                             ` David Pirotte
2011-08-03 12:28                   ` David Pirotte

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110706162244.2bf4b90a@rascar \
    --to=david@altosw.be \
    --cc=bug-guile@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).