Changeset 37147 in project


Ignore:
Timestamp:
01/30/19 08:34:08 (3 months ago)
Author:
mario
Message:

release/5/loop: Initial CHICKEN 5 support

Patch by Massimo Nocentini.

Location:
release/5/loop/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • release/5/loop/trunk/loop-support.scm

    r37146 r37147  
    1717
    1818(module loop-support (scheme-loop loop-rename loop-compare)
    19   (import scheme chicken)
    20 
    21   (use srfi-1 ports)
     19  (import scheme (chicken base) (chicken port) (chicken syntax))
     20
     21  (import srfi-1)
    2222
    2323(define loop-rename (make-parameter #f))
     
    6464(define (loop-returning-set! c x)  (vector-set! c 8 x))
    6565
    66 (define (strip x) (##sys#strip-syntax x))
     66(define (strip x) (strip-syntax x))
    6767
    6868(define (c* x y) ((loop-compare) x y))
  • release/5/loop/trunk/loop.scm

    r37146 r37147  
    3333
    3434(module loop (loop)
    35   (import scheme chicken)
     35
     36  (import scheme (chicken base) (chicken syntax))
    3637  (begin-for-syntax (require-library loop-support))
    3738  (import-for-syntax loop-support)
     39  (import srfi-1)
    3840
    39 (define-syntax (loop x r c)
    40   (let ((args (cdr x)))
    41     (parameterize ((loop-rename r)
    42                    (loop-compare c))
    43       (scheme-loop args)) ) )
     41  (define-syntax loop
     42   (er-macro-transformer
     43    (lambda (x r c)
     44     (let ((args (cdr x)))
     45      (parameterize ((loop-rename r)
     46                     (loop-compare c))
     47       (scheme-loop args))))))
    4448
    4549)
  • release/5/loop/trunk/tests/run.scm

    r37146 r37147  
    11
    2 (use loop)
     2(import scheme (chicken base) (chicken random) (chicken format))
     3(import loop)
     4
     5(define random pseudo-random-integer)
    36
    47;;;
Note: See TracChangeset for help on using the changeset viewer.