[R6RS] syntax-rules fenders

dyb at cs.indiana.edu dyb at cs.indiana.edu
Fri Aug 18 11:43:39 EDT 2006

The SRFI 93 syntax-rules form supports fenders, which increases the number
of macros one can write using syntax rules and also allows for extra
error checking.  For example:

  (define-syntax let
    (syntax-rules ()
      [(_ ((x e) ...) b1 b2 ...)
       (every identifier? #'(x ...))
       ((lambda (x ...) b1 b2 ...) e ...)]))

To make this feature useful in the base language, we'd need to include
(syntax <template>), aka.  #'<template>, and we'd probably also want to
include identifier?, bound-identifier=?, free-identifier=?, and
syntax->datum.  This may be more than we wish to include in the base

I see three options:

 1. eliminate syntax-rules fenders

 2. retain syntax-rules fenders but leave #'<datum> and the other features
    out of the base language

 3. retain syntax-rules fenders and include #'<datum> and the other features
    in the base language

I'm inclined to go with option 2.  While fenders won't be useful in the
base language, they'll be there for use whenever the other features are


More information about the R6RS mailing list