load srfi files at init. close #61
This commit is contained in:
parent
b4609aafb7
commit
0e1b6d93b4
|
@ -1,10 +1,7 @@
|
|||
(define-library (srfi 95)
|
||||
(import (scheme base)
|
||||
(scheme load))
|
||||
|
||||
;; this hack works only if the current directory is the root of picrin.
|
||||
(load "piclib/srfi/1.scm")
|
||||
(import (srfi 1))
|
||||
(scheme load)
|
||||
(srfi 1))
|
||||
|
||||
(define (list-sorted? ls less?)
|
||||
(let loop ((cur ls))
|
||||
|
|
18
src/init.c
18
src/init.c
|
@ -32,17 +32,10 @@ void pic_init_write(pic_state *);
|
|||
void
|
||||
pic_load_stdlib(pic_state *pic)
|
||||
{
|
||||
static const char *filename = "piclib/built-in.scm";
|
||||
|
||||
pic_try {
|
||||
|
||||
/* load 'built-in.scm' */
|
||||
pic_load(pic, filename);
|
||||
|
||||
#if DEBUG
|
||||
puts("successfully loaded stdlib");
|
||||
#endif
|
||||
|
||||
pic_load(pic, "piclib/built-in.scm");
|
||||
pic_load(pic, "piclib/srfi/1.scm");
|
||||
pic_load(pic, "piclib/srfi/95.scm");
|
||||
}
|
||||
pic_catch {
|
||||
/* error! */
|
||||
|
@ -50,6 +43,11 @@ pic_load_stdlib(pic_state *pic)
|
|||
fputs(pic_errmsg(pic), stderr);
|
||||
abort();
|
||||
}
|
||||
|
||||
#if DEBUG
|
||||
puts("successfully loaded stdlib");
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#define PUSH_SYM(pic, lst, name) \
|
||||
|
|
Loading…
Reference in New Issue