guile-user
[Top][All Lists]
Advanced

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

Re: namespaces, goops, etc.


From: Michael Livshin
Subject: Re: namespaces, goops, etc.
Date: 03 Nov 2000 23:07:51 +0200
User-agent: Gnus/5.0807 (Gnus v5.8.7) XEmacs/21.1 (20 Minutes to Nikko)

"Lars J. Aas" <address@hidden> writes:

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

[ I wonder why all my blind assumptions turn out wrong today? ]

mea culpa.

but it *should* work, I think.  ditto for `define-class'.

should ask Mikael if this is supposed to be this way...

> 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...

this works for me:

(define-generic foo)

(define (hiho)
  (add-method! foo (method ((x <top)) x)))

and yes, tested this time ;).

sorry,
--mike

-- 
Every program is a part of some other program and rarely fits.
                -- Alan Perlis




reply via email to

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