[<<][meta][>>][..]
Thu May 9 10:54:24 EDT 2013

#lang vs. macro

Hi list,

I have a "#lang s-exp" that has #%app redefined, but I would like the
ability to embed it into a macro.  E.g.

  #lang s-exp
  ...
  (f a)   ;; special application

vs.

  #lang racket
  ...
  (g x)           ;; normal application
  (my-lang (f a)) ;; special application

I tried an approach using
   (let-syntax ((#%app ...)) ...)
which gives trouble.

FIXME: what trouble?


It might be simpler just to use submodules:

;; stream syntax submodule
(define-syntax (begin-stream stx)
  (syntax-case stx ()
    ((begin-stream form ...)
     #`(begin
         (module stream-forms "stream.rkt"
           (provide (all-defined-out))
           form ...)
         #,(datum->syntax
            stx '(require 'stream-forms))))))



[Reply][About]
[<<][meta][>>][..]