[plt-scheme] Inlined language from a language module

From: Sam TH (samth at ccs.neu.edu)
Date: Fri Mar 20 13:18:52 EDT 2009

On Fri, Mar 20, 2009 at 1:02 PM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> On Fri, Mar 20, 2009 at 10:54 AM, Matthew Flatt <mflatt at cs.utah.edu> wrote:
>> (define-syntax (with-mini stx)
>>  (syntax-case stx ()
>>    [(_ expr)
>>     #`(begin
>>         (require "mini.ss")
>>         #,(strip-context #'expr))]))
> Am I right to assume this only works at the top-level because it
> relies on require?

I think this definition of `with-mini' should work:

(define-syntax (with-mini stx)
    (syntax-case stx ()
      [(_ expr)
       (syntax-local-lift-require "mini.ss"
                                  (strip-context #'expr))]))

but it doesn't seem to:

compile: unbound identifier (and no #%app syntax transformer is bound) in: 1+
sam th
samth at ccs.neu.edu

Posted on the users mailing list.