[racket] make-rename-transformer and all-defined-out

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Feb 4 11:45:12 EST 2014

Hi All,

I have attempted to define a shorthand for define like this:

    (define-syntax def  (make-rename-transformer #'define))

For most purposes it seems to work, but I have problems with all-defined-out.

soegaard$ cat def.rkt
#lang racket
(provide (all-defined-out) def)
(define-syntax def  (make-rename-transformer #'define))

soegaard$ cat bug.rkt
#lang racket
(require "def.rkt")
(provide (all-defined-out))

soegaard$ ~/racket-jan-30/racket/racket/bin/racket
Welcome to Racket v6.0.0.1.
> (require "bug.rkt")
> (def x 42)
def: undefined;
 cannot reference undefined identifier

Am I misusing make-rename-transformer or is this supposed to work?

Jens Axel Søgaard

Jens Axel Søgaard

Posted on the users mailing list.