-#| -*- Mode: Scheme; keyword-style: none -*-
+#| -*-Scheme-*-
Copyright (C) 1986, 1987, 1988, 1989, 1990, 1991, 1992, 1993, 1994,
1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
\f
;;;; SRFI features
-(define :cond-expand
+(define $cond-expand
(spar-transformer->runtime
(delay (scons-rule (cond-expand-pattern) generate-cond-expand))
system-global-environment))
(car p)))
supported-features))
\f
-(define :receive
+(define $receive
(spar-transformer->runtime
(delay
(scons-rule `(,r4rs-lambda-list? any (+ any))
(apply scons-lambda bvl body-forms)))))
system-global-environment))
-(define :define-record-type
+(define $define-record-type
(spar-transformer->runtime
(delay
(scons-rule
field-specs)))))
system-global-environment))
\f
-(define :define
+(define $define
(spar-transformer->runtime
(delay
(spar-or
(define (optional-value-pattern)
`(or any (value-of ,unassigned-expression)))
\f
-(define :let
+(define $let
(spar-transformer->runtime
(delay
(scons-rule
(else
(error "Unrecognized strategy:" named-let-strategy)))))
\f
-(define :let*
+(define $let*
(spar-transformer->runtime
(delay
(scons-rule
(expand-let* scons-let bindings body-forms))))
system-global-environment))
-(define :let*-syntax
+(define $let*-syntax
(spar-transformer->runtime
(delay
(scons-rule
(apply scons-let '() body-forms)
bindings))
-(define :letrec
+(define $letrec
(spar-transformer->runtime
(delay
(scons-rule
(scons-call (apply scons-lambda '() body-forms)))))))
system-global-environment))
-(define :letrec*
+(define $letrec*
(spar-transformer->runtime
(delay
(scons-rule
(scons-call (apply scons-lambda '() body-forms)))))))
system-global-environment))
\f
-(define :case
+(define $case
(spar-transformer->runtime
(delay
(scons-rule
clauses))))))
system-global-environment))
\f
-(define :cond
+(define $cond
(spar-transformer->runtime
(delay
(scons-rule
(else
(error "Unknown clause type:" type)))))
-(define :do
+(define $do
(spar-transformer->runtime
(delay
(scons-rule
bindings)))))))))
system-global-environment))
\f
-(define-syntax :quasiquote
+(define-syntax $quasiquote
(er-macro-transformer
(lambda (form rename compare)
;;; follow. This passes all of the tests except for the one that
;;; detects duplicate bound variables, though.
-(define :and-let*
+(define $and-let*
(spar-transformer->runtime
(delay
(scons-rule
conjunct))))))
system-global-environment))
-(define :access
+(define $access
(spar-transformer->runtime
(delay
(scons-rule
names))))
system-global-environment))
-(define :cons-stream
+(define $cons-stream
(spar-transformer->runtime
(delay (scons-rule `(any any) scons-stream))
system-global-environment))
-(define :cons-stream*
+(define $cons-stream*
(spar-transformer->runtime
(delay
(scons-rule `((+ any))
expr1
(scons-delay expr2)))
-(define :circular-stream
+(define $circular-stream
(spar-transformer->runtime
(delay
(scons-rule `((+ any))
self)))))
system-global-environment))
\f
-(define :define-integrable
+(define $define-integrable
(spar-transformer->runtime
(delay
(spar-or
body-forms)))))))))
system-global-environment))
-(define :fluid-let
+(define $fluid-let
(spar-transformer->runtime
(delay
(scons-rule
swap!)))))))
system-global-environment))
-(define :parameterize
+(define $parameterize
(spar-transformer->runtime
(delay
(scons-rule
(apply scons-lambda '() body-forms))))))
system-global-environment))
\f
-(define-syntax :local-declare
+(define-syntax $local-declare
(syntax-rules ()
((local-declare ((directive datum ...) ...) form0 form1+ ...)
(let ()
(define (unassigned-expression)
`(,keyword:unassigned))
-(define-syntax :begin0
+(define-syntax $begin0
(syntax-rules ()
((begin0 form0 form1+ ...)
(let ((result form0))
form1+ ...
result))))
-(define-syntax :assert
+(define-syntax $assert
(syntax-rules ()
((assert condition . extra)
(if (not condition)
(error "Assertion failed:" 'condition . extra)))))
-(define-syntax :and
+(define-syntax $and
(syntax-rules ()
((and) #t)
((and expr0) expr0)
((and expr0 expr1+ ...) (if expr0 (and expr1+ ...) #f))))
-(define-syntax :when
+(define-syntax $when
(syntax-rules ()
((when condition form ...)
(if condition
(begin form ...)))))
-(define-syntax :unless
+(define-syntax $unless
(syntax-rules ()
((unless condition form ...)
(if (not condition)
(begin form ...)))))
\f
-(define-syntax :define-bundle-interface
+(define-syntax $define-bundle-interface
(sc-macro-transformer
(lambda (form use-env)
(syntax-check '(_ identifier identifier identifier
(output/top-level-syntax-expander transformer->expander-name
transformer)))))))
-(define :sc-macro-transformer
+(define $sc-macro-transformer
;; "Syntactic Closures" transformer
(classifier->runtime
(transformer-classifier sc-macro-transformer->keyword-item
'sc-macro-transformer->expander)))
-(define :rsc-macro-transformer
+(define $rsc-macro-transformer
;; "Reversed Syntactic Closures" transformer
(classifier->runtime
(transformer-classifier rsc-macro-transformer->keyword-item
'rsc-macro-transformer->expander)))
-(define :er-macro-transformer
+(define $er-macro-transformer
;; "Explicit Renaming" transformer
(classifier->runtime
(transformer-classifier er-macro-transformer->keyword-item
'er-macro-transformer->expander)))
-(define :spar-macro-transformer
+(define $spar-macro-transformer
;; "Syntax PARser" transformer
(classifier->runtime
(transformer-classifier spar-macro-transformer->keyword-item
\f
;;;; Core primitives
-(define :begin
+(define $begin
(spar-classifier->runtime
(delay
(spar-call-with-values
(spar* (spar-subform spar-push-deferred-classified))
(spar-match-null)))))
-(define :if
+(define $if
(spar-classifier->runtime
(delay
(spar-call-with-values if-item
(spar-push-value unspecific-item spar-arg:ctx))
(spar-match-null)))))
-(define :quote
+(define $quote
(spar-classifier->runtime
(delay
(spar-call-with-values constant-item
(spar-subform (spar-push-value strip-syntactic-closures spar-arg:form))
(spar-match-null)))))
-(define :quote-identifier
+(define $quote-identifier
(spar-classifier->runtime
(delay
(spar-call-with-values quoted-id-item
spar-arg:form)))
(spar-match-null)))))
\f
-(define :set!
+(define $set!
(spar-classifier->runtime
(delay
(spar-call-with-values
;; special OUTPUT/DISJUNCTION. Unfortunately something downstream in
;; the compiler wants this, but it would be nice to eliminate this
;; hack.
-(define :or
+(define $or
(spar-classifier->runtime
(delay
(spar-call-with-values or-item
(spar* (spar-subform spar-push-classified))
(spar-match-null)))))
-(define :delay
+(define $delay
(spar-classifier->runtime
(delay
(spar-call-with-values delay-item
(spar-subform spar-push-classified)
(spar-match-null)))))
-(define :define-syntax
+(define $define-syntax
(spar-classifier->runtime
(delay
(spar-call-with-values
\f
;;;; Lambdas
-(define :lambda
+(define $lambda
(spar-classifier->runtime
(delay
(spar-call-with-values
(spar-push-subform-if mit-lambda-list? spar-arg:form)
(spar-push-body)))))
-(define :named-lambda
+(define $named-lambda
(spar-classifier->runtime
(delay
(spar-call-with-values
(spar-match-null))
(spar-push-body))))
-(define :let-syntax
+(define $let-syntax
(spar-classifier->runtime spar-promise:let-syntax))
(define keyword:let-syntax
(spar-classifier->keyword spar-promise:let-syntax))
-(define :letrec-syntax
+(define $letrec-syntax
(spar-classifier->runtime
(delay
(spar-call-with-values
(output/access-reference (access-item-name item)
(compile-expr-item (access-item-env item)))))
-(define :the-environment
+(define $the-environment
(spar-classifier->runtime
(delay
(spar-and
\f
;;;; Declarations
-(define :declare
+(define $declare
(spar-classifier->runtime
(delay
(spar-call-with-values
(files "mit-syntax")
(parent (runtime syntax))
(export ()
- (begin :begin)
- (declare :declare)
- (define-syntax :define-syntax)
- (delay :delay)
- (er-macro-transformer :er-macro-transformer)
- (if :if)
- (lambda :lambda)
- (let-syntax :let-syntax)
- (letrec-syntax :letrec-syntax)
- (named-lambda :named-lambda)
- (or :or)
- (quote :quote)
- (quote-identifier :quote-identifier)
- (rsc-macro-transformer :rsc-macro-transformer)
- (sc-macro-transformer :sc-macro-transformer)
- (set! :set!)
- (spar-macro-transformer :spar-macro-transformer)
- (the-environment :the-environment))
+ (begin $begin)
+ (declare $declare)
+ (define-syntax $define-syntax)
+ (delay $delay)
+ (er-macro-transformer $er-macro-transformer)
+ (if $if)
+ (lambda $lambda)
+ (let-syntax $let-syntax)
+ (letrec-syntax $letrec-syntax)
+ (named-lambda $named-lambda)
+ (or $or)
+ (quote $quote)
+ (quote-identifier $quote-identifier)
+ (rsc-macro-transformer $rsc-macro-transformer)
+ (sc-macro-transformer $sc-macro-transformer)
+ (set! $set!)
+ (spar-macro-transformer $spar-macro-transformer)
+ (the-environment $the-environment))
(export (runtime mit-macros)
keyword:access
keyword:define
(files "mit-macros")
(parent (runtime))
(export ()
- (access :access)
- (and :and)
- (and-let* :and-let*)
- (assert :assert)
- (begin0 :begin0)
- (case :case)
- (circular-stream :circular-stream)
- (cond :cond)
- (cond-expand :cond-expand)
- (cons-stream :cons-stream)
- (cons-stream* :cons-stream*)
- (define :define)
- (define-integrable :define-integrable)
- (define-bundle-interface :define-bundle-interface)
- (define-record-type :define-record-type)
- (do :do)
- (fluid-let :fluid-let)
- (let :let)
- (let* :let*)
- (let*-syntax :let*-syntax)
- (letrec :letrec)
- (letrec* :letrec*)
- (local-declare :local-declare)
- (parameterize :parameterize)
- (quasiquote :quasiquote)
- (receive :receive)
- (unless :unless)
- (when :when)
+ (access $access)
+ (and $and)
+ (and-let* $and-let*)
+ (assert $assert)
+ (begin0 $begin0)
+ (case $case)
+ (circular-stream $circular-stream)
+ (cond $cond)
+ (cond-expand $cond-expand)
+ (cons-stream $cons-stream)
+ (cons-stream* $cons-stream*)
+ (define $define)
+ (define-integrable $define-integrable)
+ (define-bundle-interface $define-bundle-interface)
+ (define-record-type $define-record-type)
+ (do $do)
+ (fluid-let $fluid-let)
+ (let $let)
+ (let* $let*)
+ (let*-syntax $let*-syntax)
+ (letrec $letrec)
+ (letrec* $letrec*)
+ (local-declare $local-declare)
+ (parameterize $parameterize)
+ (quasiquote $quasiquote)
+ (receive $receive)
+ (unless $unless)
+ (when $when)
get-supported-features))
(define-package (runtime syntax syntax-rules)