guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. release_1-9-12-209-gd


From: Neil Jerram
Subject: [Guile-commits] GNU Guile branch, master, updated. release_1-9-12-209-gde6b3a5
Date: Tue, 12 Oct 2010 23:09:08 +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=de6b3a5cb919534773e9bde571bdf500dc604eff

The branch, master has been updated
       via  de6b3a5cb919534773e9bde571bdf500dc604eff (commit)
      from  a54f6dc037db1c7c8027422173234d56300762da (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 de6b3a5cb919534773e9bde571bdf500dc604eff
Author: Neil Jerram <address@hidden>
Date:   Wed Oct 13 00:08:27 2010 +0100

    Edit `Adding Methods to Generic Functions'
    
    * doc/ref/goops.texi (Adding Methods to Generic Functions): Move the
      bit about no applicable methods to `Invoking Generic Functions'.
      Other minor edits.
      (Basic Method Definition): Flattened into parent.
      (Method Definition Internals): Moved to MOP section at end of
      chapter.

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

Summary of changes:
 doc/ref/goops.texi |  210 +++++++++++++++++++++++++---------------------------
 1 files changed, 101 insertions(+), 109 deletions(-)

diff --git a/doc/ref/goops.texi b/doc/ref/goops.texi
index d43af60..9344e67 100644
--- a/doc/ref/goops.texi
+++ b/doc/ref/goops.texi
@@ -892,15 +892,7 @@ to that descendant's ancestors too.
 @node Adding Methods to Generic Functions
 @section Adding Methods to Generic Functions
 
address@hidden
-* Basic Method Definition::
-* Method Definition Internals::
address@hidden menu
-
address@hidden Basic Method Definition
address@hidden Basic Method Definition
-
-To add a method to a generic function, use the @code{define-method} form.
+To add a method to a generic function, use @code{define-method}.
 
 @deffn syntax define-method (generic parameter @dots{}) . body
 Define a method for the generic function or accessor @var{generic} with
@@ -924,14 +916,14 @@ can be applied.
 @var{body} is the body of the method definition.
 @end deffn
 
address@hidden expressions look a little like normal Scheme
-procedure definitions of the form
address@hidden expressions look a little like Scheme procedure
+definitions of the form
 
 @example
 (define (name formals @dots{}) . body)
 @end example
 
-The most important difference is that each formal parameter, apart from the
+The important difference is that each formal parameter, apart from the
 possible ``rest'' argument, can be qualified by a class name:
 @address@hidden becomes @code{(@var{formal} @var{class})}.  The
 meaning of this qualification is that the method being defined
@@ -951,97 +943,6 @@ only applicable to invocations of its generic function 
that have two
 parameters where the first parameter is an instance of the
 @code{<square>} class and the second parameter is a number.
 
-If a generic function is invoked with a combination of parameters for which
-there is no applicable method, GOOPS raises an error.  For more about
-invocation error handling, and generic function invocation in general,
-see @ref{Invoking Generic Functions}.
-
address@hidden Method Definition Internals
address@hidden Method Definition Internals
-
address@hidden
-
address@hidden @bullet
address@hidden
-checks the form of the first parameter, and applies the following steps
-to the accessor's setter if it has the @code{(setter @dots{})} form
-
address@hidden
-interpolates a call to @code{define-generic} or @code{define-accessor}
-if a generic function is not already defined with the supplied name
-
address@hidden
-calls @code{method} with the @var{parameter}s and @var{body}, to make a
-new method instance
-
address@hidden
-calls @code{add-method!} to add this method to the relevant generic
-function.
address@hidden itemize
-
address@hidden syntax method (parameter @dots{}) . body
-Make a method whose specializers are defined by the classes in
address@hidden and whose procedure definition is constructed from the
address@hidden symbols and @var{body} forms.
-
-The @var{parameter} and @var{body} parameters should be as for
address@hidden (@pxref{Basic Method Definition,, define-method}).
address@hidden deffn
-
address@hidden
-
address@hidden @bullet
address@hidden
-extracts formals and specializing classes from the @var{parameter}s,
-defaulting the class for unspecialized parameters to @code{<top>}
-
address@hidden
-creates a closure using the formals and the @var{body} forms
-
address@hidden
-calls @code{make} with metaclass @code{<method>} and the specializers
-and closure using the @code{#:specializers} and @code{#:procedure}
-keywords.
address@hidden itemize
-
address@hidden procedure make-method specializers procedure
-Make a method using @var{specializers} and @var{procedure}.
-
address@hidden should be a list of classes that specifies the
-parameter combinations to which this method will be applicable.
-
address@hidden should be the closure that will applied to the generic
-function parameters when this method is invoked.
address@hidden deffn
-
address@hidden is a simple wrapper around @code{make} with metaclass
address@hidden<method>}.
-
address@hidden generic add-method! target method
-Generic function for adding method @var{method} to @var{target}.
address@hidden deffn
-
address@hidden method add-method! (generic <generic>) (method <method>)
-Add method @var{method} to the generic function @var{generic}.
address@hidden deffn
-
address@hidden method add-method! (proc <procedure>) (method <method>)
-If @var{proc} is a procedure with generic capability (@pxref{Extending
-Primitives,, generic-capability?}), upgrade it to a primitive generic
-and add @var{method} to its generic function definition.
address@hidden deffn
-
address@hidden method add-method! (pg <primitive-generic>) (method <method>)
-Add method @var{method} to the generic function definition of @var{pg}.
-
-Implementation: @code{(add-method! (primitive-generic-generic pg) method)}.
address@hidden deffn
-
address@hidden method add-method! (whatever <top>) (method <method>)
-Raise an error indicating that @var{whatever} is not a valid generic
-function.
address@hidden deffn
-
 @node Invoking Generic Functions
 @section Invoking Generic Functions
 
@@ -1052,12 +953,15 @@ the remaining elements of the list.  [ *fixme* How do I 
put this in a
 more Schemely and less Lispy way? ]
 
 Usually a generic function contains several method definitions, with
-varying degrees of formal parameter specialization (@pxref{Basic
-Method Definition,, define-method}).  So it is necessary to sort these
-methods by specificity with respect to the supplied arguments, and then
-apply the most specific method definition.  Less specific methods
-may be applied subsequently if a method that is being applied calls
address@hidden
+varying degrees of formal parameter specialization (@pxref{Adding
+Methods to Generic Functions,, define-method}).  So it is necessary to
+sort these methods by specificity with respect to the supplied
+arguments, and then apply the most specific method definition.  Less
+specific methods may be applied subsequently if a method that is being
+applied calls @code{next-method}.
+
+If a generic function is invoked with a combination of parameters for
+which there is no applicable method, GOOPS raises an error.
 
 @menu
 * Determining Which Methods to Apply::
@@ -1689,6 +1593,7 @@ GOOPS' power, by customizing the behaviour of GOOPS 
itself.
 * Customizing Instance Creation::
 * Class Redefinition::
 * Method Definition::
+* Method Definition Internals::
 * Generic Function Internals::
 * Generic Function Invocation::
 @end menu
@@ -2575,6 +2480,93 @@ By defining further methods for @code{add-method!}, you 
can
 theoretically handle adding methods to further types of target.
 @end itemize
 
address@hidden Method Definition Internals
address@hidden Method Definition Internals
+
address@hidden
+
address@hidden @bullet
address@hidden
+checks the form of the first parameter, and applies the following steps
+to the accessor's setter if it has the @code{(setter @dots{})} form
+
address@hidden
+interpolates a call to @code{define-generic} or @code{define-accessor}
+if a generic function is not already defined with the supplied name
+
address@hidden
+calls @code{method} with the @var{parameter}s and @var{body}, to make a
+new method instance
+
address@hidden
+calls @code{add-method!} to add this method to the relevant generic
+function.
address@hidden itemize
+
address@hidden syntax method (parameter @dots{}) . body
+Make a method whose specializers are defined by the classes in
address@hidden and whose procedure definition is constructed from the
address@hidden symbols and @var{body} forms.
+
+The @var{parameter} and @var{body} parameters should be as for
address@hidden (@pxref{Adding Methods to Generic Functions,,
+define-method}).
address@hidden deffn
+
address@hidden
+
address@hidden @bullet
address@hidden
+extracts formals and specializing classes from the @var{parameter}s,
+defaulting the class for unspecialized parameters to @code{<top>}
+
address@hidden
+creates a closure using the formals and the @var{body} forms
+
address@hidden
+calls @code{make} with metaclass @code{<method>} and the specializers
+and closure using the @code{#:specializers} and @code{#:procedure}
+keywords.
address@hidden itemize
+
address@hidden procedure make-method specializers procedure
+Make a method using @var{specializers} and @var{procedure}.
+
address@hidden should be a list of classes that specifies the
+parameter combinations to which this method will be applicable.
+
address@hidden should be the closure that will applied to the generic
+function parameters when this method is invoked.
address@hidden deffn
+
address@hidden is a simple wrapper around @code{make} with metaclass
address@hidden<method>}.
+
address@hidden generic add-method! target method
+Generic function for adding method @var{method} to @var{target}.
address@hidden deffn
+
address@hidden method add-method! (generic <generic>) (method <method>)
+Add method @var{method} to the generic function @var{generic}.
address@hidden deffn
+
address@hidden method add-method! (proc <procedure>) (method <method>)
+If @var{proc} is a procedure with generic capability (@pxref{Extending
+Primitives,, generic-capability?}), upgrade it to a primitive generic
+and add @var{method} to its generic function definition.
address@hidden deffn
+
address@hidden method add-method! (pg <primitive-generic>) (method <method>)
+Add method @var{method} to the generic function definition of @var{pg}.
+
+Implementation: @code{(add-method! (primitive-generic-generic pg) method)}.
address@hidden deffn
+
address@hidden method add-method! (whatever <top>) (method <method>)
+Raise an error indicating that @var{whatever} is not a valid generic
+function.
address@hidden deffn
+
 @node Generic Function Internals
 @subsection Generic Function Internals
 


hooks/post-receive
-- 
GNU Guile



reply via email to

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