move core syntaxes from (scheme base) to (picrin base core)

This commit is contained in:
Yuichi Nishiwaki 2014-08-06 01:14:43 +09:00
parent 5a4764b6bb
commit 261c592d79
3 changed files with 10 additions and 6 deletions

View File

@ -1,7 +1,8 @@
;;; Hygienic Macros ;;; Hygienic Macros
(define-library (picrin macro) (define-library (picrin macro)
(import (scheme base) (import (picrin base core)
(scheme base)
(picrin dictionary)) (picrin dictionary))
;; assumes no derived expressions are provided yet ;; assumes no derived expressions are provided yet

View File

@ -1,5 +1,9 @@
(define-library (scheme base) (define-library (scheme base)
(import (picrin macro)) (import (picrin base core)
(picrin macro))
(export define set! lambda quote
if begin define-syntax)
;; core syntax ;; core syntax

View File

@ -62,10 +62,7 @@ pic_init_core(pic_state *pic)
{ {
size_t ai = pic_gc_arena_preserve(pic); size_t ai = pic_gc_arena_preserve(pic);
pic_deflibrary (pic, "(scheme base)") { pic_deflibrary (pic, "(picrin base core)") {
/* load core syntaces */
pic->lib->env = pic_null_syntactic_environment(pic);
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE, pic->rDEFINE); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE, pic->rDEFINE);
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sSETBANG, pic->rSETBANG); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sSETBANG, pic->rSETBANG);
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sQUOTE, pic->rQUOTE); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sQUOTE, pic->rQUOTE);
@ -73,7 +70,9 @@ pic_init_core(pic_state *pic)
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sIF, pic->rIF); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sIF, pic->rIF);
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sBEGIN, pic->rBEGIN); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sBEGIN, pic->rBEGIN);
pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE_SYNTAX, pic->rDEFINE_SYNTAX); pic_define_syntactic_keyword(pic, pic->lib->env, pic->sDEFINE_SYNTAX, pic->rDEFINE_SYNTAX);
}
pic_deflibrary (pic, "(scheme base)") {
pic_init_bool(pic); DONE; pic_init_bool(pic); DONE;
pic_init_pair(pic); DONE; pic_init_pair(pic); DONE;
pic_init_port(pic); DONE; pic_init_port(pic); DONE;