/[guile]/guile/guile-core/ice-9/syncase.scm
ViewVC logotype

Diff of /guile/guile-core/ice-9/syncase.scm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.18.2.3 by mvo, Sat Jan 12 19:16:49 2002 UTC revision 1.18.2.4 by rlb, Mon Feb 25 04:12:11 2002 UTC
# Line 157  Line 157 
157    
158  (define generated-symbols (make-weak-key-hash-table 1019))  (define generated-symbols (make-weak-key-hash-table 1019))
159    
160    ;; We define our own gensym here because the Guile built-in one will
161    ;; eventually produce uninterned and unreadable symbols (as needed for
162    ;; safe macro expansions) and will the be inappropriate for dumping to
163    ;; pssyntax.pp.
164    ;;
165    ;; syncase is supposed to only require that gensym produce unique
166    ;; readable symbols, and they only need be unique with respect to
167    ;; multiple calls to gensym, not globally unique.
168    ;;
169    (define gensym
170      (let ((counter 0))
171        (lambda (. rest)
172          (let ((val (number->string counter)))
173            (set! counter (+ counter 1))
174            (cond
175             ((null? rest)
176              (string->symbol (string-append "syntmp-" val)))
177             ((null? (cdr rest))
178              (string->symbol (string-append "syntmp-" (car rest) "-" val)))
179             (else
180              (error
181               "syncase's gensym called with the wrong number of arguments")))))))
182          
183  ;;; Load the preprocessed code  ;;; Load the preprocessed code
184    
185  (let ((old-debug #f)  (let ((old-debug #f)

Legend:
Removed from v.1.18.2.3  
changed lines
  Added in v.1.18.2.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26