diff --git a/src/init.c b/src/init.c index 8e9f933e..d9a48cf6 100644 --- a/src/init.c +++ b/src/init.c @@ -24,6 +24,20 @@ pic_features(pic_state *pic) return features; } +static pic_value +pic_libraries(pic_state *pic) +{ + pic_value libs = pic_nil_value(), lib; + + pic_get_args(pic, ""); + + pic_for_each (lib, pic->libs) { + libs = pic_cons(pic, pic_car(pic, lib), libs); + } + + return libs; +} + void pic_init_bool(pic_state *); void pic_init_pair(pic_state *); void pic_init_port(pic_state *); @@ -96,10 +110,12 @@ pic_init_core(pic_state *pic) pic_init_lib(pic); DONE; pic_load_piclib(pic); DONE; - pic_init_contrib(pic); DONE; pic_defun(pic, "features", pic_features); + } + pic_deflibrary (pic, "(picrin library)") { + pic_defun(pic, "libraries", pic_libraries); } }