Changeset 9373 in project


Ignore:
Timestamp:
03/09/08 16:30:20 (12 years ago)
Author:
Alex Shinn
Message:

Moving initialization code to chicken-init.scm.
Fixing vector templates in syntax-rules.

Location:
release/3/riaxpander
Files:
1 added
3 edited

Legend:

Unmodified
Added
Removed
  • release/3/riaxpander/chicken.scm

    r9353 r9373  
    476476  `(BEGIN ,@(chicken/compile-expressions expressions)))
    477477
    478 
    479 
    480 ;;;; install
    481 
    482 (riaxpander:install)
    483 (register-feature! 'syntax-rules 'hygienic-macros 'syntactic-closures)
    484 
    485 (unless (memq #:standard-syntax ##sys#features)
    486   (load (##sys#resolve-include-filename "riaxpander-chicken-macros.scm" #t #t)) )
    487 
  • release/3/riaxpander/riaxpander.setup

    r9346 r9373  
    1 (compile -s -i -O2 chicken.scm -d0
     1(compile -s -i -O2 chicken-init.scm -d0
    22         -check-imports -emit-exports riaxpander.exports
    33         -o riaxpander.so)
     
    55(install-extension 'riaxpander
    66                   '("riaxpander.so" "riaxpander-chicken-macros.scm")
    7   '((version 0.4)
     7  '((version 0.5)
    88    (documentation "riaxpander.html")
    99    (syntax)
  • release/3/riaxpander/synrules.scm

    r9345 r9373  
    4949             ,(find-free-names-in-syntax-rules subkeywords rules))))
    5050       '(append and car cdr cond cons else eq? equal? lambda let let* map
    51                 pair? quote syntax-quote values)))))
     51                pair? quote syntax-quote values
     52                vector? vector-length vector-ref vector->list list->vector
     53                + = >=
     54                )))))
    5255
    5356
     
    6366  (define %vector-ref (r 'vector-ref))
    6467  (define %vector->list (r 'vector->list))
     68  (define %list->vector (r 'list->vector))
    6569  (define %>= (r '>=))
    6670  (define %= (r '=))
     
    246250           `(,%cons ,(process-template (car template) dim env)
    247251                    ,(process-template (cdr template) dim env)))
     252          ((vector? template)
     253           `(,%list->vector
     254             ,(process-template (vector->list template) dim env)))
    248255          (else
    249256           `(,%quote ,template))))
     
    342349           (meta-variables (car pattern)
    343350                           (meta-variables (cdr pattern) vars)))
     351          ((vector? pattern)
     352           (meta-variables (vector->list pattern) vars))
    344353          (else vars)))
    345354
     
    358367                       vars
    359368                       (free-names (cdr template) vars names)))
     369          ((vector? template)
     370           (free-names (vector->list template) vars names))
    360371          (else names)))
    361372
Note: See TracChangeset for help on using the changeset viewer.