[gambit-list] Bug

Marc Feeley feeley at iro.umontreal.ca
Fri May 11 07:57:15 EDT 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1


On 11-May-07, at 7:34 AM, Marc Feeley wrote:

> Another way to avoid name clashes is to use Gambit's "namespace"
> declaration.

Forgot to mention that, of course, there is also Snow:

- -------------------------------------------------------
;;; File: "brad.scm"
(package* brad/v1.0.0
  (provide:
   (define (foo x))
   (define (vector-copy y))))

(define (foo x) 999)
(define (vector-copy y) (list->vector (baz (vector->list y))))
(define (baz z) (reverse z)) ;; baz is a private function
- -------------------------------------------------------

To use this module from the file "client.scm" you need to do:

- -------------------------------------------------------
;;; File: "client.scm"
(package* client/v1.0.0
  (require: brad/v1))

(pp (vector-copy '#(1 2 3))) ;; calls brad#vector-copy
- -------------------------------------------------------

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)

iD8DBQFGRFob//V9Zc2T/v4RAmx8AKCoxXApX0s8XVDpsnr8eg9WIbWgogCgt103
+g5lWqRQg8+TQVO9H8ONuGM=
=1ej7
-----END PGP SIGNATURE-----



More information about the Gambit-list mailing list