guile-user
[Top][All Lists]
Advanced

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

possible bug while exporting generics


From: schemer
Subject: possible bug while exporting generics
Date: Thu, 2 Aug 2007 13:52:55 +0530

Greetings

I am not sure if I am missing something but I have observed strange
behaviour while exporting generics from modules. I have tried to
replicate this in the small example pasted below. Basically generics
are sometimes not getting exported when they are extended after
importing from other modules.

Can anybody please confirm that this is a bug?

Thanks and Regards
Puneet

------------------------

$ guile
guile> (version)
"1.8.2"
guile> (use-modules (ab))
(#<<accessor-method> (<ab>) b79ccb80>
 #<<accessor-method> (<a>) b79ac860>)
guile> (generic-function-methods /val)

Backtrace:
In current input:
   3: 0* (generic-function-methods /val)

<unnamed port>:3:1: In expression (generic-function-methods /val):
<unnamed port>:3:1: Unbound variable: generic-function-methods
ABORT: (unbound-variable)


;; ------------------------------
;; file a.scm
(define-module (a)
  #:use-module (oop goops)
  #:duplicates merge-generics)

(define-class <a> ()
  (a
   #:init-value 0
   #:getter /val))

(export <a> /val)

;; -------------------
;; file ab.scm
(define-module (ab)
  #:use-module (oop goops)
  #:use-module (a)
  #:use-module (ice-9 pretty-print)
  #:duplicates merge-generics)

(define-class <ab> ()
  (ab
   #:init-value 0
   #:getter /val))

(pretty-print (generic-function-methods /val))

(export /val <ab>)




reply via email to

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