[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: rfc: `process-define-module': function -> macro ?
From: |
thi |
Subject: |
Re: rfc: `process-define-module': function -> macro ? |
Date: |
Fri, 18 May 2001 10:59:02 -0700 |
From: "Lars J. Aas" <address@hidden>
Date: Fri, 18 May 2001 16:23:13 +0200
I'd like the default renamer to put "simage" into the names, and have
an overriding renamer get non-mangled names like "make-image" and
"image-get" as input. It also ought to be possible for the
overriding renamer to pass the renaming on to the default renamer if
it doesn't want to do anything with that name but also doesn't want
to export it as the un-mangled name. Hope this makes sense...
unfortunately, even w/ (or perhaps because of ;-) heavy caffeine dosage,
i'm not exactly sure that i understand you. are you saying that the
exporting module should export also a "rename hint"? note that in the
current scheme, renaming is done only on import. perhaps you mean
something like this:
;; file larsa/simage.scm
(define-module (larsa simage)
:export (make-image image-get)
:rename-hint (symbol-prefix-proc 'simage:))
(define make-image (...))
(define image-get (...))
=> make-image image-get
;; file user1.scm
(use-modules (larsa simage))
=> make-image image-get
;; file user2.scm
(use-modules (larsa simage))
=> simage:make-image simage:image-get
;; file user3.scm
(use-modules ((larsa simage) :rename (symbol-prefix-proc 'ZIPPY:)))
=> ZIPPY:make-image ZIPPY:image-get
;; file user4.scm
(use-modules ((larsa simage) :rename (symbol-prefix-proc 'ZIPPY:)))
=> ZIPPY:simage:make-image ZIPPY:simage:image-get
here, i use "=>" to mean "the current module sees these bindings". the
different binding sets for same input for user1/user2, and user3/user4
demonstrate my area of confusion.
thi