www

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

orig.rkt (671B)


      1 #lang racket/base
      2 (require scribble/manual
      3          (for-template syntax/parse
      4                        syntax/parse/experimental/template
      5                        racket/syntax)
      6          (for-syntax racket/base
      7                      racket/syntax))
      8 (define-syntax (mk stx)
      9   (syntax-case stx ()
     10     [(_ id)
     11      (with-syntax ([orig: (format-id #'id "orig:~a" #'id)])
     12        #'(begin
     13            (define orig: (racket id))
     14            (provide orig:)))]))
     15 (define-syntax-rule (mk* id ...) (begin (mk id) ...))
     16      
     17 (mk* syntax-parse syntax-case with-syntax template quasitemplate syntax
     18      unsyntax quasisyntax ?? ?@ template/loc quasitemplate/loc #%app
     19      #%top begin let)