[plt-scheme] Re: Style question
On Jun 2, 9:47 pm, Eli Barzilay <e... at barzilay.org> wrote:
> Yes, `procedure-rename' doesn't work with keyword functions yet (it
> works at the low-level). But in any case, I think that in your case
> renaming the provided name is easier.
>
Well... not quite. (provide (rename-out (internal-name external-
name))) does not modify debugging information. Consider:
m1.ss: --8<-------------
#lang scheme
(define (name-test)
'name-test)
(define (name-test2 x)
'name-test2)
(provide name-test (rename-out (name-test2 rename-test)))
--8<-------------
m2.ss: --8<-------------
#lang scheme
(require "m1.ss")
(name-test)
;; intentional error below
(rename-test)
--8<-------------
Running m2.ss produces following error:
procedure name-test2: expects 1 argument, given 0
Which *is* confusing for end-user... Am I doing something wrong?
Tomasz