[plt-scheme] module-begin macro

From: Mike T. Machenry (dskippy at ccs.neu.edu)
Date: Thu Apr 22 11:45:57 EDT 2004

Can anyone tell me why this code gives me:

define-values: identifier for a module-body definition already has a
different module context in: start
        
(module language mzscheme
  (provide (rename my:#%module-begin #%module-begin))
  (define-syntax (my:#%module-begin stx)
    (syntax-case stx (control)
      [(_ before ... (control inside ...))
       #'(#%module-begin
          (require mzscheme)
          (require-for-syntax mzscheme)
          before ...
          (define (start request)
            inside ...))])))

(module test language
  (control 'foo))

I'm trying to make a module language that will make any module in that
language define and provide start.

-mike


Posted on the users mailing list.