Changeset 12359 in project


Ignore:
Timestamp:
11/05/08 11:28:42 (11 years ago)
Author:
felix winkelmann
Message:

fixed ellipsis check (srfi-46 extension); chicken-install removes failed http locations from defaults list

Location:
chicken/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • chicken/trunk/TODO

    r12342 r12359  
    1111    it seems that we have to add unexported syntax to the import lib, in case it is referenced
    1212    from exported syntax. ugh.
    13 *** alternative ellipsis (SRFI-46) broken
    14     using alternative ellipsis in syntax-rules results in nested '... to be treated
    15     as ordinary (temporary) identifier
    1613*** expansion of r5rs_pitfall 4.2 incorrect
    1714    possibly due to a non-aliased implicit "begin" somewhere
     
    4643
    4744** module issues
     45*** need a way to omit generating module registration without generating import lib
     46    for example when compiling static version, where implib already exists
    4847*** code-duplication in compiler and evaluator for ##core#module
    4948*** "scheme" module does not include some special forms ("define-syntax", etc.)
  • chicken/trunk/chicken-install.scm

    r12305 r12359  
    192192                      #f)
    193193                     (e () (abort e)))
    194                    (loop (cdr defs)))))))
     194                   (begin
     195                     (set! *default-sources* (delete def *default-sources* eq?))
     196                     (loop (cdr defs))))))))
    195197
    196198    (define (retrieve eggs)
  • chicken/trunk/synrules.scm

    r11903 r12359  
    9999  (define %temp (r 'temp))
    100100  (define %syntax-error '##sys#syntax-error-hook)
     101  (define %ellipsis (r ellipsis))
     102
     103  (define (ellipsis? x)
     104    (c x %ellipsis))
    101105
    102106  (define (make-transformer rules)
     
    157161     (let* ((len (vector-length pattern))
    158162            (segment? (and (>= len 2)
    159                            (eq? (vector-ref pattern (- len 1))
    160                                 ellipsis))))
     163                           (ellipsis? (vector-ref pattern (- len 1))))))
    161164       `((,%let ((,%temp ,input))
    162165          (,%and (,%vector? ,%temp)
     
    202205           (let* ((len (vector-length pattern))
    203206                  (segment? (and (>= len 2)
    204                                  (eq? (vector-ref pattern (- len 1))
    205                                       ellipsis))))
     207                                 (ellipsis? (vector-ref pattern (- len 1))))))
    206208             (if segment?
    207209                 (process-pattern (vector->list pattern)
     
    311313    (and (pair? pattern)
    312314         (pair? (cdr pattern))
    313          (eq? (cadr pattern) ellipsis)))
     315         (ellipsis? (cadr pattern))))
    314316
    315317  ;; Count the number of `...'s in PATTERN.
     
    325327    (let loop ((pattern (cdr pattern)))
    326328      (if (and (pair? pattern)
    327                (eq? (car pattern) ellipsis))
     329               (ellipsis? (car pattern)))
    328330          (loop (cdr pattern))
    329331          pattern)))
  • chicken/trunk/tests/syntax-tests.scm

    r11577 r12359  
    142142)
    143143
     144;;; alternative ellipsis test
     145
    144146(define-syntax foo
    145147  (syntax-rules
     
    150152   (foo 1 2 3)
    151153)
     154
     155(define-syntax defalias
     156  (syntax-rules ___ ()
     157    ((_ new old)
     158     (define-syntax new
     159       (syntax-rules ()
     160         ((_ args ...) (old args ...)))))))
     161
     162(defalias inc add1)
     163
     164(t 3 (inc 2))
     165
     166;;;
    152167
    153168(define-syntax usetmp
     
    255270        (set! i (add1 i))))
    256271(newline)
    257 
    258 
    259 ;;; alternative define-syntax syntax
    260 
    261 (define-syntax (foo . _) '(list 42))
    262 
    263 (assert (equal? '(42) (foo)))
    264 
    265 (assert
    266  (equal?
    267   '(1)
    268   (let ()
    269     (define-syntax (bar x r c)
    270       `(,(r 'list) (,(r 'quote) ,(cadr x))))
    271     (bar 1))))
Note: See TracChangeset for help on using the changeset viewer.