1 |
;;;; Copyright (C) 1997, 2000, 2001 Free Software Foundation, Inc. |
;;;; Copyright (C) 1997, 2000, 2001, 2002 Free Software Foundation, Inc. |
2 |
;;;; |
;;;; |
3 |
;;;; This program is free software; you can redistribute it and/or modify |
;;;; This program is free software; you can redistribute it and/or modify |
4 |
;;;; it under the terms of the GNU General Public License as published by |
;;;; it under the terms of the GNU General Public License as published by |
44 |
(define-module (ice-9 syncase) |
(define-module (ice-9 syncase) |
45 |
:use-module (ice-9 debug) |
:use-module (ice-9 debug) |
46 |
:use-module (ice-9 threads) |
:use-module (ice-9 threads) |
47 |
:export-syntax (sc-macro define-syntax eval-when fluid-let-syntax |
:export-syntax (sc-macro define-syntax define-syntax-public |
48 |
|
eval-when fluid-let-syntax |
49 |
identifier-syntax let-syntax |
identifier-syntax let-syntax |
50 |
letrec-syntax syntax syntax-case syntax-rules |
letrec-syntax syntax syntax-case syntax-rules |
51 |
with-syntax |
with-syntax |
100 |
(define include sc-macro) |
(define include sc-macro) |
101 |
|
|
102 |
(define primitive-syntax '(quote lambda letrec if set! begin define or |
(define primitive-syntax '(quote lambda letrec if set! begin define or |
103 |
and let let* cond do quasiquote unquote |
and let let* cond do quasiquote unquote |
104 |
unquote-splicing case)) |
unquote-splicing case)) |
105 |
|
|
106 |
(for-each (lambda (symbol) |
(for-each (lambda (symbol) |
107 |
(set-symbol-property! symbol 'primitive-syntax #t)) |
(set-symbol-property! symbol 'primitive-syntax #t)) |
238 |
'(define)))) |
'(define)))) |
239 |
|
|
240 |
(define syncase sc-expand) |
(define syncase sc-expand) |
241 |
|
|
242 |
|
(set-module-transformer! the-syncase-module syncase) |
243 |
|
|
244 |
|
(define-syntax define-syntax-public |
245 |
|
(syntax-rules () |
246 |
|
((_ name rules ...) |
247 |
|
(begin |
248 |
|
;(eval-case ((load-toplevel) (export-syntax name))) |
249 |
|
(define-syntax name rules ...))))) |