guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespaces, goops, etc.


From: Lars J. Aas
Subject: Re: namespaces, goops, etc.
Date: Fri, 3 Nov 2000 22:02:36 +0100
User-agent: Mutt/1.2.5i

On Fri, Nov 03, 2000 at 10:43:01PM +0200, Michael Livshin wrote:
: but the following works, but has different semantics (the semantics
: you actually asked for):
: 
: (define (hiho)
:   ;; define the generic locally:
:   (define-generic foo)
:   ;; now happily specialize it:
:   (define-method foo ((x <top>) x)))

Sorry, but I always get the same error whatever I try (guile 1.4, goops 0.9):

guile> (define (hiho)
  ;; define the generic locally:
  (define-generic foo)
  ;; now happily specialize it:
  (define-method foo ((x <top>) x)))
guile> (hiho)
ERROR: In procedure cadr:
ERROR: Wrong type argument in position 1: (address@hidden foo)
ABORT: (wrong-type-arg)

This, and the fact that I read somewhere that evaluation in the toplevel
environment was required, made me believe this wasn't possible...  I've also
tried with add-method! without success.  There's probably a syntax error
if what I've tried, but I can't spot it...

  Lars J



reply via email to

[Prev in Thread] Current Thread [Next in Thread]