diff options
author | Noah Lavine <nlavine@haverford.edu> | 2011-02-01 10:42:50 -0500 |
---|---|---|
committer | Andy Wingo <wingo@pobox.com> | 2011-03-24 21:10:03 +0100 |
commit | 730d3b270539053ca5efe6f0a468ae10a145a99d (patch) | |
tree | 7984c949cc7e80b118d623a6d0abc322f4dc637c | |
parent | 309299fe44563c19662dd72b62dd151d60a0fef4 (diff) | |
download | guile-730d3b270539053ca5efe6f0a468ae10a145a99d.tar.gz |
peg: remove unhygienic safe-bind, safe-bind-f
* module/ice-9/peg.scm (safe-bind, safe-bind-f): Remove.
-rw-r--r-- | module/ice-9/peg.scm | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/module/ice-9/peg.scm b/module/ice-9/peg.scm index 2219b60ba..729980fd0 100644 --- a/module/ice-9/peg.scm +++ b/module/ice-9/peg.scm @@ -27,46 +27,6 @@ (eval-when (compile load eval) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;; CONVENIENCE MACROS -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(define (eeval exp) - (eval exp (interaction-environment))) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;;;;; MACRO BUILDERS -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -;; Safe-bind helps to bind macros safely. -;; e.g.: -;; (safe-bind -;; (a b) -;; `(,a ,b)) -;; gives: -;; (#<uninterned-symbol a cc608d0> #<uninterned-symbol b cc608a0>) -(define-syntax safe-bind - (lambda (x) - (syntax-case x () - ((_ vals . actions) - (datum->syntax x (apply safe-bind-f - (cons - (syntax->datum #'vals) - (syntax->datum #'actions)))))))) -;; (define-macro (safe-bind vals . actions) -;; (apply safe-bind-f (cons vals actions))) -(define (safe-bind-f vals . actions) - `(let ,(map (lambda (val) `(,val (make-symbol ,(symbol->string val)))) vals) - ,@actions)) - -;; Unsafe-bind is like safe-bind but uses symbols that are easier to read while -;; debugging rather than safe ones. Currently unused. -;; (define-macro (unsafe-bind vals . actions) -;; (apply unsafe-bind-f (cons vals actions))) -;; (define (unsafe-bind-f vals . actions) -;; `(let ,(map (lambda (val) `(,val ',val)) vals) -;; ,@actions)) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; LOOPING CONSTRUCTS ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |