guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-80-gc2e56d


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.0-80-gc2e56d9
Date: Tue, 08 Mar 2011 20:54:43 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=c2e56d9b0727d50a90917ea6b79f17ebe2d35c98

The branch, stable-2.0 has been updated
       via  c2e56d9b0727d50a90917ea6b79f17ebe2d35c98 (commit)
       via  13459a961946526dc8f1277a6d4d319f848da1ab (commit)
      from  f32e67be0b1390f22382eed10459016ca37c126d (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit c2e56d9b0727d50a90917ea6b79f17ebe2d35c98
Author: Andy Wingo <address@hidden>
Date:   Tue Mar 8 21:53:02 2011 +0100

    eval-string docs
    
    * doc/ref/api-evaluation.texi (Fly Evaluation): Update eval-string
      documentation.

commit 13459a961946526dc8f1277a6d4d319f848da1ab
Author: Andy Wingo <address@hidden>
Date:   Tue Mar 8 21:06:12 2011 +0100

    document scm_call_{5,6,n}
    
    * doc/ref/api-evaluation.texi (Fly Evaluation): Document
      scm_call_{5,6,n}.

-----------------------------------------------------------------------

Summary of changes:
 doc/ref/api-evaluation.texi |   57 +++++++++++++++++++++++++++++++++++-------
 1 files changed, 47 insertions(+), 10 deletions(-)

diff --git a/doc/ref/api-evaluation.texi b/doc/ref/api-evaluation.texi
index b976715..682e844 100644
--- a/doc/ref/api-evaluation.texi
+++ b/doc/ref/api-evaluation.texi
@@ -426,7 +426,9 @@ Modify the print options.
 @node Fly Evaluation
 @subsection Procedures for On the Fly Evaluation
 
address@hidden
+Scheme has the lovely property that its expressions may be represented
+as data.  The @code{eval} procedure takes a Scheme datum and evaluates
+it as code.
 
 @rnindex eval
 @c ARGFIXME environment/environment specifier
@@ -451,19 +453,46 @@ return the environment in which the implementation would
 evaluate expressions dynamically typed by the user.
 @end deffn
 
address@hidden {Scheme Procedure} eval-string string [module]
address@hidden {C Function} scm_eval_string (string)
address@hidden, for other environments.
+
+One does not always receive code as Scheme data, of course, and this is
+especially the case for Guile's other language implementations
+(@pxref{Other Languages}).  For the case in which all you have is a
+string, we have @code{eval-string}.  There is a legacy version of this
+procedure in the default environment, but you really want the one from
address@hidden(ice-9 eval-string)}, so load it up:
+
address@hidden
+(use-modules (ice-9 eval-string))
address@hidden example
+
address@hidden {Scheme Procedure} eval-string string [module=#f] [file=#f] 
[line=#f] [column=#f] [lang=(current-language)] [compile?=#f]
+Parse @var{string} according to the current language, normally Scheme.
+Evaluate or compile the expressions it contains, in order, returning the
+last expression.
+
+If the @var{module} keyword argument is set, save a module excursion
+(@pxref{Module System Reflection}) and set the current module to
address@hidden before evaluation.
+
+The @var{file}, @var{line}, and @var{column} keyword arguments can be
+used to indicate that the source string begins at a particular source
+location.
+
+Finally, @var{lang} is a language, defaulting to the current language,
+and the expression is compiled if @var{compile?} is true or there is no
+evaluator for the given language.
address@hidden deffn
+
address@hidden {C Function} scm_eval_string (string)
 @deffnx {C Function} scm_eval_string_in_module (string, module)
-Evaluate @var{string} as the text representation of a Scheme form or
-forms, and return whatever value they produce.  Evaluation takes place
-in the given module, or in the current module when no module is given.
-While the code is evaluated, the given module is made the current one.
-The current module is restored when this procedure returns.
+These C bindings call @code{eval-string} from @code{(ice-9
+eval-string)}, evaluating within @var{module} or the current module.
 @end deffn
 
 @deftypefn {C Function} SCM scm_c_eval_string (const char *string)
address@hidden, but taking a C string instead of an
address@hidden
address@hidden, but taking a C string in locale encoding instead
+of an @code{SCM}.
 @end deftypefn
 
 @deffn {Scheme Procedure} apply proc arg1 @dots{} argN arglst
@@ -493,9 +522,17 @@ then there's no @address@hidden@var{argN} and @var{arg} is 
the
 @deffnx {C Function} scm_call_2 (proc, arg1, arg2)
 @deffnx {C Function} scm_call_3 (proc, arg1, arg2, arg3)
 @deffnx {C Function} scm_call_4 (proc, arg1, arg2, arg3, arg4)
address@hidden {C Function} scm_call_5 (proc, arg1, arg2, arg3, arg4, arg5)
address@hidden {C Function} scm_call_6 (proc, arg1, arg2, arg3, arg4, arg5, 
arg6)
 Call @var{proc} with the given arguments.
 @end deffn
 
address@hidden {C Function} scm_call_n (proc, argv, nargs)
+Call @var{proc} with the array of arguments @var{argv}, as a
address@hidden  The length of the arguments should be passed in
address@hidden, as a @code{size_t}.
address@hidden deffn
+
 @deffn {Scheme Procedure} apply:nconc2last lst
 @deffnx {C Function} scm_nconc2last (lst)
 @var{lst} should be a list (@var{arg1} @dots{} @var{argN}


hooks/post-receive
-- 
GNU Guile



reply via email to

[Prev in Thread] Current Thread [Next in Thread]