[racket] A macro's `require' works in module but not in REPL

From: Greg Hendershott (greghendershott at gmail.com)
Date: Fri Oct 19 11:04:49 EDT 2012

I need to fix a bug, https://github.com/greghendershott/gapi/issues/2 .

I've distilled to a simple case that exhibits the behavior:

;; def.rkt
#lang racket
(provide define-foo)
(define-syntax define-foo
  (lambda (stx)
        (require net/uri-codec)
        (define (#,(datum->syntax stx 'foo))
          (alist->form-urlencoded '([a . "1"]))))))

Posted on the users mailing list.