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)
|
||||
(import (scheme base)
|
||||
(scheme write)
|
||||
(picrin base)
|
||||
(picrin record))
|
||||
|
||||
(define-record-type <array>
|
||||
|
|
|
@ -31,38 +31,22 @@
|
|||
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
|
||||
|
@ -129,19 +113,15 @@
|
|||
vector->list)
|
||||
|
||||
(export string?
|
||||
make-string
|
||||
string-length
|
||||
string-ref
|
||||
string-set!
|
||||
string-copy
|
||||
string-append
|
||||
string=?
|
||||
string<?
|
||||
string>?
|
||||
string<=?
|
||||
string>=?
|
||||
string-copy
|
||||
string-copy!
|
||||
string-append
|
||||
string-fill!)
|
||||
string>=?)
|
||||
|
||||
(export make-dictionary
|
||||
dictionary?
|
||||
|
@ -160,16 +140,13 @@
|
|||
(export current-input-port
|
||||
current-output-port
|
||||
current-error-port
|
||||
|
||||
port?
|
||||
input-port?
|
||||
output-port?
|
||||
textual-port?
|
||||
binary-port?
|
||||
port?
|
||||
input-port-open?
|
||||
output-port-open?
|
||||
close-port
|
||||
close-input-port
|
||||
close-output-port
|
||||
|
||||
open-input-string
|
||||
open-output-string
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
(define-library (picrin dictionary)
|
||||
(import (scheme base))
|
||||
(import (scheme base)
|
||||
(picrin base))
|
||||
|
||||
(define (dictionary-map proc dict)
|
||||
(let ((kvs '()))
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
(define-library (picrin experimental lambda)
|
||||
(import (scheme base)
|
||||
(picrin base)
|
||||
(picrin macro))
|
||||
|
||||
(define-syntax destructuring-bind
|
||||
|
|
|
@ -1,12 +1,7 @@
|
|||
;;; Hygienic Macros
|
||||
|
||||
(define-library (picrin macro)
|
||||
(import (picrin base macro)
|
||||
(picrin base)
|
||||
(picrin list)
|
||||
(picrin symbol)
|
||||
(scheme base)
|
||||
(picrin dictionary))
|
||||
(import (picrin base))
|
||||
|
||||
;; assumes no derived expressions are provided yet
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
(define-library (picrin record)
|
||||
(import (scheme base))
|
||||
(import (picrin base)
|
||||
(scheme base))
|
||||
|
||||
(define (set-record-writer! record-type writer)
|
||||
(record-set! record-type 'writer writer))
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
(define-library (picrin test)
|
||||
(import (scheme base)
|
||||
(scheme write)
|
||||
(scheme read)
|
||||
(scheme process-context))
|
||||
(scheme process-context)
|
||||
(picrin base))
|
||||
|
||||
(define test-counter 0)
|
||||
(define counter 0)
|
||||
(define failure-counter 0)
|
||||
|
|
|
@ -1,11 +1,14 @@
|
|||
(define-library (scheme base)
|
||||
(import (picrin base)
|
||||
(picrin list)
|
||||
(picrin symbol)
|
||||
(picrin macro))
|
||||
|
||||
(export define set! lambda quote
|
||||
if begin define-syntax)
|
||||
(export define
|
||||
set!
|
||||
lambda
|
||||
quote
|
||||
if
|
||||
begin
|
||||
define-syntax)
|
||||
|
||||
;; call/cc
|
||||
|
||||
|
@ -267,7 +270,7 @@
|
|||
(lambda (form r c)
|
||||
`(,(r 'letrec-syntax) ,@(cdr form)))))
|
||||
|
||||
(import (scheme read) (scheme file))
|
||||
(import (scheme file))
|
||||
|
||||
(define-syntax include
|
||||
(letrec ((read-file
|
||||
|
@ -682,8 +685,6 @@
|
|||
|
||||
;; 4.2.6. Dynamic bindings
|
||||
|
||||
(import (picrin parameter))
|
||||
|
||||
(define-syntax parameterize
|
||||
(ir-macro-transformer
|
||||
(lambda (form inject compare)
|
||||
|
@ -764,9 +765,6 @@
|
|||
|
||||
;; 5.5 Recored-type definitions
|
||||
|
||||
(import (picrin record)
|
||||
(scheme write))
|
||||
|
||||
(define ((default-record-writer ctor) obj)
|
||||
(let ((port (open-output-string)))
|
||||
(display "#.(" port)
|
||||
|
@ -858,6 +856,163 @@
|
|||
(rename truncate-quotient quotient)
|
||||
(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
|
||||
|
||||
(export pair?
|
||||
|
|
Loading…
Reference in New Issue