move the repl source to under piclib

This commit is contained in:
Yuichi Nishiwaki 2014-07-29 15:23:40 +09:00
parent dd52dee01c
commit 2f7a51c096
4 changed files with 19 additions and 19 deletions

View File

@ -17,4 +17,7 @@ list(APPEND PICLIB_SCHEME_LIBS
${PROJECT_SOURCE_DIR}/piclib/srfi/60.scm
${PROJECT_SOURCE_DIR}/piclib/srfi/95.scm
${PROJECT_SOURCE_DIR}/piclib/srfi/111.scm
${PROJECT_SOURCE_DIR}/piclib/picrin/user.scm
${PROJECT_SOURCE_DIR}/piclib/picrin/repl.scm
)

View File

@ -1,16 +1,3 @@
(define-library (picrin user)
(import (scheme base)
(scheme load)
(scheme process-context)
(scheme read)
(scheme write)
(scheme file)
(scheme inexact)
(scheme cxr)
(scheme lazy)
(scheme time)
(picrin macro)))
(define-library (picrin repl)
(import (scheme base)
(scheme read)
@ -80,8 +67,3 @@
(main-loop))))
(export repl))
(import (picrin repl))
(repl)

14
piclib/picrin/user.scm Normal file
View File

@ -0,0 +1,14 @@
; the default repl environment
(define-library (picrin user)
(import (scheme base)
(scheme load)
(scheme process-context)
(scheme read)
(scheme write)
(scheme file)
(scheme inexact)
(scheme cxr)
(scheme lazy)
(scheme time)
(picrin macro)))

View File

@ -13,7 +13,8 @@ main(int argc, char *argv[], char **envp)
pic = pic_open(argc, argv, envp);
pic_try {
pic_load(pic, "/Users/yuichi/workspace/picrin/tools/main.scm");
pic_import(pic, pic_read_cstr(pic, "(picrin repl)"));
pic_funcall(pic, "repl", pic_nil_value());
}
pic_catch {
pic_print_backtrace(pic, pic->err);