Is this a supported use of submodules?

#lang racket

(define-syntax (def-wrapped stx)
  (syntax-case stx ()
    [(_ (f arg ...) body ...)
     #'(begin
         (module tmp-module-name racket
           (define (f-tmp arg ...) (displayln "wrapper") body ...)
           (provide (rename-out [f-tmp f])))
         (require (quote tmp-module-name)))]))

(def-wrapped (f x) (+ x 1))
(f 100)


Welcome to DrRacket, version 5.3.1.3 [3m].
Language: racket [custom].
. f: unbound identifier in module in: f
>
_________________________
  Racket Developers list:
  http://lists.racket-lang.org/dev

Reply via email to