summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
Diffstat (limited to 'lisplib.c')
-rw-r--r--lisplib.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/lisplib.c b/lisplib.c
index 37b21ba0..a97f741f 100644
--- a/lisplib.c
+++ b/lisplib.c
@@ -936,6 +936,23 @@ static val pic_set_entries(val dlt, val fun)
return nil;
}
+static val constfun_instantiate(val set_fun)
+{
+ funcall1(set_fun, nil);
+ load(scat2(stdlib_path, lit("constfun")));
+ return nil;
+}
+
+static val constfun_set_entries(val dlt, val fun)
+{
+ val sys_name[] = {
+ lit("%const-foldable%"),
+ nil
+ };
+ set_dlt_entries_sys(dlt, sys_name, fun);
+ return nil;
+}
+
val dlt_register(val dlt,
val (*instantiate)(val),
val (*set_entries)(val, val))
@@ -993,6 +1010,7 @@ void lisplib_init(void)
dlt_register(dl_table, match_instantiate, match_set_entries);
dlt_register(dl_table, doc_instantiate, doc_set_entries);
dlt_register(dl_table, pic_instantiate, pic_set_entries);
+ dlt_register(dl_table, constfun_instantiate, constfun_set_entries);
reg_fun(intern(lit("try-load"), system_package), func_n1(lisplib_try_load));
}