Changeset 16024 in project


Ignore:
Timestamp:
09/22/09 03:49:57 (10 years ago)
Author:
Kon Lovett
Message:

Fix for dotted-pair expansion.

Location:
release/4/expand-full
Files:
4 edited
1 copied

Legend:

Unmodified
Added
Removed
  • release/4/expand-full/tags/1.0.1/expand-full.scm

    r14138 r16024  
    22;;;; Kon Lovett, Apr '09
    33
    4 (declare
    5   (usual-integrations)
    6   (fixnum)
    7   (inline)
    8   (local)
    9   (no-bound-checks)
    10   (no-procedure-checks))
    11 
    124;;;
    135
    14 (module expand-full (expand* pretty-print-expand* ppexpand*)
     6(module expand-full
    157
    16 (import scheme chicken
    17   (only csi toplevel-command)
    18   (only extras pretty-print)
    19   (only srfi-1 map!))
     8  (expand* pretty-print-expand* ppexpand*)
    209
    21 (require-library extras srfi-1)
     10  (import scheme chicken
     11          (only csi toplevel-command)
     12          (only extras pretty-print)
     13          (only srfi-1 map!))
     14 
     15  (require-library extras srfi-1)
    2216
    2317;;;
     
    2620
    2721(define (expand* form #!optional se)
    28 
    29   ; expand while expanding
    30   (define (exp form)
    31     (let ((form* (expand* form se)))
     22  (let expd ((form form))
     23    (let ((form* (cond ((list? form) (map! expd (expand form se)) )
     24                       ((pair? form) (cons (expd (car form)) (expd (cdr form))) )
     25                       (else (expand form se) ) ) ) )
    3226      (if (equal? form form*) form
    33           (exp form*) ) ) )
    34 
    35   (let ((form (expand form se)))
    36     (if (pair? form) (map! exp form)
    37         form ) ) )
     27          (expd form*) ) ) ) )
    3828
    3929;;
    4030
    41 (define (pretty-print-expand* form . args)
    42   (pretty-print (strip-syntax (apply expand* form args)))
     31(define (pretty-print-expand* form #!optional se)
     32  (pretty-print (strip-syntax (expand* form se)))
    4333  (void) )
    4434
  • release/4/expand-full/tags/1.0.1/expand-full.setup

    r14068 r16024  
    55(verify-extension-name "expand-full")
    66
    7 (setup-shared-extension-module (extension-name) (extension-version "1.0.0"))
     7(setup-shared-extension-module (extension-name) (extension-version "1.0.0")
     8  #:compile-options '(-optimize-level 3 -fixnum-arithmetic -no-procedure-checks))
  • release/4/expand-full/trunk/expand-full.scm

    r14138 r16024  
    22;;;; Kon Lovett, Apr '09
    33
    4 (declare
    5   (usual-integrations)
    6   (fixnum)
    7   (inline)
    8   (local)
    9   (no-bound-checks)
    10   (no-procedure-checks))
    11 
    124;;;
    135
    14 (module expand-full (expand* pretty-print-expand* ppexpand*)
     6(module expand-full
    157
    16 (import scheme chicken
    17   (only csi toplevel-command)
    18   (only extras pretty-print)
    19   (only srfi-1 map!))
     8  (expand* pretty-print-expand* ppexpand*)
    209
    21 (require-library extras srfi-1)
     10  (import scheme chicken
     11          (only csi toplevel-command)
     12          (only extras pretty-print)
     13          (only srfi-1 map!))
     14 
     15  (require-library extras srfi-1)
    2216
    2317;;;
     
    2620
    2721(define (expand* form #!optional se)
    28 
    29   ; expand while expanding
    30   (define (exp form)
    31     (let ((form* (expand* form se)))
     22  (let expd ((form form))
     23    (let ((form* (cond ((list? form) (map! expd (expand form se)) )
     24                       ((pair? form) (cons (expd (car form)) (expd (cdr form))) )
     25                       (else (expand form se) ) ) ) )
    3226      (if (equal? form form*) form
    33           (exp form*) ) ) )
    34 
    35   (let ((form (expand form se)))
    36     (if (pair? form) (map! exp form)
    37         form ) ) )
     27          (expd form*) ) ) ) )
    3828
    3929;;
    4030
    41 (define (pretty-print-expand* form . args)
    42   (pretty-print (strip-syntax (apply expand* form args)))
     31(define (pretty-print-expand* form #!optional se)
     32  (pretty-print (strip-syntax (expand* form se)))
    4333  (void) )
    4434
  • release/4/expand-full/trunk/expand-full.setup

    r14068 r16024  
    55(verify-extension-name "expand-full")
    66
    7 (setup-shared-extension-module (extension-name) (extension-version "1.0.0"))
     7(setup-shared-extension-module (extension-name) (extension-version "1.0.0")
     8  #:compile-options '(-optimize-level 3 -fixnum-arithmetic -no-procedure-checks))
Note: See TracChangeset for help on using the changeset viewer.