Changeset 37827 in project


Ignore:
Timestamp:
08/04/19 14:33:10 (2 weeks ago)
Author:
sjamaan
Message:

srfi-1: Use ##sys#check-fixnum instead of ##sys#check-exact on lengths

In CHICKEN 4, ##sys#check-exact was what we now call ##sys#check-fixnum
but the SRFI-1 code hasn't been updated to match it.

Fixes #1631

File:
1 edited

Legend:

Unmodified
Added
Removed
  • release/5/srfi-1/trunk/srfi-1.scm

    r35497 r37827  
    268268(define (make-list len . maybe-elt)
    269269;  (check-arg (lambda (n) (and (integer? n) (>= n 0))) len make-list)
    270   (##sys#check-exact len 'make-list)
     270  (##sys#check-fixnum len 'make-list)
    271271  (let ((elt (cond ((null? maybe-elt) #f) ; Default value
    272272                   ((null? (cdr maybe-elt)) (car maybe-elt))
     
    286286;  (check-arg (lambda (n) (and (integer? n) (>= n 0))) len list-tabulate)
    287287;  (check-arg procedure? proc list-tabulate)
    288   (##sys#check-exact len 'list-tabulate)
     288  (##sys#check-fixnum len 'list-tabulate)
    289289  (do ((i (fx- len 1) (fx- i 1))
    290290       (ans '() (cons (proc i) ans)))
     
    529529
    530530(define (take lis k)
    531   (##sys#check-exact k 'take)
     531  (##sys#check-fixnum k 'take)
    532532;  (check-arg integer? k take)
    533533  (let recur ((lis lis) (k k))
     
    537537
    538538(define (drop lis k)
    539   (##sys#check-exact k 'drop)
     539  (##sys#check-fixnum k 'drop)
    540540;  (check-arg integer? k drop)
    541541  (let iter ((lis lis) (k k))
     
    543543
    544544(define (take! lis k)
    545   (##sys#check-exact k 'take!)
     545  (##sys#check-fixnum k 'take!)
    546546;  (check-arg integer? k take!)
    547547  (if (eq? 0 k) '()
     
    627627
    628628(define (split-at x k)
    629   (##sys#check-exact k 'split-at)
     629  (##sys#check-fixnum k 'split-at)
    630630;  (check-arg integer? k split-at)
    631631  (let recur ((lis x) (k k))
     
    635635
    636636(define (split-at! x k)
    637   (##sys#check-exact k 'split-at!)
     637  (##sys#check-fixnum k 'split-at!)
    638638;  (check-arg integer? k split-at!)
    639639  (if (eq? 0 k) (values '() x)
Note: See TracChangeset for help on using the changeset viewer.