Welcome to the CHICKEN Scheme pasting service

strangeness with coops part3 added by megane on Fri May 18 12:11:45 2012

(require-extension coops)
(define-class <a>)
 (define-method (foo (i <a>))
   (print "foo v1"))

(define obj (make <a>))
(foo obj)

(define-class <a>)
 (define-method (foo (i <a>))
   (print "foo v2"))

(foo obj)

;; Output:
;; foo v1
;; foo v1 <- this is OK

;; Now, same with modules:

(module a
 *
 (import chicken scheme)
 (use coops)
 (define-class <a>)
 (define-method (foo (i <a>))
   (print "foo v1"))
 )

(import a)

(define obj (make <a>))
(foo obj)

(module a
 *
 (import chicken scheme)
 (use coops)
 (define-class <a>)
 (define-method (foo (i <a>))
   (print "foo v2"))
 )

(foo obj)

;; Output:
;; foo v1
;; Error: (foo) no method defined for given argument classes: (#<coops standard-class `<a>'>)

Your annotation:

Enter a new annotation:

Your nick:
The title of your paste:
Your paste (mandatory) :
Which module provides `foreign-declare'?
Visually impaired? Let me spell it for you (wav file) download WAV