update prototypes (picrin/symbol.scm, picrin/list.scm, picrin/base.scm)
This commit is contained in:
parent
42ddd5793e
commit
055ec2538d
|
@ -1,7 +1,5 @@
|
||||||
list(APPEND PICLIB_SCHEME_LIBS
|
list(APPEND PICLIB_SCHEME_LIBS
|
||||||
${PROJECT_SOURCE_DIR}/piclib/picrin/base.scm
|
${PROJECT_SOURCE_DIR}/piclib/picrin/base.scm
|
||||||
${PROJECT_SOURCE_DIR}/piclib/picrin/list.scm
|
|
||||||
${PROJECT_SOURCE_DIR}/piclib/picrin/symbol.scm
|
|
||||||
${PROJECT_SOURCE_DIR}/piclib/picrin/macro.scm
|
${PROJECT_SOURCE_DIR}/piclib/picrin/macro.scm
|
||||||
|
|
||||||
${PROJECT_SOURCE_DIR}/piclib/scheme/base.scm
|
${PROJECT_SOURCE_DIR}/piclib/scheme/base.scm
|
||||||
|
|
|
@ -1,24 +1,238 @@
|
||||||
(define-library (picrin base)
|
(define-library (picrin base)
|
||||||
(import (rename (picrin base core) (define define*))
|
|
||||||
(picrin base macro)
|
|
||||||
(picrin base list)
|
|
||||||
(picrin base symbol))
|
|
||||||
|
|
||||||
(define-syntax define
|
|
||||||
(lambda (form use-env mac-env)
|
|
||||||
(if (symbol? (car (cdr form)))
|
|
||||||
(cons (make-identifier 'define* mac-env) (cdr form))
|
|
||||||
(cons (make-identifier 'define mac-env)
|
|
||||||
(cons (car (car (cdr form)))
|
|
||||||
(cons (cons (make-identifier 'lambda mac-env)
|
|
||||||
(cons (cdr (car (cdr form)))
|
|
||||||
(cdr (cdr form))))
|
|
||||||
'()))))))
|
|
||||||
|
|
||||||
(export define
|
(export define
|
||||||
set!
|
set!
|
||||||
quote
|
quote
|
||||||
lambda
|
lambda
|
||||||
if
|
if
|
||||||
begin
|
begin
|
||||||
define-syntax))
|
define-syntax)
|
||||||
|
|
||||||
|
(export bytevector?
|
||||||
|
make-bytevector
|
||||||
|
bytevector-length
|
||||||
|
bytevector-u8-ref
|
||||||
|
bytevector-u8-set!
|
||||||
|
bytevector-copy!
|
||||||
|
bytevector-append)
|
||||||
|
|
||||||
|
(export eq?
|
||||||
|
eqv?
|
||||||
|
equal?)
|
||||||
|
|
||||||
|
(export boolean?
|
||||||
|
boolean=?
|
||||||
|
not)
|
||||||
|
|
||||||
|
(export char?
|
||||||
|
char->integer
|
||||||
|
integer->char)
|
||||||
|
|
||||||
|
(export call-with-current-continuation
|
||||||
|
continue
|
||||||
|
dynamic-wind
|
||||||
|
values
|
||||||
|
call-with-values)
|
||||||
|
|
||||||
|
(export make-dictionary
|
||||||
|
dictionary?
|
||||||
|
dictionary-ref
|
||||||
|
dictionary-set!
|
||||||
|
dictionary-delete
|
||||||
|
dictionary-size
|
||||||
|
dictionary-for-each)
|
||||||
|
|
||||||
|
(export with-exception-handler
|
||||||
|
raise
|
||||||
|
raise-continuable
|
||||||
|
error
|
||||||
|
error-object?
|
||||||
|
error-object-message
|
||||||
|
error-object-irritants
|
||||||
|
read-error?
|
||||||
|
file-error?)
|
||||||
|
|
||||||
|
(export identifier?
|
||||||
|
identifier=?
|
||||||
|
make-identifier)
|
||||||
|
|
||||||
|
(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 pair?
|
||||||
|
cons
|
||||||
|
car
|
||||||
|
cdr
|
||||||
|
set-car!
|
||||||
|
set-cdr!
|
||||||
|
null?
|
||||||
|
caar
|
||||||
|
cadr
|
||||||
|
cdar
|
||||||
|
cddr)
|
||||||
|
|
||||||
|
(export list?
|
||||||
|
make-list
|
||||||
|
list
|
||||||
|
length
|
||||||
|
append
|
||||||
|
reverse
|
||||||
|
list-tail
|
||||||
|
list-ref
|
||||||
|
list-set!
|
||||||
|
list-copy
|
||||||
|
memq
|
||||||
|
memv
|
||||||
|
member
|
||||||
|
assq
|
||||||
|
assv
|
||||||
|
assoc)
|
||||||
|
|
||||||
|
(export current-input-port
|
||||||
|
current-output-port
|
||||||
|
current-error-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
|
||||||
|
get-output-string
|
||||||
|
open-input-bytevector
|
||||||
|
open-output-bytevector
|
||||||
|
get-output-bytevector
|
||||||
|
|
||||||
|
read-char
|
||||||
|
peek-char
|
||||||
|
read-line
|
||||||
|
eof-object?
|
||||||
|
eof-object
|
||||||
|
char-ready?
|
||||||
|
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 procedure?
|
||||||
|
apply
|
||||||
|
map
|
||||||
|
for-each
|
||||||
|
attribute)
|
||||||
|
|
||||||
|
(export read)
|
||||||
|
|
||||||
|
(export make-record
|
||||||
|
record?
|
||||||
|
record-type
|
||||||
|
record-ref
|
||||||
|
record-set!)
|
||||||
|
|
||||||
|
(export string?
|
||||||
|
make-string
|
||||||
|
string-length
|
||||||
|
string-ref
|
||||||
|
string-set!
|
||||||
|
string=?
|
||||||
|
string<?
|
||||||
|
string>?
|
||||||
|
string<=?
|
||||||
|
string>=?
|
||||||
|
string-copy
|
||||||
|
string-copy!
|
||||||
|
string-append
|
||||||
|
string-fill!)
|
||||||
|
|
||||||
|
(export symbol?
|
||||||
|
symbol->string
|
||||||
|
string->symbol
|
||||||
|
symbol=?)
|
||||||
|
|
||||||
|
(export make-parameter
|
||||||
|
parameter-ref
|
||||||
|
parameter-set!
|
||||||
|
parameter-push!
|
||||||
|
parameter-pop!)
|
||||||
|
|
||||||
|
(export vector?
|
||||||
|
make-vector
|
||||||
|
vector-length
|
||||||
|
vector-ref
|
||||||
|
vector-set!
|
||||||
|
vector-copy!
|
||||||
|
vector-copy
|
||||||
|
vector-append
|
||||||
|
vector-fill!
|
||||||
|
list->vector
|
||||||
|
vector->list)
|
||||||
|
|
||||||
|
(export write
|
||||||
|
write-simple
|
||||||
|
write-shared
|
||||||
|
display))
|
||||||
|
|
|
@ -1,30 +0,0 @@
|
||||||
(define-library (picrin list)
|
|
||||||
(import (picrin base list))
|
|
||||||
|
|
||||||
(export pair?
|
|
||||||
cons
|
|
||||||
car
|
|
||||||
cdr
|
|
||||||
set-car!
|
|
||||||
set-cdr!
|
|
||||||
null?
|
|
||||||
caar
|
|
||||||
cadr
|
|
||||||
cdar
|
|
||||||
cddr
|
|
||||||
list?
|
|
||||||
make-list
|
|
||||||
list
|
|
||||||
length
|
|
||||||
append
|
|
||||||
reverse
|
|
||||||
list-tail
|
|
||||||
list-ref
|
|
||||||
list-set!
|
|
||||||
list-copy
|
|
||||||
memq
|
|
||||||
memv
|
|
||||||
member
|
|
||||||
assq
|
|
||||||
assv
|
|
||||||
assoc))
|
|
|
@ -1,7 +0,0 @@
|
||||||
(define-library (picrin symbol)
|
|
||||||
(import (picrin base symbol))
|
|
||||||
|
|
||||||
(export symbol?
|
|
||||||
symbol=?
|
|
||||||
symbol->string
|
|
||||||
string->symbol))
|
|
Loading…
Reference in New Issue