- fixed a minor import subversion bug.
- added 2-argument version of fllog.
This commit is contained in:
parent
d778dcc2dd
commit
2b4e89bcf0
|
@ -338,10 +338,19 @@
|
|||
(foreign-call "ikrt_fl_exp" x ($make-flonum))
|
||||
(die 'flexp "not a flonum" x)))
|
||||
|
||||
(define (fllog x)
|
||||
(define fllog
|
||||
(case-lambda
|
||||
[(x)
|
||||
(if (flonum? x)
|
||||
(foreign-call "ikrt_fl_log" x)
|
||||
(die 'fllog "not a flonum" x)))
|
||||
(die 'fllog "not a flonum" x))]
|
||||
[(x y)
|
||||
(if (flonum? x)
|
||||
(if (flonum? y)
|
||||
(fl/ (foreign-call "ikrt_fl_log" x)
|
||||
(foreign-call "ikrt_fl_log" y))
|
||||
(die 'fllog "not a flonum" y))
|
||||
(die 'fllog "not a flonum" x))]))
|
||||
|
||||
(define (flexpt x y)
|
||||
(if (flonum? x)
|
||||
|
|
|
@ -1 +1 @@
|
|||
1569
|
||||
1571
|
||||
|
|
|
@ -3262,10 +3262,11 @@
|
|||
(else (cons (car ls) (remove-dups (cdr ls))))))
|
||||
(define (parse-library-name spec)
|
||||
(define (subversion? x)
|
||||
(and (integer? x) (exact? x) (>= x 0)))
|
||||
(let ([x (syntax->datum x)])
|
||||
(and (integer? x) (exact? x) (>= x 0))))
|
||||
(define (subversion-pred x*)
|
||||
(syntax-match x* ()
|
||||
[n (subversion? (syntax->datum n))
|
||||
[n (subversion? n)
|
||||
(lambda (x) (= x (syntax->datum n)))]
|
||||
[(p? sub* ...) (eq? (syntax->datum p?) 'and)
|
||||
(let ([p* (map subversion-pred sub*)])
|
||||
|
@ -3280,9 +3281,10 @@
|
|||
(lambda (x)
|
||||
(not (p x))))]
|
||||
[(p? n)
|
||||
(and (eq? (syntax->datum p?) '<=) (subversion? (syntax->datum n)))
|
||||
(and (eq? (syntax->datum p?) '<=) (subversion? n))
|
||||
(lambda (x) (<= x (syntax->datum n)))]
|
||||
[(p? n) (and (eq? (syntax->datum p?) '>=) (subversion? n))
|
||||
[(p? n)
|
||||
(and (eq? (syntax->datum p?) '>=) (subversion? n))
|
||||
(lambda (x) (>= x (syntax->datum n)))]
|
||||
[_ (syntax-violation 'import "invalid sub-version spec" spec x*)]))
|
||||
(define (version-pred x*)
|
||||
|
|
Loading…
Reference in New Issue