(module method mzscheme (require "require.ss") (require-class) (provide (all-defined)) (require-for-syntax "syntax.ss") (require-for-template (lib "plt-mzscheme.ss" "lang") (lib "class.ss")) (define-syntax (define/export stx) (syntax-case stx () [(_ MODE PREFIX NAME EXPR) (identifier? #'NAME) (with-syntax ([INTERNAL (syntax-concat #'PREFIX #'NAME)]) #'(begin (MODE [INTERNAL NAME]) (define INTERNAL EXPR)))] [(_ MODE PREFIX (NAME . ARGS) BODY MORE ...) (identifier? #'NAME) (with-syntax ([INTERNAL (syntax-concat #'PREFIX #'NAME)]) #'(begin (MODE [INTERNAL NAME]) (define (INTERNAL . ARGS) BODY MORE ...)))])) (define-syntax (define/public/pre stx) (syntax-case stx () [(_ . REST) #'(define/export public . REST)])) (define-syntax (define/override/pre stx) (syntax-case stx () [(_ . REST) #'(define/export override . REST)])) (define-syntax (define/augment/pre stx) (syntax-case stx () [(_ . REST) #'(define/export augment . REST)])) (define-syntax (define/pubment/pre stx) (syntax-case stx () [(_ . REST) #'(define/export pubment . REST)])) (define-syntax (define/overment/pre stx) (syntax-case stx () [(_ . REST) #'(define/export overment . REST)])) (define-syntax (define/augride/pre stx) (syntax-case stx () [(_ . REST) #'(define/export augride . REST)])) (define-syntax (define/public-final/pre stx) (syntax-case stx () [(_ . REST) #'(define/export public-final . REST)])) (define-syntax (define/override-final/pre stx) (syntax-case stx () [(_ . REST) #'(define/export override-final . REST)])) (define-syntax (define/augment-final/pre stx) (syntax-case stx () [(_ . REST) #'(define/export augment-final . REST)])) )