[plt-scheme] Re: Style question

From: Tomasz (tomasz.skutnik at gmail.com)
Date: Tue Jun 2 16:19:36 EDT 2009

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)

(define (name-test2 x)

(provide name-test (rename-out (name-test2 rename-test)))


m2.ss: --8<-------------

#lang scheme

(require "m1.ss")

;; intentional error below


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?


Posted on the users mailing list.