Last active
July 27, 2016 17:49
-
-
Save KoviRobi/e708da67d38f1a505293742c9d2647e9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (mbe a) | |
#:use-module (oop goops) | |
#:export (x y)) | |
(define-generic x) | |
(define-generic y) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (mbe b1) | |
#:use-module (oop goops) | |
#:use-module (mbe a) | |
#:export (<a> y)) | |
(define-class <a> ()) | |
(define-method (y (a <a>)) | |
(x a)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (mbe c1) | |
#:use-module (oop goops) | |
#:use-module (mbe a) | |
#:use-module (mbe b1) | |
#:export (<b> x)) | |
(define-class <b> (<a>)) | |
(define-method (x (b <b>)) | |
'b) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(define-module (mbe test) | |
#:use-module (oop goops) | |
#:use-module (mbe a) | |
#:use-module (mbe b1) | |
#:use-module (mbe c1) | |
#:duplicates (merge-generics)) | |
(y (make <b>)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When I put each module in their respective files, so that they are in %load-path, and type
(use-modules (mbe test))
in guile, I getWhen I don't use separate modules, but just type the following in at the repl, it works