unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Jan Nieuwenhuizen <janneke-list@xs4all.nl>
To: Andy Wingo <wingo@pobox.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: implicitly using existing function as generic fails in 1.9
Date: Fri, 11 Feb 2011 19:53:06 +0100	[thread overview]
Message-ID: <1297450386.2325.263.camel@vuurvlieg> (raw)
In-Reply-To: <m3ei7ecvi7.fsf@unquote.localdomain>

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

Andy Wingo schreef op vr 11-02-2011 om 18:48 [+0100]:
> On Wed 02 Feb 2011 15:02, Jan Nieuwenhuizen <janneke-list@xs4all.nl> writes:
> 
> >     WARNING: (use): `remove!' imported from both (remove) and (srfi srfi-1)
> 
> As far as I can tell, it never worked to merge generics between a
> regular procedure and a generic.

> And indeed that does not appear to work with 1.8.

I'm attaching the individual files; this works with 1.8.7:

    19:52:20 janneke@vuurvlieg:~/vc/schikkers-list/remove
    $ ./run.scm 
    WARNING: (use): `remove!' imported from both (srfi srfi-1) and (remove)
    <class>: remove!
    19:52:24 janneke@vuurvlieg:~/vc/schikkers-list/remove

> I don't understand what's going on here, really.  Do you?

No, and if you say it's not supported, I'll just have to
choose other names for those functions.

Jan.

-- 
Jan Nieuwenhuizen <janneke@gnu.org> | GNU LilyPond http://lilypond.org
Freelance IT http://JoyofSource.com | Avatar®  http://AvatarAcademy.nl  

[-- Attachment #2: use.scm --]
[-- Type: text/x-scheme, Size: 180 bytes --]

(define-module (use)
  #:use-module (oop goops)
  #:use-module (srfi srfi-1)
  #:use-module (remove)
  #:export (main))

(define obj (make <cls>))

(define (main)
  (remove! obj))

[-- Attachment #3: run.scm --]
[-- Type: text/x-scheme, Size: 122 bytes --]

#! /bin/sh
# -*- scheme -*-
exec guile --debug -L $(dirname $0) -s $0 "$@"
!#

;;(use-modules
;; (use))

((@ (use) main))

[-- Attachment #4: remove.scm --]
[-- Type: text/x-scheme, Size: 246 bytes --]


(define-module (remove)
  #:use-module (oop goops)
  #:use-module (srfi srfi-1)
  #:duplicates (merge-generics)
  #:export (<cls>
	    remove!))

(define-class <cls> ())

(define-method (remove! (self <cls>))
  (format #t "<class>: remove!\n"))

  reply	other threads:[~2011-02-11 18:53 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-02 14:02 implicitly using existing function as generic fails in 1.9 Jan Nieuwenhuizen
2011-02-11 17:48 ` Andy Wingo
2011-02-11 18:53   ` Jan Nieuwenhuizen [this message]
2011-02-12 10:32     ` Andy Wingo
2011-05-23 20:42 ` Andy Wingo

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=1297450386.2325.263.camel@vuurvlieg \
    --to=janneke-list@xs4all.nl \
    --cc=guile-devel@gnu.org \
    --cc=wingo@pobox.com \
    /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).