klisp

an open source interpreter for the Kernel Programming Language.
git clone http://git.hanabi.in/repos/klisp.git
Log | Files | Refs | README

commit 87a85e4c4b699d679d82a5ac46751a011113b394
parent abfaf010de22d77a55b33002ed070d7159666f31
Author: Andres Navarro <canavarro82@gmail.com>
Date:   Thu, 24 Mar 2011 00:18:49 -0300

Added make-kernel-standard-environment to the ground environment.

Diffstat:
Msrc/kgenvironments.c | 11++++++++++-
Msrc/kgenvironments.h | 3++-
Msrc/kground.c | 3++-
3 files changed, 14 insertions(+), 3 deletions(-)

diff --git a/src/kgenvironments.c b/src/kgenvironments.c @@ -84,7 +84,16 @@ void get_current_environment(klisp_State *K, TValue *xparams, TValue ptree, } /* 6.7.3 make-kernel-standard-environment */ -/* TODO */ +void make_kernel_standard_environment(klisp_State *K, TValue *xparams, + TValue ptree, TValue denv) +{ + UNUSED(xparams); + UNUSED(denv); + check_0p(K, "make-kernel-standard-environment", ptree); + + TValue new_env = kmake_environment(K, K->ground_env); + kapply_cc(K, new_env); +} /* 6.7.4 $let* */ /* TODO */ diff --git a/src/kgenvironments.h b/src/kgenvironments.h @@ -43,7 +43,8 @@ void get_current_environment(klisp_State *K, TValue *xparams, TValue ptree, TValue denv); /* 6.7.3 make-kernel-standard-environment */ -/* TODO */ +void make_kernel_standard_environment(klisp_State *K, TValue *xparams, + TValue ptree, TValue denv); /* 6.7.4 $let* */ /* TODO */ diff --git a/src/kground.c b/src/kground.c @@ -447,7 +447,8 @@ void kinit_ground_env(klisp_State *K) get_current_environment, 0); /* 6.7.3 make-kernel-standard-environment */ - /* TODO */ + add_applicative(K, ground_env, "make-kernel-standard-environment", + make_kernel_standard_environment, 0); /* 6.7.4 $let* */ /* TODO */