klisp

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

kpromise.h (452B)


      1 /*
      2 ** kpromise.h
      3 ** Kernel Promises
      4 ** See Copyright Notice in klisp.h
      5 */
      6 
      7 #ifndef kpromise_h
      8 #define kpromise_h
      9 
     10 #include "kobject.h"
     11 #include "kstate.h"
     12 #include "kpair.h"
     13 
     14 /* GC: Assumes exp & maybe_env are roooted */
     15 TValue kmake_promise(klisp_State *K, TValue exp, TValue maybe_env);
     16 
     17 #define kpromise_node(p_) (tv2prom(p_)->node)
     18 #define kpromise_exp(p_) (kcar(kpromise_node(p_)))
     19 #define kpromise_maybe_env(p_) (kcdr(kpromise_node(p_)))
     20 
     21 #endif