summaryrefslogtreecommitdiff
path: root/module/ice-9/boot-9.scm
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2019-09-12 21:50:51 +0200
committerAndy Wingo <wingo@pobox.com>2019-09-12 21:50:51 +0200
commit374c1e5807a35b16170ed7686abcd5c407554d78 (patch)
tree121a61d8a7560a0671d296b7922a53c567ea7046 /module/ice-9/boot-9.scm
parent4e89d0c061c585ca56a96ef8410dad17979ca5eb (diff)
downloadguile-374c1e5807a35b16170ed7686abcd5c407554d78.tar.gz
Define top-level bindings for aux syntax: else, =>, _, ...
* module/ice-9/boot-9.scm (else, =>, ..., _): New definitions. These are specified by the r6rs and the r7rs. * module/ice-9/sandbox.scm (core-bindings): Include the aux syntax definitions. * module/rnrs/base.scm: * module/rnrs.scm: Re-export aux syntax.
Diffstat (limited to 'module/ice-9/boot-9.scm')
-rw-r--r--module/ice-9/boot-9.scm16
1 files changed, 16 insertions, 0 deletions
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index 062ab688e..f50448c0b 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -416,6 +416,22 @@ If returning early, return the return value of F."
(define-syntax-rule (unless test stmt stmt* ...)
(if (not test) (begin stmt stmt* ...)))
+(define-syntax else
+ (lambda (x)
+ (syntax-violation 'else "bad use of 'else' syntactic keyword" x x)))
+
+(define-syntax =>
+ (lambda (x)
+ (syntax-violation '=> "bad use of '=>' syntactic keyword" x x)))
+
+(define-syntax ...
+ (lambda (x)
+ (syntax-violation '... "bad use of '...' syntactic keyword" x x)))
+
+(define-syntax _
+ (lambda (x)
+ (syntax-violation '_ "bad use of '_' syntactic keyword" x x)))
+
(define-syntax cond
(lambda (whole-expr)
(define (fold f seed xs)