update benz
This commit is contained in:
parent
268191d1c5
commit
c15999cc76
|
@ -1 +1 @@
|
||||||
Subproject commit 14e7fd4e98ca4619edb5eb7e48b882d94e5e50d2
|
Subproject commit b8b5743589ccbed555805d768d5c840aad350499
|
|
@ -1,6 +1,6 @@
|
||||||
(define-library (picrin array)
|
(define-library (picrin array)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
(scheme write)
|
(picrin base)
|
||||||
(picrin record))
|
(picrin record))
|
||||||
|
|
||||||
(define-record-type <array>
|
(define-record-type <array>
|
||||||
|
|
|
@ -31,38 +31,22 @@
|
||||||
integer?
|
integer?
|
||||||
exact?
|
exact?
|
||||||
inexact?
|
inexact?
|
||||||
exact-integer?
|
|
||||||
=
|
=
|
||||||
<
|
<
|
||||||
>
|
>
|
||||||
<=
|
<=
|
||||||
>=
|
>=
|
||||||
zero?
|
|
||||||
positive?
|
|
||||||
negative?
|
|
||||||
odd?
|
|
||||||
even?
|
|
||||||
min
|
|
||||||
max
|
|
||||||
+
|
+
|
||||||
-
|
-
|
||||||
*
|
*
|
||||||
/
|
/
|
||||||
abs
|
abs
|
||||||
floor-quotient
|
|
||||||
floor-remainder
|
|
||||||
floor/
|
floor/
|
||||||
truncate-quotient
|
|
||||||
truncate-remainder
|
|
||||||
truncate/
|
truncate/
|
||||||
gcd
|
|
||||||
lcm
|
|
||||||
floor
|
floor
|
||||||
ceiling
|
ceiling
|
||||||
truncate
|
truncate
|
||||||
round
|
round
|
||||||
exact-integer-sqrt
|
|
||||||
square
|
|
||||||
expt
|
expt
|
||||||
number->string
|
number->string
|
||||||
string->number
|
string->number
|
||||||
|
@ -129,19 +113,15 @@
|
||||||
vector->list)
|
vector->list)
|
||||||
|
|
||||||
(export string?
|
(export string?
|
||||||
make-string
|
|
||||||
string-length
|
string-length
|
||||||
string-ref
|
string-ref
|
||||||
string-set!
|
string-copy
|
||||||
|
string-append
|
||||||
string=?
|
string=?
|
||||||
string<?
|
string<?
|
||||||
string>?
|
string>?
|
||||||
string<=?
|
string<=?
|
||||||
string>=?
|
string>=?)
|
||||||
string-copy
|
|
||||||
string-copy!
|
|
||||||
string-append
|
|
||||||
string-fill!)
|
|
||||||
|
|
||||||
(export make-dictionary
|
(export make-dictionary
|
||||||
dictionary?
|
dictionary?
|
||||||
|
@ -160,16 +140,13 @@
|
||||||
(export current-input-port
|
(export current-input-port
|
||||||
current-output-port
|
current-output-port
|
||||||
current-error-port
|
current-error-port
|
||||||
|
|
||||||
|
port?
|
||||||
input-port?
|
input-port?
|
||||||
output-port?
|
output-port?
|
||||||
textual-port?
|
textual-port?
|
||||||
binary-port?
|
binary-port?
|
||||||
port?
|
|
||||||
input-port-open?
|
|
||||||
output-port-open?
|
|
||||||
close-port
|
close-port
|
||||||
close-input-port
|
|
||||||
close-output-port
|
|
||||||
|
|
||||||
open-input-string
|
open-input-string
|
||||||
open-output-string
|
open-output-string
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(define-library (picrin dictionary)
|
(define-library (picrin dictionary)
|
||||||
(import (scheme base))
|
(import (scheme base)
|
||||||
|
(picrin base))
|
||||||
|
|
||||||
(define (dictionary-map proc dict)
|
(define (dictionary-map proc dict)
|
||||||
(let ((kvs '()))
|
(let ((kvs '()))
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(define-library (picrin experimental lambda)
|
(define-library (picrin experimental lambda)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
|
(picrin base)
|
||||||
(picrin macro))
|
(picrin macro))
|
||||||
|
|
||||||
(define-syntax destructuring-bind
|
(define-syntax destructuring-bind
|
||||||
|
|
|
@ -1,12 +1,7 @@
|
||||||
;;; Hygienic Macros
|
;;; Hygienic Macros
|
||||||
|
|
||||||
(define-library (picrin macro)
|
(define-library (picrin macro)
|
||||||
(import (picrin base macro)
|
(import (picrin base))
|
||||||
(picrin base)
|
|
||||||
(picrin list)
|
|
||||||
(picrin symbol)
|
|
||||||
(scheme base)
|
|
||||||
(picrin dictionary))
|
|
||||||
|
|
||||||
;; assumes no derived expressions are provided yet
|
;; assumes no derived expressions are provided yet
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
(define-library (picrin record)
|
(define-library (picrin record)
|
||||||
(import (scheme base))
|
(import (picrin base)
|
||||||
|
(scheme base))
|
||||||
|
|
||||||
(define (set-record-writer! record-type writer)
|
(define (set-record-writer! record-type writer)
|
||||||
(record-set! record-type 'writer writer))
|
(record-set! record-type 'writer writer))
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
(define-library (picrin test)
|
(define-library (picrin test)
|
||||||
(import (scheme base)
|
(import (scheme base)
|
||||||
(scheme write)
|
(scheme process-context)
|
||||||
(scheme read)
|
(picrin base))
|
||||||
(scheme process-context))
|
|
||||||
(define test-counter 0)
|
(define test-counter 0)
|
||||||
(define counter 0)
|
(define counter 0)
|
||||||
(define failure-counter 0)
|
(define failure-counter 0)
|
||||||
|
|
|
@ -1,11 +1,14 @@
|
||||||
(define-library (scheme base)
|
(define-library (scheme base)
|
||||||
(import (picrin base)
|
(import (picrin base)
|
||||||
(picrin list)
|
|
||||||
(picrin symbol)
|
|
||||||
(picrin macro))
|
(picrin macro))
|
||||||
|
|
||||||
(export define set! lambda quote
|
(export define
|
||||||
if begin define-syntax)
|
set!
|
||||||
|
lambda
|
||||||
|
quote
|
||||||
|
if
|
||||||
|
begin
|
||||||
|
define-syntax)
|
||||||
|
|
||||||
;; call/cc
|
;; call/cc
|
||||||
|
|
||||||
|
@ -267,7 +270,7 @@
|
||||||
(lambda (form r c)
|
(lambda (form r c)
|
||||||
`(,(r 'letrec-syntax) ,@(cdr form)))))
|
`(,(r 'letrec-syntax) ,@(cdr form)))))
|
||||||
|
|
||||||
(import (scheme read) (scheme file))
|
(import (scheme file))
|
||||||
|
|
||||||
(define-syntax include
|
(define-syntax include
|
||||||
(letrec ((read-file
|
(letrec ((read-file
|
||||||
|
@ -682,8 +685,6 @@
|
||||||
|
|
||||||
;; 4.2.6. Dynamic bindings
|
;; 4.2.6. Dynamic bindings
|
||||||
|
|
||||||
(import (picrin parameter))
|
|
||||||
|
|
||||||
(define-syntax parameterize
|
(define-syntax parameterize
|
||||||
(ir-macro-transformer
|
(ir-macro-transformer
|
||||||
(lambda (form inject compare)
|
(lambda (form inject compare)
|
||||||
|
@ -764,9 +765,6 @@
|
||||||
|
|
||||||
;; 5.5 Recored-type definitions
|
;; 5.5 Recored-type definitions
|
||||||
|
|
||||||
(import (picrin record)
|
|
||||||
(scheme write))
|
|
||||||
|
|
||||||
(define ((default-record-writer ctor) obj)
|
(define ((default-record-writer ctor) obj)
|
||||||
(let ((port (open-output-string)))
|
(let ((port (open-output-string)))
|
||||||
(display "#.(" port)
|
(display "#.(" port)
|
||||||
|
@ -858,6 +856,163 @@
|
||||||
(rename truncate-quotient quotient)
|
(rename truncate-quotient quotient)
|
||||||
(rename truncate-remainder remainder))
|
(rename truncate-remainder remainder))
|
||||||
|
|
||||||
|
(export define
|
||||||
|
lambda
|
||||||
|
if
|
||||||
|
quote
|
||||||
|
set!
|
||||||
|
begin
|
||||||
|
define-syntax)
|
||||||
|
|
||||||
|
(export eq?
|
||||||
|
eqv?
|
||||||
|
equal?)
|
||||||
|
|
||||||
|
(export boolean?
|
||||||
|
boolean=?
|
||||||
|
not)
|
||||||
|
|
||||||
|
(export char?
|
||||||
|
char->integer
|
||||||
|
integer->char)
|
||||||
|
|
||||||
|
(export number?
|
||||||
|
complex?
|
||||||
|
real?
|
||||||
|
rational?
|
||||||
|
integer?
|
||||||
|
exact?
|
||||||
|
inexact?
|
||||||
|
exact-integer?
|
||||||
|
=
|
||||||
|
<
|
||||||
|
>
|
||||||
|
<=
|
||||||
|
>=
|
||||||
|
zero?
|
||||||
|
positive?
|
||||||
|
negative?
|
||||||
|
odd?
|
||||||
|
even?
|
||||||
|
min
|
||||||
|
max
|
||||||
|
+
|
||||||
|
-
|
||||||
|
*
|
||||||
|
/
|
||||||
|
abs
|
||||||
|
floor-quotient
|
||||||
|
floor-remainder
|
||||||
|
floor/
|
||||||
|
truncate-quotient
|
||||||
|
truncate-remainder
|
||||||
|
truncate/
|
||||||
|
gcd
|
||||||
|
lcm
|
||||||
|
floor
|
||||||
|
ceiling
|
||||||
|
truncate
|
||||||
|
round
|
||||||
|
exact-integer-sqrt
|
||||||
|
square
|
||||||
|
expt
|
||||||
|
number->string
|
||||||
|
string->number
|
||||||
|
finite?
|
||||||
|
infinite?
|
||||||
|
nan?
|
||||||
|
exp
|
||||||
|
log
|
||||||
|
sin
|
||||||
|
cos
|
||||||
|
tan
|
||||||
|
acos
|
||||||
|
asin
|
||||||
|
atan
|
||||||
|
sqrt)
|
||||||
|
|
||||||
|
(export vector?
|
||||||
|
make-vector
|
||||||
|
vector-length
|
||||||
|
vector-ref
|
||||||
|
vector-set!
|
||||||
|
vector-copy!
|
||||||
|
vector-copy
|
||||||
|
vector-append
|
||||||
|
vector-fill!
|
||||||
|
list->vector
|
||||||
|
vector->list)
|
||||||
|
|
||||||
|
(export string?
|
||||||
|
make-string
|
||||||
|
string-length
|
||||||
|
string-ref
|
||||||
|
string-set!
|
||||||
|
string=?
|
||||||
|
string<?
|
||||||
|
string>?
|
||||||
|
string<=?
|
||||||
|
string>=?
|
||||||
|
string-copy
|
||||||
|
string-copy!
|
||||||
|
string-append
|
||||||
|
string-fill!)
|
||||||
|
|
||||||
|
(export current-input-port
|
||||||
|
current-output-port
|
||||||
|
current-error-port
|
||||||
|
|
||||||
|
port?
|
||||||
|
input-port?
|
||||||
|
output-port?
|
||||||
|
textual-port?
|
||||||
|
binary-port?
|
||||||
|
close-port
|
||||||
|
|
||||||
|
open-input-string
|
||||||
|
open-output-string
|
||||||
|
get-output-string
|
||||||
|
open-input-bytevector
|
||||||
|
open-output-bytevector
|
||||||
|
get-output-bytevector
|
||||||
|
|
||||||
|
eof-object?
|
||||||
|
eof-object
|
||||||
|
|
||||||
|
read-char
|
||||||
|
peek-char
|
||||||
|
char-ready?
|
||||||
|
read-line
|
||||||
|
read-string
|
||||||
|
|
||||||
|
read-u8
|
||||||
|
peek-u8
|
||||||
|
u8-ready?
|
||||||
|
read-bytevector
|
||||||
|
read-bytevector!
|
||||||
|
|
||||||
|
newline
|
||||||
|
write-char
|
||||||
|
write-string
|
||||||
|
write-u8
|
||||||
|
write-bytevector
|
||||||
|
flush-output-port)
|
||||||
|
|
||||||
|
(export with-exception-handler
|
||||||
|
raise
|
||||||
|
raise-continuable
|
||||||
|
error
|
||||||
|
error-object?
|
||||||
|
error-object-message
|
||||||
|
error-object-irritants
|
||||||
|
read-error?
|
||||||
|
file-error?)
|
||||||
|
|
||||||
|
(export procedure?
|
||||||
|
apply
|
||||||
|
map
|
||||||
|
for-each)
|
||||||
|
|
||||||
;; 6.4 Pairs and lists
|
;; 6.4 Pairs and lists
|
||||||
|
|
||||||
(export pair?
|
(export pair?
|
||||||
|
|
Loading…
Reference in New Issue