diff --git a/info/guile.info b/info/guile.info index a2483c5f..73a79e72 100644 --- a/info/guile.info +++ b/info/guile.info @@ -1,8 +1,8 @@ This is guile.info, produced by makeinfo version 6.7 from guile.texi. -This manual documents Guile version 3.0.4. +This manual documents Guile version 3.0.8. - Copyright (C) 1996-1997, 2000-2005, 2009-2020 Free Software + Copyright (C) 1996-1997, 2000-2005, 2009-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -22,9 +22,9 @@ File: guile.info, Node: Top, Next: Preface, Prev: (dir), Up: (dir) The Guile Reference Manual ************************** -This manual documents Guile version 3.0.4. +This manual documents Guile version 3.0.8. - Copyright (C) 1996-1997, 2000-2005, 2009-2020 Free Software + Copyright (C) 1996-1997, 2000-2005, 2009-2021 Free Software Foundation, Inc. Permission is granted to copy, distribute and/or modify this document @@ -74,7 +74,7 @@ Preface This manual describes how to use Guile, GNU’s Ubiquitous Intelligent Language for Extensions. It relates particularly to Guile version -3.0.4. +3.0.8. * Menu: @@ -385,19 +385,19 @@ File: guile.info, Node: Obtaining and Installing Guile, Next: Organisation of Guile can be obtained from the main GNU archive site or any of its mirrors. The file will be named guile-VERSION.tar.gz. -The current version is 3.0.4, so the file you should grab is: +The current version is 3.0.8, so the file you should grab is: - + To unbundle Guile use the instruction - zcat guile-3.0.4.tar.gz | tar xvf - + zcat guile-3.0.8.tar.gz | tar xvf - -which will create a directory called ‘guile-3.0.4’ with all the sources. +which will create a directory called ‘guile-3.0.8’ with all the sources. You can look at the file ‘INSTALL’ for detailed instructions on how to build and install Guile, but you should be able to just do - cd guile-3.0.4 + cd guile-3.0.8 ./configure make make install @@ -757,7 +757,7 @@ and call ‘load-extension’ directly in the body of the module. scheme@(guile-user)> (j0 2) $1 = 0.223890779141236 - *Note Modules and Extensions::, for more information. + *Note Foreign Extensions::, for more information.  File: guile.info, Node: Reporting Bugs, Prev: Using the Guile Module System, Up: Hello Guile! @@ -2693,6 +2693,13 @@ of Guile: (Note: The line breaks, above, are for documentation purposes only, and not required in the actual example.) +‘GUILE_EXTENSIONS_PATH’ + This variable may be used to augment the path that is searched for + foreign libraries via ‘load-extension’, ‘dynamic-link’, + ‘load-foreign-library’, or the like. Its value should be a + colon-separated (semicolon on Windows) list of directories. *Note + Foreign Libraries::. + ‘GUILE_WARN_DEPRECATED’ As Guile evolves, some features will be eliminated or replaced by newer features. To help users migrate their code as this evolution @@ -3973,7 +3980,7 @@ variables: ‘extensiondir’ The default directory where Guile looks for extensions—i.e., shared - libraries providing additional features (*note Modules and + libraries providing additional features (*note Foreign Extensions::). Run ‘pkg-config guile-3.0 --variable=extensiondir’ to see its value. @@ -6049,8 +6056,7 @@ from the least amount of C level work. and exporting functions and application objects such that they can be seen and manipulated on the Scheme level. To help with this, Guile’s C language interface includes utility features that aim to make this kind -of integration very easy for the application developer. These features -are documented later in this part of the manual: see REFFIXME. +of integration very easy for the application developer. This model, though, is really just one of a range of possible programming options. If all of the functionality that you need is @@ -6135,7 +6141,9 @@ is not already written, most of the difficulties of memory management can be avoided by using Guile’s C interface features from the start. For the full documentation on writing C code for Guile and connecting -existing C code to the Guile world, see REFFIXME. +existing C code to the Guile world, see *note Defining New Foreign +Object Types::, *note Primitive Procedures::, and *note Foreign Function +Interface::.  File: guile.info, Node: Basic Constraints, Next: Style Choices, Prev: Available Functionality, Up: Programming Options @@ -6508,8 +6516,6 @@ available through both Scheme and C interfaces. * Initialization:: Initializing Guile. * Snarfing Macros:: Macros for snarfing initialization actions. * Data Types:: Representing values in Guile. -* Foreign Objects:: Defining new data types in C. -* Smobs:: Use foreign objects instead. * Procedures:: Procedures. * Macros:: Extending the syntax of Scheme. * Utility Functions:: General utility functions. @@ -6523,6 +6529,8 @@ available through both Scheme and C interfaces. * Memory Management:: Memory management and garbage collection. * Modules:: Designing reusable code libraries. * Foreign Function Interface:: Interacting with C procedures and data. +* Foreign Objects:: Defining new data types in C. +* Smobs:: Use foreign objects instead. * Scheduling:: Threads, mutexes, asyncs and dynamic roots. * Options and Config:: Configuration, features and runtime options. * Other Languages:: Emacs Lisp, ECMAScript, and more. @@ -6867,7 +6875,7 @@ is processed by ‘guile-snarf’. always set to VALUE.  -File: guile.info, Node: Data Types, Next: Foreign Objects, Prev: Snarfing Macros, Up: API Reference +File: guile.info, Node: Data Types, Next: Procedures, Prev: Snarfing Macros, Up: API Reference 6.6 Data Types ============== @@ -10710,7 +10718,6 @@ itself, whereas an unquoted ‘hello’ is _read_ as the symbol named * Symbol Keys:: Symbols as lookup keys. * Symbol Variables:: Symbols as denoting variables. * Symbol Primitives:: Operations related to symbols. -* Symbol Props:: Function slots and property lists. * Symbol Read Syntax:: Extended read syntax for symbols. * Symbol Uninterned:: Uninterned symbols. @@ -10866,7 +10873,7 @@ created, and *note Modules::, for how those associations are affected by Guile’s module system.  -File: guile.info, Node: Symbol Primitives, Next: Symbol Props, Prev: Symbol Variables, Up: Symbols +File: guile.info, Node: Symbol Primitives, Next: Symbol Read Syntax, Prev: Symbol Variables, Up: Symbols 6.6.6.4 Operations Related to Symbols ..................................... @@ -11039,75 +11046,9 @@ Symbol Uninterned::), though they can’t be usefully written out and read back in.  -File: guile.info, Node: Symbol Props, Next: Symbol Read Syntax, Prev: Symbol Primitives, Up: Symbols +File: guile.info, Node: Symbol Read Syntax, Next: Symbol Uninterned, Prev: Symbol Primitives, Up: Symbols -6.6.6.5 Function Slots and Property Lists -......................................... - -In traditional Lisp dialects, symbols are often understood as having -three kinds of value at once: - - • a “variable” value, which is used when the symbol appears in code - in a variable reference context - - • a “function” value, which is used when the symbol appears in code - in a function name position (i.e. as the first element in an - unquoted list) - - • a “property list” value, which is used when the symbol is given as - the first argument to Lisp’s ‘put’ or ‘get’ functions. - - Although Scheme (as one of its simplifications with respect to Lisp) -does away with the distinction between variable and function namespaces, -Guile currently retains some elements of the traditional structure in -case they turn out to be useful when implementing translators for other -languages, in particular Emacs Lisp. - - Specifically, Guile symbols have two extra slots, one for a symbol’s -property list, and one for its “function value.” The following -procedures are provided to access these slots. - - -- Scheme Procedure: symbol-fref symbol - -- C Function: scm_symbol_fref (symbol) - Return the contents of SYMBOL’s “function slot”. - - -- Scheme Procedure: symbol-fset! symbol value - -- C Function: scm_symbol_fset_x (symbol, value) - Set the contents of SYMBOL’s function slot to VALUE. - - -- Scheme Procedure: symbol-pref symbol - -- C Function: scm_symbol_pref (symbol) - Return the “property list” currently associated with SYMBOL. - - -- Scheme Procedure: symbol-pset! symbol value - -- C Function: scm_symbol_pset_x (symbol, value) - Set SYMBOL’s property list to VALUE. - - -- Scheme Procedure: symbol-property sym prop - From SYM’s property list, return the value for property PROP. The - assumption is that SYM’s property list is an association list whose - keys are distinguished from each other using ‘equal?’; PROP should - be one of the keys in that list. If the property list has no entry - for PROP, ‘symbol-property’ returns ‘#f’. - - -- Scheme Procedure: set-symbol-property! sym prop val - In SYM’s property list, set the value for property PROP to VAL, or - add a new entry for PROP, with value VAL, if none already exists. - For the structure of the property list, see ‘symbol-property’. - - -- Scheme Procedure: symbol-property-remove! sym prop - From SYM’s property list, remove the entry for property PROP, if - there is one. For the structure of the property list, see - ‘symbol-property’. - - Support for these extra slots may be removed in a future release, and -it is probably better to avoid using them. For a more modern and -Schemely approach to properties, see *note Object Properties::. - - -File: guile.info, Node: Symbol Read Syntax, Next: Symbol Uninterned, Prev: Symbol Props, Up: Symbols - -6.6.6.6 Extended Read Syntax for Symbols +6.6.6.5 Extended Read Syntax for Symbols ........................................ The read syntax for a symbol is a sequence of letters, digits, and @@ -11168,7 +11109,7 @@ the following expressions:  File: guile.info, Node: Symbol Uninterned, Prev: Symbol Read Syntax, Up: Symbols -6.6.6.7 Uninterned Symbols +6.6.6.6 Uninterned Symbols .......................... What makes symbols useful is that they are automatically kept unique. @@ -11838,7 +11779,7 @@ that modifying the elements of the new list also modifies the elements of the old list. On the other hand, applying procedures like ‘set-cdr!’ or ‘delv!’ to the new list will not alter the old list. If you also need to copy the list elements (making a deep copy), use the procedure -‘copy-tree’ (*note Copying::). +‘copy-tree’ from ‘(ice-9 copy-tree)’ (*note Copying::).  File: guile.info, Node: List Selection, Next: Append/Reverse, Prev: List Constructors, Up: Lists @@ -12092,12 +12033,12 @@ position of the accessed element in the list. Vectors can contain any kind of Scheme object; it is even possible to have different types of objects in the same vector. For vectors -containing vectors, you may wish to use arrays, instead. Note, too, -that vectors are the special case of one dimensional non-uniform arrays -and that most array procedures operate happily on vectors (*note -Arrays::). +containing vectors, you may wish to use *note arrays: Arrays. instead. +Note, too, that vectors are a special case of one dimensional +non-uniform arrays and that array procedures operate happily on vectors. - Also see *note SRFI-43::, for a comprehensive vector library. + Also see *note SRFI-43::, *note R6RS Support::, or *note R7RS +Support::, for more comprehensive vector libraries. * Menu: @@ -12230,14 +12171,33 @@ error. -- C Function: void scm_c_vector_set_x (SCM vec, size_t k, SCM obj) Store OBJ in position K (a ‘size_t’) of VEC. - -- Scheme Procedure: vector-fill! vec fill + -- Scheme Procedure: vector-fill! vec fill [start [end]] -- C Function: scm_vector_fill_x (vec, fill) - Store FILL in every position of VEC. The value returned by - ‘vector-fill!’ is unspecified. + Store FILL in every position of VEC in the range [START ... END). + START defaults to 0 and END defaults to the length of VEC. - -- Scheme Procedure: vector-copy vec + The value returned by ‘vector-fill!’ is unspecified. + + -- Scheme Procedure: vector-copy vec [start [end]] -- C Function: scm_vector_copy (vec) - Return a copy of VEC. + Returns a freshly allocated vector containing the elements of VEC + in the range [START ... END). START defaults to 0 and END + defaults to the length of VEC. + + -- Scheme Procedure: vector-copy! dst at src [start [end]] + Copy the block of elements from vector SRC in the range [START ... + END) into vector DST, starting at position AT. AT and START + default to 0 and END defaults to the length of SRC. + + It is an error for DST to have a length less than AT + (END - + START). + + The order in which elements are copied is unspecified, except that + if the source and destination overlap, copying takes place as if + the source is first copied into a temporary vector and then into + the destination. + + The value returned by ‘vector-copy!’ is unspecified. -- Scheme Procedure: vector-move-left! vec1 start1 end1 vec2 start2 -- C Function: scm_vector_move_left_x (vec1, start1, end1, vec2, @@ -12251,6 +12211,8 @@ error. ‘vector-move-left!’ is usually appropriate when START1 is greater than START2. + The value returned by ‘vector-move-left!’ is unspecified. + -- Scheme Procedure: vector-move-right! vec1 start1 end1 vec2 start2 -- C Function: scm_vector_move_right_x (vec1, start1, end1, vec2, start2) @@ -12263,60 +12225,55 @@ error. vector, ‘vector-move-right!’ is usually appropriate when START1 is less than START2. + The value returned by ‘vector-move-right!’ is unspecified. +  File: guile.info, Node: Vector Accessing from C, Next: Uniform Numeric Vectors, Prev: Vector Accessors, Up: Vectors 6.6.10.4 Vector Accessing from C ................................ -A vector can be read and modified from C with the functions -‘scm_c_vector_ref’ and ‘scm_c_vector_set_x’, for example. In addition -to these functions, there are two more ways to access vectors from C -that might be more efficient in certain situations: you can restrict -yourself to “simple vectors” and then use the very fast _simple vector -macros_; or you can use the very general framework for accessing all -kinds of arrays (*note Accessing Arrays from C::), which is more -verbose, but can deal efficiently with all kinds of vectors (and -arrays). For vectors, you can use the ‘scm_vector_elements’ and -‘scm_vector_writable_elements’ functions as shortcuts. - - -- C Function: int scm_is_simple_vector (SCM obj) - Return non-zero if OBJ is a simple vector, else return zero. A - simple vector is a vector that can be used with the ‘SCM_SIMPLE_*’ - macros below. - - The following functions are guaranteed to return simple vectors: - ‘scm_make_vector’, ‘scm_c_make_vector’, ‘scm_vector’, - ‘scm_list_to_vector’. +A vector can be read and modified from C with the functions *note +‘scm_c_vector_ref’: x-scm_c_vector_ref. and *note ‘scm_c_vector_set_x’: +x-scm_c_vector_set_x. In addition to these functions, there are two +other ways to access vectors from C that might be more efficient in +certain situations: you can use the unsafe _vector macros_; or you can +use the general framework for accessing all kinds of arrays (*note +Accessing Arrays from C::), which is more verbose, but can deal +efficiently with all kinds of vectors (and arrays). For arrays of rank +1 whose backing store is a vector, you can use the ‘scm_vector_elements’ +and ‘scm_vector_writable_elements’ functions as shortcuts. -- C Macro: size_t SCM_SIMPLE_VECTOR_LENGTH (SCM vec) - Evaluates to the length of the simple vector VEC. No type checking - is done. + Evaluates to the length of the vector VEC. No type checking is + done. -- C Macro: SCM SCM_SIMPLE_VECTOR_REF (SCM vec, size_t idx) - Evaluates to the element at position IDX in the simple vector VEC. - No type or range checking is done. + Evaluates to the element at position IDX in the vector VEC. No + type or range checking is done. -- C Macro: void SCM_SIMPLE_VECTOR_SET (SCM vec, size_t idx, SCM val) - Sets the element at position IDX in the simple vector VEC to VAL. - No type or range checking is done. + Sets the element at position IDX in the vector VEC to VAL. No type + or range checking is done. - -- C Function: const SCM * scm_vector_elements (SCM vec, + -- C Function: const SCM * scm_vector_elements (SCM array, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp) - Acquire a handle for the vector VEC and return a pointer to the - elements of it. This pointer can only be used to read the elements - of VEC. When VEC is not a vector, an error is signaled. The - handle must eventually be released with ‘scm_array_handle_release’. + Acquire a *note handle: Accessing Arrays from C. for ARRAY and + return a read-only pointer to its elements. ARRAY must be either a + vector, or an array of rank 1 whose backing store is a vector; + otherwise an error is signaled. The handle must eventually be + released with *note ‘scm_array_handle_release’: + x-scm_array_handle_release. The variables pointed to by LENP and INCP are filled with the - number of elements of the vector and the increment (number of + number of elements of the array and the increment (number of elements) between successive elements, respectively. Successive - elements of VEC need not be contiguous in their underlying “root + elements of ARRAY need not be contiguous in their underlying “root vector” returned here; hence the increment is not necessarily equal to 1 and may well be negative too (*note Shared Arrays::). The following example shows the typical way to use this function. - It creates a list of all elements of VEC (in reverse order). + It creates a list of all elements of ARRAY (in reverse order). scm_t_array_handle handle; size_t i, len; @@ -12324,26 +12281,26 @@ arrays). For vectors, you can use the ‘scm_vector_elements’ and const SCM *elt; SCM list; - elt = scm_vector_elements (vec, &handle, &len, &inc); + elt = scm_vector_elements (array, &handle, &len, &inc); list = SCM_EOL; for (i = 0; i < len; i++, elt += inc) list = scm_cons (*elt, list); scm_array_handle_release (&handle); - -- C Function: SCM * scm_vector_writable_elements (SCM vec, + -- C Function: SCM * scm_vector_writable_elements (SCM array, scm_t_array_handle *handle, size_t *lenp, ssize_t *incp) Like ‘scm_vector_elements’ but the pointer can be used to modify - the vector. + the array. The following example shows the typical way to use this function. - It fills a vector with ‘#t’. + It fills an array with ‘#t’. scm_t_array_handle handle; size_t i, len; ssize_t inc; SCM *elt; - elt = scm_vector_writable_elements (vec, &handle, &len, &inc); + elt = scm_vector_writable_elements (array, &handle, &len, &inc); for (i = 0; i < len; i++, elt += inc) *elt = SCM_BOOL_T; scm_array_handle_release (&handle); @@ -12416,6 +12373,12 @@ can thus be used with the array procedures, *Note Arrays::. Return a new list initialized with the elements of the bitvector VEC. + -- Scheme Procedure: bitvector-copy bitvector [start [end]] + -- C Function: scm_bitvector_copy (bitvector, start, end) + Returns a freshly allocated bitvector containing the elements of + BITVECTOR in the range [START ... END). START defaults to 0 and + END defaults to the length of BITVECTOR. + -- Scheme Procedure: bitvector-count bitvector Return a count of how many entries in BITVECTOR are set. @@ -12604,18 +12567,22 @@ procedures and C functions. Return is BV1 equals to BV2—i.e., if they have the same length and contents. - -- Scheme Procedure: bytevector-fill! bv fill + -- Scheme Procedure: bytevector-fill! bv fill [start [end]] -- C Function: scm_bytevector_fill_x (bv, fill) - Fill bytevector BV with FILL, a byte. + Fill positions [START ... END) of bytevector BV with byte FILL. + START defaults to 0 and END defaults to the length of BV.(1) -- Scheme Procedure: bytevector-copy! source source-start target target-start len -- C Function: scm_bytevector_copy_x (source, source_start, target, target_start, len) Copy LEN bytes from SOURCE into TARGET, starting reading from - SOURCE-START (a positive index within SOURCE) and start writing at - TARGET-START. It is permitted for the SOURCE and TARGET regions to - overlap. + SOURCE-START (a positive index within SOURCE) and writing at + TARGET-START. + + It is permitted for the SOURCE and TARGET regions to overlap. In + that case, copying takes place as if the source is first copied + into a temporary bytevector and then into the destination. -- Scheme Procedure: bytevector-copy bv -- C Function: scm_bytevector_copy (bv) @@ -12637,6 +12604,12 @@ type-checking; as such they should be used with care. -- C Macro: signed char * SCM_BYTEVECTOR_CONTENTS (bv) Return a pointer to the contents of bytevector BV. + ---------- Footnotes ---------- + + (1) R6RS defines ‘(bytevector-fill! bv fill)’. Arguments START and +END are a Guile extension (cf. *note ‘vector-fill!’: x-vector-fill!, +*note ‘string-fill!’: x-string-fill!.). +  File: guile.info, Node: Bytevectors as Integers, Next: Bytevectors and Integer Lists, Prev: Bytevector Manipulation, Up: Bytevectors @@ -13423,8 +13396,8 @@ File: guile.info, Node: Arrays as arrays of arrays, Next: Accessing Arrays fro 6.6.13.4 Arrays as arrays of arrays ................................... -Mathematically, one can see an array of rank n (an n-array) as an array -of lower rank where the elements are themselves arrays (‘cells’). +One can see an array of rank n (an n-array) as an array of lower rank +where the elements are themselves arrays (‘cells’). We speak of the first n-k dimensions of the array as the n-k-‘frame’ of the array, while the last k dimensions are the dimensions of the @@ -15667,314 +15640,9 @@ Regular Expressions::. manual; if you feel a link is missing here, please file a bug.  -File: guile.info, Node: Foreign Objects, Next: Smobs, Prev: Data Types, Up: API Reference +File: guile.info, Node: Procedures, Next: Macros, Prev: Data Types, Up: API Reference -6.7 Foreign Objects -=================== - -This chapter contains reference information related to defining and -working with foreign objects. *Note Defining New Foreign Object -Types::, for a tutorial-like introduction to foreign objects. - - -- C Type: scm_t_struct_finalize - This function type returns ‘void’ and takes one ‘SCM’ argument. - - -- C Function: SCM scm_make_foreign_object_type (SCM name, SCM slots, - scm_t_struct_finalize finalizer) - Create a fresh foreign object type. NAME is a symbol naming the - type. SLOTS is a list of symbols, each one naming a field in the - foreign object type. FINALIZER indicates the finalizer, and may be - ‘NULL’. - - We recommend that finalizers be avoided if possible. *Note Foreign -Object Memory Management::. Finalizers must be async-safe and -thread-safe. Again, *note Foreign Object Memory Management::. If you -are embedding Guile in an application that is not thread-safe, and you -define foreign object types that need finalization, you might want to -disable automatic finalization, and arrange to call -‘scm_manually_run_finalizers ()’ yourself. - - -- C Function: int scm_set_automatic_finalization_enabled (int - enabled_p) - Enable or disable automatic finalization. By default, Guile - arranges to invoke object finalizers automatically, in a separate - thread if possible. Passing a zero value for ENABLED_P will - disable automatic finalization for Guile as a whole. If you - disable automatic finalization, you will have to call - ‘scm_run_finalizers ()’ periodically. - - Unlike most other Guile functions, you can call - ‘scm_set_automatic_finalization_enabled’ before Guile has been - initialized. - - Return the previous status of automatic finalization. - - -- C Function: int scm_run_finalizers (void) - Invoke any pending finalizers. Returns the number of finalizers - that were invoked. This function should be called when automatic - finalization is disabled, though it may be called if it is enabled - as well. - - -- C Function: void scm_assert_foreign_object_type (SCM type, SCM val) - When VAL is a foreign object of the given TYPE, do nothing. - Otherwise, signal an error. - - -- C Function: SCM scm_make_foreign_object_0 (SCM type) - -- C Function: SCM scm_make_foreign_object_1 (SCM type, void *val0) - -- C Function: SCM scm_make_foreign_object_2 (SCM type, void *val0, - void *val1) - -- C Function: SCM scm_make_foreign_object_3 (SCM type, void *val0, - void *val1, void *val2) - -- C Function: SCM scm_make_foreign_object_n (SCM type, size_t n, void - *vals[]) - Make a new foreign object of the type with type TYPE and initialize - the first N fields to the given values, as appropriate. - - The number of fields for objects of a given type is fixed when the - type is created. It is an error to give more initializers than - there are fields in the value. It is perfectly fine to give fewer - initializers than needed; this is convenient when some fields are - of non-pointer types, and would be easier to initialize with the - setters described below. - - -- C Function: void* scm_foreign_object_ref (SCM obj, size_t n); - -- C Function: scm_t_bits scm_foreign_object_unsigned_ref (SCM obj, - size_t n); - -- C Function: scm_t_signed_bits scm_foreign_object_signed_ref (SCM - obj, size_t n); - Return the value of the Nth field of the foreign object OBJ. The - backing store for the fields is as wide as a ‘scm_t_bits’ value, - which is at least as wide as a pointer. The different variants - handle casting in a portable way. - - -- C Function: void scm_foreign_object_set_x (SCM obj, size_t n, void - *val); - -- C Function: void scm_foreign_object_unsigned_set_x (SCM obj, size_t - n, scm_t_bits val); - -- C Function: void scm_foreign_object_signed_set_x (SCM obj, size_t n, - scm_t_signed_bits val); - Set the value of the Nth field of the foreign object OBJ to VAL, - after portably converting to a ‘scm_t_bits’ value, if needed. - - One can also access foreign objects from Scheme. *Note Foreign -Objects and Scheme::, for some examples. - - (use-modules (system foreign-object)) - - -- Scheme Procedure: make-foreign-object-type name slots - [#:finalizer=#f] - Make a new foreign object type. See the above documentation for - ‘scm_make_foreign_object_type’; these functions are exactly - equivalent, except for the way in which the finalizer gets attached - to instances (an internal detail). - - The resulting value is a GOOPS class. *Note GOOPS::, for more on - classes in Guile. - - -- Scheme Syntax: define-foreign-object-type name constructor (slot - ...) [#:finalizer=#f] - A convenience macro to define a type, using - ‘make-foreign-object-type’, and bind it to NAME. A constructor - will be bound to CONSTRUCTOR, and getters will be bound to each of - SLOT.... - - -File: guile.info, Node: Smobs, Next: Procedures, Prev: Foreign Objects, Up: API Reference - -6.8 Smobs -========= - -A “smob” is a “small object”. Before foreign objects were introduced in -Guile 2.0.12 (*note Foreign Objects::), smobs were the preferred way to -for C code to define new kinds of Scheme objects. With the exception of -the so-called “applicable SMOBs” discussed below, smobs are now a legacy -interface and are headed for eventual deprecation. *Note Deprecation::. -New code should use the foreign object interface. - - This section contains reference information related to defining and -working with smobs. For a tutorial-like introduction to smobs, see -“Defining New Types (Smobs)” in previous versions of this manual. - - -- Function: scm_t_bits scm_make_smob_type (const char *name, size_t - size) - This function adds a new smob type, named NAME, with instance size - SIZE, to the system. The return value is a tag that is used in - creating instances of the type. - - If SIZE is 0, the default _free_ function will do nothing. - - If SIZE is not 0, the default _free_ function will deallocate the - memory block pointed to by ‘SCM_SMOB_DATA’ with ‘scm_gc_free’. The - WHAT parameter in the call to ‘scm_gc_free’ will be NAME. - - Default values are provided for the _mark_, _free_, _print_, and - _equalp_ functions. If you want to customize any of these - functions, the call to ‘scm_make_smob_type’ should be immediately - followed by calls to one or several of ‘scm_set_smob_mark’, - ‘scm_set_smob_free’, ‘scm_set_smob_print’, and/or - ‘scm_set_smob_equalp’. - - -- C Function: void scm_set_smob_free (scm_t_bits tc, size_t (*free) - (SCM obj)) - This function sets the smob freeing procedure (sometimes referred - to as a “finalizer”) for the smob type specified by the tag TC. TC - is the tag returned by ‘scm_make_smob_type’. - - The FREE procedure must deallocate all resources that are directly - associated with the smob instance OBJ. It must assume that all - ‘SCM’ values that it references have already been freed and are - thus invalid. - - It must also not call any libguile function or macro except - ‘scm_gc_free’, ‘SCM_SMOB_FLAGS’, ‘SCM_SMOB_DATA’, - ‘SCM_SMOB_DATA_2’, and ‘SCM_SMOB_DATA_3’. - - The FREE procedure must return 0. - - Note that defining a freeing procedure is not necessary if the - resources associated with OBJ consists only of memory allocated - with ‘scm_gc_malloc’ or ‘scm_gc_malloc_pointerless’ because this - memory is automatically reclaimed by the garbage collector when it - is no longer needed (*note ‘scm_gc_malloc’: Memory Blocks.). - - Smob free functions must be thread-safe. *Note Foreign Object Memory -Management::, for a discussion on finalizers and concurrency. If you -are embedding Guile in an application that is not thread-safe, and you -define smob types that need finalization, you might want to disable -automatic finalization, and arrange to call ‘scm_manually_run_finalizers -()’ yourself. *Note Foreign Objects::. - - -- C Function: void scm_set_smob_mark (scm_t_bits tc, SCM (*mark) (SCM - obj)) - This function sets the smob marking procedure for the smob type - specified by the tag TC. TC is the tag returned by - ‘scm_make_smob_type’. - - Defining a marking procedure is almost always the wrong thing to - do. It is much, much preferable to allocate smob data with the - ‘scm_gc_malloc’ and ‘scm_gc_malloc_pointerless’ functions, and - allow the GC to trace pointers automatically. - - Any mark procedures you see currently almost surely date from the - time of Guile 1.8, before the switch to the Boehm-Demers-Weiser - collector. Such smob implementations should be changed to just use - ‘scm_gc_malloc’ and friends, and to lose their mark function. - - If you decide to keep the mark function, note that it may be called - on objects that are on the free list. Please read and digest the - comments from the BDW GC’s ‘gc/gc_mark.h’ header. - - The MARK procedure must cause ‘scm_gc_mark’ to be called for every - ‘SCM’ value that is directly referenced by the smob instance OBJ. - One of these ‘SCM’ values can be returned from the procedure and - Guile will call ‘scm_gc_mark’ for it. This can be used to avoid - deep recursions for smob instances that form a list. - - It must not call any libguile function or macro except - ‘scm_gc_mark’, ‘SCM_SMOB_FLAGS’, ‘SCM_SMOB_DATA’, - ‘SCM_SMOB_DATA_2’, and ‘SCM_SMOB_DATA_3’. - - -- C Function: void scm_set_smob_print (scm_t_bits tc, int (*print) - (SCM obj, SCM port, scm_print_state* pstate)) - This function sets the smob printing procedure for the smob type - specified by the tag TC. TC is the tag returned by - ‘scm_make_smob_type’. - - The PRINT procedure should output a textual representation of the - smob instance OBJ to PORT, using information in PSTATE. - - The textual representation should be of the form ‘#’. - This ensures that ‘read’ will not interpret it as some other Scheme - value. - - It is often best to ignore PSTATE and just print to PORT with - ‘scm_display’, ‘scm_write’, ‘scm_simple_format’, and ‘scm_puts’. - - -- C Function: void scm_set_smob_equalp (scm_t_bits tc, SCM (*equalp) - (SCM obj1, SCM obj2)) - This function sets the smob equality-testing predicate for the smob - type specified by the tag TC. TC is the tag returned by - ‘scm_make_smob_type’. - - The EQUALP procedure should return ‘SCM_BOOL_T’ when OBJ1 is - ‘equal?’ to OBJ2. Else it should return ‘SCM_BOOL_F’. Both OBJ1 - and OBJ2 are instances of the smob type TC. - - -- C Function: void scm_assert_smob_type (scm_t_bits tag, SCM val) - When VAL is a smob of the type indicated by TAG, do nothing. Else, - signal an error. - - -- C Macro: int SCM_SMOB_PREDICATE (scm_t_bits tag, SCM exp) - Return true if EXP is a smob instance of the type indicated by TAG, - or false otherwise. The expression EXP can be evaluated more than - once, so it shouldn’t contain any side effects. - - -- C Function: SCM scm_new_smob (scm_t_bits tag, void *data) - -- C Function: SCM scm_new_double_smob (scm_t_bits tag, void *data, - void *data2, void *data3) - Make a new smob of the type with tag TAG and smob data DATA, DATA2, - and DATA3, as appropriate. - - The TAG is what has been returned by ‘scm_make_smob_type’. The - initial values DATA, DATA2, and DATA3 are of type ‘scm_t_bits’; - when you want to use them for ‘SCM’ values, these values need to be - converted to a ‘scm_t_bits’ first by using ‘SCM_UNPACK’. - - The flags of the smob instance start out as zero. - - -- C Macro: scm_t_bits SCM_SMOB_FLAGS (SCM obj) - Return the 16 extra bits of the smob OBJ. No meaning is predefined - for these bits, you can use them freely. - - -- C Macro: scm_t_bits SCM_SET_SMOB_FLAGS (SCM obj, scm_t_bits flags) - Set the 16 extra bits of the smob OBJ to FLAGS. No meaning is - predefined for these bits, you can use them freely. - - -- C Macro: scm_t_bits SCM_SMOB_DATA (SCM obj) - -- C Macro: scm_t_bits SCM_SMOB_DATA_2 (SCM obj) - -- C Macro: scm_t_bits SCM_SMOB_DATA_3 (SCM obj) - Return the first (second, third) immediate word of the smob OBJ as - a ‘scm_t_bits’ value. When the word contains a ‘SCM’ value, use - ‘SCM_SMOB_OBJECT’ (etc.) instead. - - -- C Macro: void SCM_SET_SMOB_DATA (SCM obj, scm_t_bits val) - -- C Macro: void SCM_SET_SMOB_DATA_2 (SCM obj, scm_t_bits val) - -- C Macro: void SCM_SET_SMOB_DATA_3 (SCM obj, scm_t_bits val) - Set the first (second, third) immediate word of the smob OBJ to - VAL. When the word should be set to a ‘SCM’ value, use - ‘SCM_SMOB_SET_OBJECT’ (etc.) instead. - - -- C Macro: SCM SCM_SMOB_OBJECT (SCM obj) - -- C Macro: SCM SCM_SMOB_OBJECT_2 (SCM obj) - -- C Macro: SCM SCM_SMOB_OBJECT_3 (SCM obj) - Return the first (second, third) immediate word of the smob OBJ as - a ‘SCM’ value. When the word contains a ‘scm_t_bits’ value, use - ‘SCM_SMOB_DATA’ (etc.) instead. - - -- C Macro: void SCM_SET_SMOB_OBJECT (SCM obj, SCM val) - -- C Macro: void SCM_SET_SMOB_OBJECT_2 (SCM obj, SCM val) - -- C Macro: void SCM_SET_SMOB_OBJECT_3 (SCM obj, SCM val) - Set the first (second, third) immediate word of the smob OBJ to - VAL. When the word should be set to a ‘scm_t_bits’ value, use - ‘SCM_SMOB_SET_DATA’ (etc.) instead. - - -- C Macro: SCM * SCM_SMOB_OBJECT_LOC (SCM obj) - -- C Macro: SCM * SCM_SMOB_OBJECT_2_LOC (SCM obj) - -- C Macro: SCM * SCM_SMOB_OBJECT_3_LOC (SCM obj) - Return a pointer to the first (second, third) immediate word of the - smob OBJ. Note that this is a pointer to ‘SCM’. If you need to - work with ‘scm_t_bits’ values, use ‘SCM_PACK’ and ‘SCM_UNPACK’, as - appropriate. - - -- Function: SCM scm_markcdr (SCM X) - Mark the references in the smob X, assuming that X’s first data - word contains an ordinary Scheme object, and X refers to no other - objects. This function simply returns X’s first data word. - - -File: guile.info, Node: Procedures, Next: Macros, Prev: Smobs, Up: API Reference - -6.9 Procedures +6.7 Procedures ============== * Menu: @@ -15992,7 +15660,7 @@ File: guile.info, Node: Procedures, Next: Macros, Prev: Smobs, Up: API Refer  File: guile.info, Node: Lambda, Next: Primitive Procedures, Up: Procedures -6.9.1 Lambda: Basic Procedure Creation +6.7.1 Lambda: Basic Procedure Creation -------------------------------------- A ‘lambda’ expression evaluates to a procedure. The environment which @@ -16032,7 +15700,7 @@ enclosed in the procedure is shown with this example: newly created location for the formal variables. ‘VARIABLE’ The procedure takes any number of arguments; when the - procedure is called, the sequence of actual arguments will + procedure is called, the sequence of actual arguments will be converted into a list and stored into the newly created location for the formal variable. ‘(VARIABLE1 ... VARIABLEN . VARIABLEN+1)’ @@ -16059,7 +15727,7 @@ enclosed in the procedure is shown with this example:  File: guile.info, Node: Primitive Procedures, Next: Compiled Procedures, Prev: Lambda, Up: Procedures -6.9.2 Primitive Procedures +6.7.2 Primitive Procedures -------------------------- Procedures written in C can be registered for use from Scheme, provided @@ -16091,7 +15759,7 @@ definition (‘scm_define’).  File: guile.info, Node: Compiled Procedures, Next: Optional Arguments, Prev: Primitive Procedures, Up: Procedures -6.9.3 Compiled Procedures +6.7.3 Compiled Procedures ------------------------- The evaluation strategy given in *note Lambda:: describes how procedures @@ -16241,7 +15909,7 @@ appropriate module first, though:  File: guile.info, Node: Optional Arguments, Next: Case-lambda, Prev: Compiled Procedures, Up: Procedures -6.9.4 Optional Arguments +6.7.4 Optional Arguments ------------------------ Scheme procedures, as defined in R5RS, can either handle a fixed number @@ -16268,7 +15936,7 @@ rest list.  File: guile.info, Node: lambda* and define*, Next: ice-9 optargs, Up: Optional Arguments -6.9.4.1 lambda* and define*. +6.7.4.1 lambda* and define*. ............................ ‘lambda*’ is like ‘lambda’, except with some extensions to allow @@ -16360,7 +16028,7 @@ optional and keyword arguments.  File: guile.info, Node: ice-9 optargs, Prev: lambda* and define*, Up: Optional Arguments -6.9.4.2 (ice-9 optargs) +6.7.4.2 (ice-9 optargs) ....................... Before Guile 2.0, ‘lambda*’ and ‘define*’ were implemented using macros @@ -16454,7 +16122,7 @@ current module.  File: guile.info, Node: Case-lambda, Next: Higher-Order Functions, Prev: Optional Arguments, Up: Procedures -6.9.5 Case-lambda +6.7.5 Case-lambda ----------------- R5RS’s rest arguments are indeed useful and very general, but they often @@ -16569,7 +16237,7 @@ to a required argument, as in the case of ‘f #:e 10’.  File: guile.info, Node: Higher-Order Functions, Next: Procedure Properties, Prev: Case-lambda, Up: Procedures -6.9.6 Higher-Order Functions +6.7.6 Higher-Order Functions ---------------------------- As a functional programming language, Scheme allows the definition of @@ -16619,7 +16287,7 @@ other procedures are provided and described below.  File: guile.info, Node: Procedure Properties, Next: Procedures with Setters, Prev: Higher-Order Functions, Up: Procedures -6.9.7 Procedure Properties and Meta-information +6.7.7 Procedure Properties and Meta-information ----------------------------------------------- In addition to the information that is strictly necessary to run, @@ -16684,7 +16352,7 @@ information, such as debug hints.  File: guile.info, Node: Procedures with Setters, Next: Inlinable Procedures, Prev: Procedure Properties, Up: Procedures -6.9.8 Procedures with Setters +6.7.8 Procedures with Setters ----------------------------- A “procedure with setter” is a special kind of procedure which normally @@ -16694,8 +16362,8 @@ so-called “setter” attached, which is a procedure for storing something into a data structure. Procedures with setters are treated specially when the procedure -appears in the special form ‘set!’ (REFFIXME). How it works is best -shown by example. +appears in the special form ‘set!’. How it works is best shown by +example. Suppose we have a procedure called ‘foo-ref’, which accepts two arguments, a value of type ‘foo’ and an integer. The procedure returns @@ -16752,7 +16420,7 @@ stored in ‘f’, or to write into the structure.  File: guile.info, Node: Inlinable Procedures, Prev: Procedures with Setters, Up: Procedures -6.9.9 Inlinable Procedures +6.7.9 Inlinable Procedures -------------------------- You can define an “inlinable procedure” by using ‘define-inlinable’ @@ -16795,8 +16463,8 @@ matters for large procedures.  File: guile.info, Node: Macros, Next: Utility Functions, Prev: Procedures, Up: API Reference -6.10 Macros -=========== +6.8 Macros +========== At its best, programming in Lisp is an iterative process of building up a language appropriate to the problem at hand, and then solving the @@ -16838,8 +16506,8 @@ translating an embedded language into core Scheme(1).  File: guile.info, Node: Defining Macros, Next: Syntax Rules, Up: Macros -6.10.1 Defining Macros ----------------------- +6.8.1 Defining Macros +--------------------- A macro is a binding between a keyword and a syntax transformer. Since it’s difficult to discuss ‘define-syntax’ without discussing the format @@ -16917,8 +16585,8 @@ instance of ‘letrec’, a local ‘define-syntax’ expands out to  File: guile.info, Node: Syntax Rules, Next: Syntax Case, Prev: Defining Macros, Up: Macros -6.10.2 Syntax-rules Macros --------------------------- +6.8.2 Syntax-rules Macros +------------------------- ‘syntax-rules’ macros are simple, pattern-driven syntax transformers, with a beauty worthy of Scheme. @@ -16935,8 +16603,8 @@ macro, it matches the expression against the patterns, in order, and rewrites the expression using the template from the first matching pattern. If no pattern matches, a syntax error is signalled. -6.10.2.1 Patterns -................. +6.8.2.1 Patterns +................ We have already seen some examples of patterns in the previous section: ‘(unless condition exp ...)’, ‘(my-or exp)’, and so on. A pattern is @@ -17085,8 +16753,8 @@ following three are equivalent: the pattern variable will always match the macro itself (e.g., ‘cond1’), it is actually left unbound in the template. -6.10.2.2 Hygiene -................ +6.8.2.2 Hygiene +............... ‘syntax-rules’ macros have a magical property: they preserve referential transparency. When you read a macro definition, any free bindings in @@ -17129,8 +16797,8 @@ hygienic macros. macros (*note Defmacros::), which do not preserve referential transparency. Hygiene adds to the expressive power of Scheme. -6.10.2.3 Shorthands -................... +6.8.2.3 Shorthands +.................. One often ends up writing simple one-clause ‘syntax-rules’ macros. There is a convenient shorthand for this idiom, in the form of @@ -17144,8 +16812,8 @@ There is a convenient shorthand for this idiom, in the form of (define-syntax-rule (when c e ...) (if c (begin e ...))) -6.10.2.4 Reporting Syntax Errors in Macros -.......................................... +6.8.2.4 Reporting Syntax Errors in Macros +......................................... -- Syntax: syntax-error message [arg ...] Report an error at macro-expansion time. MESSAGE must be a string @@ -17166,8 +16834,8 @@ templates. For example: ((lambda (name ...) body1 body2 ...) val ...)))) -6.10.2.5 Specifying a Custom Ellipsis Identifier -................................................ +6.8.2.5 Specifying a Custom Ellipsis Identifier +............................................... When writing macros that generate macro definitions, it is convenient to use a different ellipsis identifier at each level. Guile allows the @@ -17185,8 +16853,8 @@ desired ellipsis identifier to be specified as the first operand to (define-quotation-macros (quote-a a) (quote-b b) (quote-c c)) (quote-a 1 2 3) ⇒ (a 1 2 3) -6.10.2.6 Further Information -............................ +6.8.2.6 Further Information +........................... For a formal definition of ‘syntax-rules’ and its pattern language, see *Note Macros: (r5rs)Macros. @@ -17215,8 +16883,8 @@ probably be correct. Patches accepted.  File: guile.info, Node: Syntax Case, Next: Syntax Transformer Helpers, Prev: Syntax Rules, Up: Macros -6.10.3 Support for the ‘syntax-case’ System -------------------------------------------- +6.8.3 Support for the ‘syntax-case’ System +------------------------------------------ ‘syntax-case’ macros are procedural syntax transformers, with a power worthy of Scheme. @@ -17330,8 +16998,8 @@ language used by ‘syntax-rules’. Given this, Guile actually defines And that’s that. -6.10.3.1 Why ‘syntax-case’? -........................... +6.8.3.1 Why ‘syntax-case’? +.......................... The examples we have shown thus far could just as well have been expressed with ‘syntax-rules’, and have just shown that ‘syntax-case’ is @@ -17393,9 +17061,24 @@ won’t have access to the binding of ‘it’. But they can, if we explicitly introduce a binding via ‘datum->syntax’. - -- Scheme Procedure: datum->syntax template-id datum + -- Scheme Procedure: datum->syntax template-id datum [#:source=#f] Create a syntax object that wraps DATUM, within the lexical context - corresponding to the identifier TEMPLATE-ID. + corresponding to the identifier TEMPLATE-ID. If TEMPLATE-ID is + false, the datum will have no lexical context information. + + Syntax objects have an associated source location. Internally this + is represented as a 3-element vector of filename, line, and column. + Usually this location ultimately is provided by ‘read-syntax’; + *Note Annotated Scheme Read::. + + If a syntax object is passed as SOURCE, the resulting syntax object + will have the source location of SOURCE. Otherwise if SOURCE is a + 3-element source location vector, that vector will be the source + location of the resulting syntax object. If SOURCE is a source + properties alist, those will be parsed and set as the source + location of the resulting syntax object. Otherwise if SOURCE is + false, the source properties are looked up from ‘(source-properties + DATUM)’. *Note Source Properties::. For completeness, we should mention that it is possible to strip the metadata from a syntax object, returning a raw Scheme datum: @@ -17489,8 +17172,8 @@ either edition 3 or 4, in the chapter on syntax. Dybvig was the primary author of the ‘syntax-case’ system. The book itself is available online at . -6.10.3.2 Custom Ellipsis Identifiers for syntax-case Macros -........................................................... +6.8.3.2 Custom Ellipsis Identifiers for syntax-case Macros +.......................................................... When writing procedural macros that generate macro definitions, it is convenient to use a different ellipsis identifier at each level. Guile @@ -17523,11 +17206,28 @@ form: the generated code, unless ‘with-ellipsis’ is included around the generated code. +6.8.3.3 Syntax objects can be data too +...................................... + +Generally speaking, you want the macro expander to pick apart all syntax +objects in a source term. The source and scope annotations attached to +the syntax object are of interest to how the macro expander computes the +result, but no syntax object itself should appear in the expanded +term—usually. Sometimes, though, a macro will want a syntax object to +appear in the expanded output. Normally you would just use ‘quote’ to +introduce the syntax object as a value, but the expander strips syntax +objects from subexpression of ‘quote’. For this rare use case, Guile +has ‘quote-syntax’, which does not strip its subexpression. + + -- Syntax: quote-syntax form + Expand to the syntax object ‘form’, as a constant literal. Like + ‘quote’, but without calling ‘syntax->datum’. +  File: guile.info, Node: Syntax Transformer Helpers, Next: Defmacros, Prev: Syntax Case, Up: Macros -6.10.4 Syntax Transformer Helpers ---------------------------------- +6.8.4 Syntax Transformer Helpers +-------------------------------- As noted in the previous section, Guile’s syntax expander operates on syntax objects. Procedural macros consume and produce syntax objects. @@ -17564,6 +17264,11 @@ series, to a more than usual degree. Return the name of the module whose source contains the identifier ID. + -- Scheme Procedure: syntax-sourcev stx + Like ‘syntax-source’, but returns its result in a more compact + ‘#(FILENAME LINE COLUMN)’ format. This format is used as the + internal representation of source locations for syntax objects. + -- Scheme Procedure: syntax-local-binding id [#:resolve-syntax-parameters?=#t] Resolve the identifer ID, a syntax object, within the current @@ -17668,8 +17373,8 @@ series, to a more than usual degree.  File: guile.info, Node: Defmacros, Next: Identifier Macros, Prev: Syntax Transformer Helpers, Up: Macros -6.10.5 Lisp-style Macro Definitions ------------------------------------ +6.8.5 Lisp-style Macro Definitions +---------------------------------- The traditional way to define macros in Lisp is very similar to procedure definitions. The key differences are that the macro @@ -17727,8 +17432,8 @@ uses them.  File: guile.info, Node: Identifier Macros, Next: Syntax Parameters, Prev: Defmacros, Up: Macros -6.10.6 Identifier Macros ------------------------- +6.8.6 Identifier Macros +----------------------- When the syntax expander sees a form in which the first element is a macro, the whole form gets passed to the macro’s syntax transformer. @@ -17819,8 +17524,8 @@ the ‘set!’ case as well:  File: guile.info, Node: Syntax Parameters, Next: Eval When, Prev: Identifier Macros, Up: Macros -6.10.7 Syntax Parameters ------------------------- +6.8.7 Syntax Parameters +----------------------- Syntax parameters(1) are a mechanism for rebinding a macro definition within the dynamic extent of a macro expansion. This provides a @@ -17893,8 +17598,8 @@ by Barzilay, Culpepper and Flatt.  File: guile.info, Node: Eval When, Next: Macro Expansion, Prev: Syntax Parameters, Up: Macros -6.10.8 Eval-when ----------------- +6.8.8 Eval-when +--------------- As ‘syntax-case’ macros have the whole power of Scheme available to them, they present a problem regarding time: when a macro runs, what @@ -17966,8 +17671,8 @@ one-by-one, but not evaluated until the compiled file is loaded.  File: guile.info, Node: Macro Expansion, Next: Hygiene and the Top-Level, Prev: Eval When, Up: Macros -6.10.9 Macro Expansion ----------------------- +6.8.9 Macro Expansion +--------------------- Usually, macros are expanded on behalf of the user as needed. Macro expansion is an integral part of ‘eval’ and ‘compile’. Users can also @@ -18028,8 +17733,8 @@ tool, we suggest to avoid invoking it directly.  File: guile.info, Node: Hygiene and the Top-Level, Next: Internal Macros, Prev: Macro Expansion, Up: Macros -6.10.10 Hygiene and the Top-Level ---------------------------------- +6.8.10 Hygiene and the Top-Level +-------------------------------- Consider the following macro. @@ -18121,8 +17826,8 @@ macro-introduced identifiers.  File: guile.info, Node: Internal Macros, Prev: Hygiene and the Top-Level, Up: Macros -6.10.11 Internal Macros ------------------------ +6.8.11 Internal Macros +---------------------- -- Scheme Procedure: make-syntax-transformer name type binding Construct a syntax transformer object. This is part of Guile’s @@ -18163,8 +17868,8 @@ File: guile.info, Node: Internal Macros, Prev: Hygiene and the Top-Level, Up:  File: guile.info, Node: Utility Functions, Next: Binding Constructs, Prev: Macros, Up: API Reference -6.11 General Utility Functions -============================== +6.9 General Utility Functions +============================= This chapter contains information about procedures which are not cleanly tied to a specific data type. Because of their wide range of @@ -18182,8 +17887,8 @@ applications, they are collected in a “utility” chapter.  File: guile.info, Node: Equality, Next: Object Properties, Up: Utility Functions -6.11.1 Equality ---------------- +6.9.1 Equality +-------------- There are three kinds of core equality predicates in Scheme, described below. The same kinds of comparisons arise in other functions, like @@ -18309,8 +18014,8 @@ of the same pairs. Such lists look the same (when printed), and  File: guile.info, Node: Object Properties, Next: Sorting, Prev: Equality, Up: Utility Functions -6.11.2 Object Properties ------------------------- +6.9.2 Object Properties +----------------------- It’s often useful to associate a piece of additional information with a Scheme object even though that object does not have a dedicated slot @@ -18319,8 +18024,8 @@ properties allow you to do just that. Guile’s representation of an object property is a procedure-with-setter (*note Procedures with Setters::) that can be used -with the generalized form of ‘set!’ (REFFIXME) to set and retrieve that -property for any Scheme object. So, setting a property looks like this: +with the generalized form of ‘set!’ to set and retrieve that property +for any Scheme object. So, setting a property looks like this: (set! (my-property obj1) value-for-obj1) (set! (my-property obj2) value-for-obj2) @@ -18382,8 +18087,8 @@ properties instead.  File: guile.info, Node: Sorting, Next: Copying, Prev: Object Properties, Up: Utility Functions -6.11.3 Sorting --------------- +6.9.3 Sorting +------------- Sorting is very important in computer programs. Therefore, Guile comes with several sorting procedures built-in. As always, procedures with @@ -18476,14 +18181,17 @@ input, as their names indicate.  File: guile.info, Node: Copying, Next: General Conversion, Prev: Sorting, Up: Utility Functions -6.11.4 Copying Deep Structures ------------------------------- +6.9.4 Copying Deep Structures +----------------------------- The procedures for copying lists (*note Lists::) only produce a flat copy of the input list, and currently Guile does not even contain -procedures for copying vectors. ‘copy-tree’ can be used for these -application, as it does not only copy the spine of a list, but also -copies any pairs in the cars of the input lists. +procedures for copying vectors. The ‘(ice-9 copy-tree)’ module contains +a ‘copy-tree’ function that can be used for this purpose, as it does not +only copy the spine of a list, but also copies any pairs in the cars of +the input lists. + + (use-modules (ice-9 copy-tree)) -- Scheme Procedure: copy-tree obj -- C Function: scm_copy_tree (obj) @@ -18496,8 +18204,8 @@ copies any pairs in the cars of the input lists.  File: guile.info, Node: General Conversion, Next: Hooks, Prev: Copying, Up: Utility Functions -6.11.5 General String Conversion --------------------------------- +6.9.5 General String Conversion +------------------------------- When debugging Scheme programs, but also for providing a human-friendly interface, a procedure for converting any Scheme object into string @@ -18520,8 +18228,8 @@ procedure.  File: guile.info, Node: Hooks, Prev: General Conversion, Up: Utility Functions -6.11.6 Hooks ------------- +6.9.6 Hooks +----------- A hook is a list of procedures to be called at well defined points in time. Typically, an application provides a hook H and promises its @@ -18555,8 +18263,8 @@ application wants to run a hook, it does so using ‘run-hook’.  File: guile.info, Node: Hook Example, Next: Hook Reference, Up: Hooks -6.11.6.1 Hook Usage by Example -.............................. +6.9.6.1 Hook Usage by Example +............................. Hook usage is shown by some examples in this section. First, we will define a hook of arity 2 — that is, the procedures stored in the hook @@ -18611,8 +18319,8 @@ second call to ‘add-hook!’.  File: guile.info, Node: Hook Reference, Next: C Hooks, Prev: Hook Example, Up: Hooks -6.11.6.2 Hook Reference -....................... +6.9.6.2 Hook Reference +...................... When you create a hook with ‘make-hook’, you must specify the arity of the procedures which can be added to the hook. If the arity is not @@ -18693,8 +18401,8 @@ which is identical to ‘scm_run_hook’ but does no type checking.  File: guile.info, Node: C Hooks, Next: GC Hooks, Prev: Hook Reference, Up: Hooks -6.11.6.3 Hooks For C Code. -.......................... +6.9.6.3 Hooks For C Code. +......................... The hooks already described are intended to be populated by Scheme-level procedures. In addition to this, the Guile library provides an @@ -18789,8 +18497,8 @@ specifying the hook and the call closure data for this run:  File: guile.info, Node: GC Hooks, Next: REPL Hooks, Prev: C Hooks, Up: Hooks -6.11.6.4 Hooks for Garbage Collection -..................................... +6.9.6.4 Hooks for Garbage Collection +.................................... Whenever Guile performs a garbage collection, it calls the following hooks in the order shown. @@ -18843,13 +18551,13 @@ cycle.  File: guile.info, Node: REPL Hooks, Prev: GC Hooks, Up: Hooks -6.11.6.5 Hooks into the Guile REPL -.................................. +6.9.6.5 Hooks into the Guile REPL +.................................  File: guile.info, Node: Binding Constructs, Next: Control Mechanisms, Prev: Utility Functions, Up: API Reference -6.12 Definitions and Variable Bindings +6.10 Definitions and Variable Bindings ====================================== Scheme supports the definition of variables in different contexts. @@ -18868,7 +18576,7 @@ and expressions. This is important for modularity and data abstraction.  File: guile.info, Node: Top Level, Next: Local Bindings, Up: Binding Constructs -6.12.1 Top Level Variable Definitions +6.10.1 Top Level Variable Definitions ------------------------------------- At the top level of a program (i.e., not nested within any other @@ -18942,7 +18650,7 @@ use ‘define-once’.  File: guile.info, Node: Local Bindings, Next: Internal Definitions, Prev: Top Level, Up: Binding Constructs -6.12.2 Local Variable Bindings +6.10.2 Local Variable Bindings ------------------------------ As opposed to definitions at the top level, which creates bindings that @@ -19052,7 +18760,7 @@ this form (the “named let”) is documented in the section about iteration  File: guile.info, Node: Internal Definitions, Next: Binding Reflection, Prev: Local Bindings, Up: Binding Constructs -6.12.3 Internal definitions +6.10.3 Internal definitions --------------------------- A ‘define’ form which appears inside the body of a ‘lambda’, ‘let’, @@ -19129,7 +18837,7 @@ restriction was relaxed in Guile 3.0.  File: guile.info, Node: Binding Reflection, Next: Binding Multiple Values, Prev: Internal Definitions, Up: Binding Constructs -6.12.4 Querying variable bindings +6.10.4 Querying variable bindings --------------------------------- Guile provides a procedure for checking whether a symbol is bound in the @@ -19143,7 +18851,7 @@ top level environment.  File: guile.info, Node: Binding Multiple Values, Prev: Binding Reflection, Up: Binding Constructs -6.12.5 Binding multiple return values +6.10.5 Binding multiple return values ------------------------------------- -- Syntax: define-values formals expression @@ -19164,7 +18872,7 @@ File: guile.info, Node: Binding Multiple Values, Prev: Binding Reflection, Up  File: guile.info, Node: Control Mechanisms, Next: Input and Output, Prev: Binding Constructs, Up: API Reference -6.13 Controlling the Flow of Program Execution +6.11 Controlling the Flow of Program Execution ============================================== See *note Control Flow:: for a discussion of how the more general @@ -19190,7 +18898,7 @@ control flow of Scheme affects C code.  File: guile.info, Node: begin, Next: Conditionals, Up: Control Mechanisms -6.13.1 Sequencing and Splicing +6.11.1 Sequencing and Splicing ------------------------------ As an expression, the ‘begin’ syntax is used to evaluate a sequence of @@ -19259,7 +18967,7 @@ the ‘begin’ form for these two tasks.  File: guile.info, Node: Conditionals, Next: and or, Prev: begin, Up: Control Mechanisms -6.13.2 Simple Conditional Evaluation +6.11.2 Simple Conditional Evaluation ------------------------------------ Guile provides three syntactic constructs for conditional evaluation. @@ -19378,7 +19086,7 @@ implicitly wrapped in a ‘begin’.  File: guile.info, Node: and or, Next: while do, Prev: Conditionals, Up: Control Mechanisms -6.13.3 Conditional Evaluation of a Sequence of Expressions +6.11.3 Conditional Evaluation of a Sequence of Expressions ---------------------------------------------------------- ‘and’ and ‘or’ evaluate all their arguments in order, similar to @@ -19406,7 +19114,7 @@ evaluates to false or true, respectively.  File: guile.info, Node: while do, Next: Prompts, Prev: and or, Up: Control Mechanisms -6.13.4 Iteration mechanisms +6.11.4 Iteration mechanisms --------------------------- Scheme has only few iteration mechanisms, mainly because iteration in @@ -19437,7 +19145,7 @@ addition, Guile has an explicit looping syntax called ‘while’. 3**3 is 27 3**4 is 81 ⇒ - 789 + 243 The VARIABLE bindings are established like a ‘let’, in that the expressions are all evaluated and then all bindings made. When @@ -19546,7 +19254,7 @@ arbitrary recursion.  File: guile.info, Node: Prompts, Next: Continuations, Prev: while do, Up: Control Mechanisms -6.13.5 Prompts +6.11.5 Prompts -------------- Prompts are control-flow barriers between different parts of a program. @@ -19568,7 +19276,7 @@ recent topic, but a very useful one to know about.  File: guile.info, Node: Prompt Primitives, Next: Shift and Reset, Up: Prompts -6.13.5.1 Prompt Primitives +6.11.5.1 Prompt Primitives .......................... Guile’s primitive delimited control operators are ‘call-with-prompt’ and @@ -19734,7 +19442,7 @@ control)’, so load up that module for ‘suspendable-continuation?’:  File: guile.info, Node: Shift and Reset, Prev: Prompt Primitives, Up: Prompts -6.13.5.2 Shift, Reset, and All That +6.11.5.2 Shift, Reset, and All That ................................... There is a whole zoo of delimited control operators, and as it does not @@ -19816,7 +19524,7 @@ operators.  File: guile.info, Node: Continuations, Next: Multiple Values, Prev: Prompts, Up: Control Mechanisms -6.13.6 Continuations +6.11.6 Continuations -------------------- A “continuation” is the code that will execute when a given function or @@ -19941,7 +19649,7 @@ stack but doesn’t copy it around the way continuations do).  File: guile.info, Node: Multiple Values, Next: Exceptions, Prev: Continuations, Up: Control Mechanisms -6.13.7 Returning and Accepting Multiple Values +6.11.7 Returning and Accepting Multiple Values ---------------------------------------------- Scheme allows a procedure to return more than one value to its caller. @@ -20029,7 +19737,7 @@ specified by SRFI-8 (*note SRFI-8::).  File: guile.info, Node: Exceptions, Next: Error Reporting, Prev: Multiple Values, Up: Control Mechanisms -6.13.8 Exceptions +6.11.8 Exceptions ----------------- What happens when things go wrong? Guile’s exception facility exists to @@ -20081,7 +19789,7 @@ won’t be going away any time soon.  File: guile.info, Node: Exception Objects, Next: Raising and Handling Exceptions, Up: Exceptions -6.13.8.1 Exception Objects +6.11.8.1 Exception Objects .......................... When Guile encounters an exceptional situation, it raises an exception, @@ -20282,7 +19990,7 @@ exception types to the hierarchy.  File: guile.info, Node: Raising and Handling Exceptions, Next: Throw and Catch, Prev: Exception Objects, Up: Exceptions -6.13.8.2 Raising and Handling Exceptions +6.11.8.2 Raising and Handling Exceptions ........................................ An exception object describes an exceptional situation. To bring that @@ -20355,7 +20063,7 @@ that exceptions with the given ‘exception-kind’ will be handled.  File: guile.info, Node: Throw and Catch, Next: Exceptions and C, Prev: Raising and Handling Exceptions, Up: Exceptions -6.13.8.3 Throw and Catch +6.11.8.3 Throw and Catch ........................ Guile only adopted ‘with-exception-handler’ and ‘raise-exception’ as its @@ -20493,7 +20201,7 @@ relationship between structured exception objects ‘throw’.  File: guile.info, Node: Exceptions and C, Prev: Throw and Catch, Up: Exceptions -6.13.8.4 Exceptions and C +6.11.8.4 Exceptions and C ......................... There are some specific versions of Guile’s original ‘catch’ and @@ -20547,7 +20255,7 @@ used in C code.  File: guile.info, Node: Error Reporting, Next: Dynamic Wind, Prev: Exceptions, Up: Control Mechanisms -6.13.9 Procedures for Signaling Errors +6.11.9 Procedures for Signaling Errors -------------------------------------- Guile provides a set of convenience procedures for signaling error @@ -20589,7 +20297,7 @@ described.  File: guile.info, Node: Dynamic Wind, Next: Fluids and Dynamic States, Prev: Error Reporting, Up: Control Mechanisms -6.13.10 Dynamic Wind +6.11.10 Dynamic Wind -------------------- For Scheme code, the fundamental procedure to react to non-local entry @@ -20785,7 +20493,7 @@ manual.  File: guile.info, Node: Fluids and Dynamic States, Next: Parameters, Prev: Dynamic Wind, Up: Control Mechanisms -6.13.11 Fluids and Dynamic States +6.11.11 Fluids and Dynamic States --------------------------------- A _fluid_ is a variable whose value is associated with the dynamic @@ -20966,7 +20674,7 @@ given values. After the procedure returns, the old values are restored.  File: guile.info, Node: Parameters, Next: Handling Errors, Prev: Fluids and Dynamic States, Up: Control Mechanisms -6.13.12 Parameters +6.11.12 Parameters ------------------ Parameters are Guile’s facility for dynamically bound variables. @@ -21082,7 +20790,7 @@ originating context are copied, into new locations.  File: guile.info, Node: Handling Errors, Next: Continuation Barriers, Prev: Parameters, Up: Control Mechanisms -6.13.13 How to Handle Errors +6.11.13 How to Handle Errors ---------------------------- Guile is currently in a transition from its historical ‘catch’ and @@ -21159,7 +20867,7 @@ situations in which they are used: • ‘misc-error’: other errors. -6.13.13.1 C Support +6.11.13.1 C Support ................... In the following C functions, SUBR and MESSAGE parameters can be ‘NULL’ @@ -21201,7 +20909,7 @@ to give the effect of ‘#f’ described above. containing ‘simple-format’ escapes (*note Simple Output::), and the corresponding arguments in the ARGS list. -6.13.13.2 Signalling Type Errors +6.11.13.2 Signalling Type Errors ................................ Every function visible at the Scheme level should aggressively check the @@ -21243,7 +20951,7 @@ easier.  File: guile.info, Node: Continuation Barriers, Prev: Handling Errors, Up: Control Mechanisms -6.13.14 Continuation Barriers +6.11.14 Continuation Barriers ----------------------------- The non-local flow of control caused by continuations might sometimes @@ -21271,7 +20979,7 @@ that continuations can not pass.  File: guile.info, Node: Input and Output, Next: Regular Expressions, Prev: Control Mechanisms, Up: API Reference -6.14 Input and Output +6.12 Input and Output ===================== * Menu: @@ -21295,7 +21003,7 @@ File: guile.info, Node: Input and Output, Next: Regular Expressions, Prev: Co  File: guile.info, Node: Ports, Next: Binary I/O, Up: Input and Output -6.14.1 Ports +6.12.1 Ports ------------ Ports are the way that Guile performs input and output. Guile can read @@ -21378,10 +21086,14 @@ on interfaces to control port buffering. -- C Function: scm_port_closed_p (port) Return ‘#t’ if PORT is closed or ‘#f’ if it is open. + -- Scheme Procedure: call-with-port port proc + Call PROC, passing it PORT and closing PORT upon exit of PROC. + Return the return values of PROC. +  File: guile.info, Node: Binary I/O, Next: Encoding, Prev: Ports, Up: Input and Output -6.14.2 Binary I/O +6.12.2 Binary I/O ----------------- Guile’s ports are fundamentally binary in nature: at the lowest level, @@ -21473,7 +21185,7 @@ defined in the default environment.  File: guile.info, Node: Encoding, Next: Textual I/O, Prev: Binary I/O, Up: Input and Output -6.14.3 Encoding +6.12.3 Encoding --------------- Textual input and output on Guile ports is layered on top of binary @@ -21587,7 +21299,7 @@ strategy is treated as if it were ‘error’.  File: guile.info, Node: Textual I/O, Next: Simple Output, Prev: Encoding, Up: Input and Output -6.14.4 Textual I/O +6.12.4 Textual I/O ------------------ This section describes Guile’s core textual I/O operations on characters @@ -21739,7 +21451,7 @@ non-programmers will find most natural.  File: guile.info, Node: Simple Output, Next: Buffering, Prev: Textual I/O, Up: Input and Output -6.14.5 Simple Textual Output +6.12.5 Simple Textual Output ---------------------------- Guile exports a simple formatted output function, ‘simple-format’. For @@ -21764,7 +21476,7 @@ or the more capable version.  File: guile.info, Node: Buffering, Next: Random Access, Prev: Simple Output, Up: Input and Output -6.14.6 Buffering +6.12.6 Buffering ---------------- Every port has associated input and output buffers. You can think of @@ -21882,7 +21594,7 @@ Still, it is useful to read what other systems do. *Note  File: guile.info, Node: Random Access, Next: Line/Delimited, Prev: Buffering, Up: Input and Output -6.14.7 Random Access +6.12.7 Random Access -------------------- -- Scheme Procedure: seek fd_port offset whence @@ -21931,7 +21643,7 @@ File: guile.info, Node: Random Access, Next: Line/Delimited, Prev: Buffering,  File: guile.info, Node: Line/Delimited, Next: Default Ports, Prev: Random Access, Up: Input and Output -6.14.8 Line Oriented and Delimited Text +6.12.8 Line Oriented and Delimited Text --------------------------------------- The delimited-I/O module can be accessed with: @@ -22015,10 +21727,18 @@ by a specified set of characters. if ‘%read-line’ is called at the end of file, it returns the pair ‘(# . #)’. + -- Scheme Procedure: write-line obj [port] + -- C Function: scm_write_line (obj, port) + Display OBJ and a newline character to PORT. If PORT is not + specified, ‘(current-output-port)’ is used. This procedure is + equivalent to: + (display obj [port]) + (newline [port]) +  File: guile.info, Node: Default Ports, Next: Port Types, Prev: Line/Delimited, Up: Input and Output -6.14.9 Default Ports for Input, Output and Errors +6.12.9 Default Ports for Input, Output and Errors ------------------------------------------------- -- Scheme Procedure: current-input-port @@ -22092,7 +21812,7 @@ File: guile.info, Node: Default Ports, Next: Port Types, Prev: Line/Delimited  File: guile.info, Node: Port Types, Next: Venerable Port Interfaces, Prev: Default Ports, Up: Input and Output -6.14.10 Types of Port +6.12.10 Types of Port --------------------- * Menu: @@ -22107,7 +21827,7 @@ File: guile.info, Node: Port Types, Next: Venerable Port Interfaces, Prev: De  File: guile.info, Node: File Ports, Next: Bytevector Ports, Up: Port Types -6.14.10.1 File Ports +6.12.10.1 File Ports .................... The following procedures are used to open file ports. See also *note @@ -22285,7 +22005,7 @@ required (*note Ports::).  File: guile.info, Node: Bytevector Ports, Next: String Ports, Prev: File Ports, Up: Port Types -6.14.10.2 Bytevector Ports +6.12.10.2 Bytevector Ports .......................... -- Scheme Procedure: open-bytevector-input-port bv [transcoder] @@ -22312,10 +22032,21 @@ File: guile.info, Node: Bytevector Ports, Next: String Ports, Prev: File Port The TRANSCODER argument is currently not supported. + -- Scheme Procedure: call-with-output-bytevector proc + Call the one-argument procedure PROC with a newly created + bytevector output port. When the function returns, the bytevector + composed of the characters written into the port is returned. PROC + should not close the port. + + -- Scheme Procedure: call-with-input-bytevector bytevector proc + Call the one-argument procedure PROC with a newly created input + port from which BYTEVECTOR’s contents may be read. The values + yielded by the PROC is returned. +  File: guile.info, Node: String Ports, Next: Custom Ports, Prev: Bytevector Ports, Up: Port Types -6.14.10.3 String Ports +6.12.10.3 String Ports ...................... -- Scheme Procedure: call-with-output-string proc @@ -22374,7 +22105,7 @@ from its default. *Note Encoding::.  File: guile.info, Node: Custom Ports, Next: Soft Ports, Prev: String Ports, Up: Port Types -6.14.10.4 Custom Ports +6.12.10.4 Custom Ports ...................... Custom ports allow the user to provide input and handle output via @@ -22467,7 +22198,7 @@ Ports::).  File: guile.info, Node: Soft Ports, Next: Void Ports, Prev: Custom Ports, Up: Port Types -6.14.10.5 Soft Ports +6.12.10.5 Soft Ports .................... A “soft port” is a port based on a vector of procedures capable of @@ -22510,7 +22241,7 @@ accepting or delivering characters. It allows emulation of I/O ports.  File: guile.info, Node: Void Ports, Prev: Soft Ports, Up: Port Types -6.14.10.6 Void Ports +6.12.10.6 Void Ports .................... This kind of port causes any data to be discarded when written to, and @@ -22526,7 +22257,7 @@ always returns the end-of-file object when read from.  File: guile.info, Node: Venerable Port Interfaces, Next: Using Ports from C, Prev: Port Types, Up: Input and Output -6.14.11 Venerable Port Interfaces +6.12.11 Venerable Port Interfaces --------------------------------- Over the 25 years or so that Guile has been around, its port system has @@ -22614,7 +22345,7 @@ for new users.  File: guile.info, Node: Using Ports from C, Next: I/O Extensions, Prev: Venerable Port Interfaces, Up: Input and Output -6.14.12 Using Ports from C +6.12.12 Using Ports from C -------------------------- Guile’s C interfaces provides some niceties for sending and receiving @@ -22663,7 +22394,7 @@ bytes and characters in a way that works better with C.  File: guile.info, Node: I/O Extensions, Next: Non-Blocking I/O, Prev: Using Ports from C, Up: Input and Output -6.14.13 Implementing New Port Types in C +6.12.13 Implementing New Port Types in C ---------------------------------------- This section describes how to implement a new port type in C. Although @@ -22845,7 +22576,7 @@ concurrency, it is responsible for locking appropriately.  File: guile.info, Node: Non-Blocking I/O, Next: BOM Handling, Prev: I/O Extensions, Up: Input and Output -6.14.14 Non-Blocking I/O +6.12.14 Non-Blocking I/O ------------------------ Most ports in Guile are “blocking”: when you try to read a character @@ -22962,7 +22693,7 @@ I/O and concurrency facility.  File: guile.info, Node: BOM Handling, Prev: Non-Blocking I/O, Up: Input and Output -6.14.15 Handling of Unicode Byte Order Marks +6.12.15 Handling of Unicode Byte Order Marks -------------------------------------------- This section documents the finer points of Guile’s handling of Unicode @@ -23033,7 +22764,7 @@ section applies.  File: guile.info, Node: Regular Expressions, Next: LALR(1) Parsing, Prev: Input and Output, Up: API Reference -6.15 Regular Expressions +6.13 Regular Expressions ======================== A “regular expression” (or “regexp”) is a pattern that describes a whole @@ -23060,7 +22791,7 @@ should load this module by executing ‘(use-modules (ice-9 regex))’.  File: guile.info, Node: Regexp Functions, Next: Match Structures, Up: Regular Expressions -6.15.1 Regexp Functions +6.13.1 Regexp Functions ----------------------- By default, Guile supports POSIX extended regular expressions. That @@ -23309,7 +23040,7 @@ functions are convenient ways to do this.  File: guile.info, Node: Match Structures, Next: Backslash Escapes, Prev: Regexp Functions, Up: Regular Expressions -6.15.2 Match Structures +6.13.2 Match Structures ----------------------- A “match structure” is the object returned by ‘string-match’ and @@ -23394,7 +23125,7 @@ between characters 4 and 8 (i.e. the “2002”).  File: guile.info, Node: Backslash Escapes, Prev: Match Structures, Up: Regular Expressions -6.15.3 Backslash Escapes +6.13.3 Backslash Escapes ------------------------ Sometimes you will want a regexp to match characters like ‘*’ or ‘$’ @@ -23471,7 +23202,7 @@ escape syntax.  File: guile.info, Node: LALR(1) Parsing, Next: PEG Parsing, Prev: Regular Expressions, Up: API Reference -6.16 LALR(1) Parsing +6.14 LALR(1) Parsing ==================== The ‘(system base lalr)’ module provides the ‘lalr-scm’ LALR(1) parser @@ -23502,7 +23233,7 @@ Bison: (bison)Introduction.). Parsers are defined using the  File: guile.info, Node: PEG Parsing, Next: Read/Load/Eval/Compile, Prev: LALR(1) Parsing, Up: API Reference -6.17 PEG Parsing +6.15 PEG Parsing ================ Parsing Expression Grammars (PEGs) are a way of specifying formal @@ -23539,7 +23270,7 @@ reference, and a tutorial.  File: guile.info, Node: PEG Syntax Reference, Next: PEG API Reference, Up: PEG Parsing -6.17.1 PEG Syntax Reference +6.15.1 PEG Syntax Reference --------------------------- Normal PEG Syntax: @@ -23672,7 +23403,7 @@ There is some extra syntax for S-expressions.  File: guile.info, Node: PEG API Reference, Next: PEG Tutorial, Prev: PEG Syntax Reference, Up: PEG Parsing -6.17.2 PEG API Reference +6.15.2 PEG API Reference ------------------------ Define Macros @@ -23937,7 +23668,7 @@ Miscellaneous  File: guile.info, Node: PEG Tutorial, Next: PEG Internals, Prev: PEG API Reference, Up: PEG Parsing -6.17.3 PEG Tutorial +6.15.3 PEG Tutorial ------------------- Parsing /etc/passwd @@ -24343,7 +24074,7 @@ the compression step) and it will never cause parsing to fail.  File: guile.info, Node: PEG Internals, Prev: PEG Tutorial, Up: PEG Parsing -6.17.4 PEG Internals +6.15.4 PEG Internals -------------------- A PEG parser takes a string as input and attempts to parse it as a given @@ -24443,7 +24174,7 @@ peg codegen)’ module.  File: guile.info, Node: Read/Load/Eval/Compile, Next: Memory Management, Prev: PEG Parsing, Up: API Reference -6.18 Reading and Evaluating Scheme Code +6.16 Reading and Evaluating Scheme Code ======================================= This chapter describes Guile functions that are concerned with reading, @@ -24453,6 +24184,7 @@ loading, evaluating, and compiling Scheme code at run time. * Scheme Syntax:: Standard and extended Scheme syntax. * Scheme Read:: Reading Scheme code. +* Annotated Scheme Read:: Reading Scheme code, for the compiler. * Scheme Write:: Writing Scheme values to a port. * Fly Evaluation:: Procedures for on the fly evaluation. * Compilation:: How to compile Scheme files and procedures. @@ -24469,7 +24201,7 @@ loading, evaluating, and compiling Scheme code at run time.  File: guile.info, Node: Scheme Syntax, Next: Scheme Read, Up: Read/Load/Eval/Compile -6.18.1 Scheme Syntax: Standard and Guile Extensions +6.16.1 Scheme Syntax: Standard and Guile Extensions --------------------------------------------------- * Menu: @@ -24484,7 +24216,7 @@ File: guile.info, Node: Scheme Syntax, Next: Scheme Read, Up: Read/Load/Eval/  File: guile.info, Node: Expression Syntax, Next: Comments, Up: Scheme Syntax -6.18.1.1 Expression Syntax +6.16.1.1 Expression Syntax .......................... An expression to be evaluated takes one of the following forms. @@ -24589,7 +24321,7 @@ CONSTANT  File: guile.info, Node: Comments, Next: Block Comments, Prev: Expression Syntax, Up: Scheme Syntax -6.18.1.2 Comments +6.16.1.2 Comments ................. Comments in Scheme source files are written by starting them with a @@ -24615,7 +24347,7 @@ convention is used when indenting code in Emacs’ Scheme mode.  File: guile.info, Node: Block Comments, Next: Case Sensitivity, Prev: Comments, Up: Scheme Syntax -6.18.1.3 Block Comments +6.16.1.3 Block Comments ....................... In addition to the standard line comments defined by R5RS, Guile has @@ -24657,7 +24389,7 @@ of Source Files::.  File: guile.info, Node: Case Sensitivity, Next: Keyword Syntax, Prev: Block Comments, Up: Scheme Syntax -6.18.1.4 Case Sensitivity +6.16.1.4 Case Sensitivity ......................... Scheme as defined in R5RS is not case sensitive when reading symbols. @@ -24681,13 +24413,13 @@ single file by placing the reader directives ‘#!fold-case’ (or  File: guile.info, Node: Keyword Syntax, Next: Reader Extensions, Prev: Case Sensitivity, Up: Scheme Syntax -6.18.1.5 Keyword Syntax +6.16.1.5 Keyword Syntax .......................  File: guile.info, Node: Reader Extensions, Prev: Keyword Syntax, Up: Scheme Syntax -6.18.1.6 Reader Extensions +6.16.1.6 Reader Extensions .......................... -- Scheme Procedure: read-hash-extend chr proc @@ -24699,9 +24431,9 @@ File: guile.info, Node: Reader Extensions, Prev: Keyword Syntax, Up: Scheme S Passing ‘#f’ for PROC will remove a previous setting.  -File: guile.info, Node: Scheme Read, Next: Scheme Write, Prev: Scheme Syntax, Up: Read/Load/Eval/Compile +File: guile.info, Node: Scheme Read, Next: Annotated Scheme Read, Prev: Scheme Syntax, Up: Read/Load/Eval/Compile -6.18.2 Reading Scheme Code +6.16.2 Reading Scheme Code -------------------------- -- Scheme Procedure: read [port] @@ -24725,7 +24457,6 @@ invoking ‘read-options’ at the prompt. scheme@(guile-user)> (read-options) (square-brackets keywords #f positions) scheme@(guile-user)> (read-options 'help) - copy no Copy source code expressions. positions yes Record positions of source code expressions. case-insensitive no Convert symbols to lower case. keywords #f Style of keyword recognition: #f, 'prefix or 'postfix. @@ -24771,9 +24502,59 @@ currently no other way to access or set the per-port read options. Read Syntax::).  -File: guile.info, Node: Scheme Write, Next: Fly Evaluation, Prev: Scheme Read, Up: Read/Load/Eval/Compile +File: guile.info, Node: Annotated Scheme Read, Next: Scheme Write, Prev: Scheme Read, Up: Read/Load/Eval/Compile -6.18.3 Writing Scheme Values +6.16.3 Reading Scheme Code, For the Compiler +-------------------------------------------- + +When something goes wrong with a Scheme program, the user will want to +know how to fix it. This starts with identifying where the error +occured: we want to associate a source location with each component part +of source code, and propagate that source location information through +to the compiler or interpreter. + + For that, Guile provides ‘read-syntax’. + + -- Scheme Procedure: read-syntax [port] + Read an s-expression from the input port PORT, or from the current + input port if PORT is not specified. + + If, after skipping white space and comments, no more bytes are + available from PORT, return the end-of-file object. *Note Binary + I/O::. Otherwise, return an annotated datum. An annotated datum + is a syntax object which associates a source location with a datum. + For example: + + (call-with-input-string " foo" read-syntax) + ; ⇒ # + (call-with-input-string "(foo)" read-syntax) + ; ⇒ + ; #)> + + As the second example shows, all fields of pairs and vectors are + also annotated, recursively. + + Most users are familiar with syntax objects in the context of macros, +which use syntax objects to associate scope information with +identifiers. *Note Macros::. Here we use syntax objects to associate +source location information with any datum, but without attaching scope +information. The Scheme compiler (‘compile’) and the interpreter +(‘eval’) can accept syntax objects directly as input, allowing them to +associate source information with resulting code. *Note Compilation::, +and *Note Fly Evaluation::. + + Note that there is a legacy interface for getting source locations +into the Scheme compiler or interpreter, which is to use a side table +that associates “source properties” with each subdatum returned by +‘read’, instead of wrapping the datums directly as in ‘read-syntax’. +This has the disadvantage of not being able to annotate all kinds of +datums. *Note Source Properties::, for more information. + + +File: guile.info, Node: Scheme Write, Next: Fly Evaluation, Prev: Annotated Scheme Read, Up: Read/Load/Eval/Compile + +6.16.4 Writing Scheme Values ---------------------------- Any scheme value may be written to a port. Not all values may be read @@ -24834,7 +24615,7 @@ invoking ‘print-options’ at the prompt.  File: guile.info, Node: Fly Evaluation, Next: Compilation, Prev: Scheme Write, Up: Read/Load/Eval/Compile -6.18.4 Procedures for On the Fly Evaluation +6.16.5 Procedures for On the Fly Evaluation ------------------------------------------- Scheme has the lovely property that its expressions may be represented @@ -24951,7 +24732,7 @@ eval-string)’, so load it up:  File: guile.info, Node: Compilation, Next: Loading, Prev: Fly Evaluation, Up: Read/Load/Eval/Compile -6.18.5 Compiling Scheme Code +6.16.6 Compiling Scheme Code ---------------------------- The ‘eval’ procedure directly interprets the S-expression representation @@ -25020,12 +24801,10 @@ command: ‘-W WARNING’ ‘--warn=WARNING’ - Emit warnings of type WARNING; use ‘--warn=help’ for a list of - available warnings and their description. Currently - recognized warnings include ‘unused-variable’, - ‘unused-toplevel’, ‘shadowed-toplevel’, ‘unbound-variable’, - ‘macro-use-before-definition’, ‘arity-mismatch’, ‘format’, - ‘duplicate-case-datum’, and ‘bad-case-datum’. + Enable specific warning passes; use ‘-Whelp’ for a list of + available options. The default is ‘-W1’, which enables a + number of common warnings. Pass ‘-W0’ to disable all + warnings. ‘-O OPT’ ‘--optimize=OPT’ @@ -25127,7 +24906,7 @@ interfaces are in their own module:  File: guile.info, Node: Loading, Next: Load Paths, Prev: Compilation, Up: Read/Load/Eval/Compile -6.18.6 Loading Scheme Code from File +6.16.7 Loading Scheme Code from File ------------------------------------ -- Scheme Procedure: load filename [reader] @@ -25210,7 +24989,7 @@ File: guile.info, Node: Loading, Next: Load Paths, Prev: Compilation, Up: Re  File: guile.info, Node: Load Paths, Next: Character Encoding of Source Files, Prev: Loading, Up: Read/Load/Eval/Compile -6.18.7 Load Paths +6.16.8 Load Paths ----------------- The procedure in the previous section look for Scheme code in the file @@ -25346,7 +25125,7 @@ manipulation.  File: guile.info, Node: Character Encoding of Source Files, Next: Delayed Evaluation, Prev: Load Paths, Up: Read/Load/Eval/Compile -6.18.8 Character Encoding of Source Files +6.16.9 Character Encoding of Source Files ----------------------------------------- Scheme source code files are usually encoded in ASCII or UTF-8, but the @@ -25423,8 +25202,8 @@ normal.  File: guile.info, Node: Delayed Evaluation, Next: Local Evaluation, Prev: Character Encoding of Source Files, Up: Read/Load/Eval/Compile -6.18.9 Delayed Evaluation -------------------------- +6.16.10 Delayed Evaluation +-------------------------- Promises are a convenient way to defer a calculation until its result is actually needed, and to run such a calculation only once. Also *note @@ -25454,7 +25233,7 @@ SRFI-45::.  File: guile.info, Node: Local Evaluation, Next: Local Inclusion, Prev: Delayed Evaluation, Up: Read/Load/Eval/Compile -6.18.10 Local Evaluation +6.16.11 Local Evaluation ------------------------ Guile includes a facility to capture a lexical environment, and later @@ -25505,7 +25284,7 @@ forms. Any attempt to reference such captured syntactic keywords via  File: guile.info, Node: Local Inclusion, Next: Sandboxed Evaluation, Prev: Local Evaluation, Up: Read/Load/Eval/Compile -6.18.11 Local Inclusion +6.16.12 Local Inclusion ----------------------- This section has discussed various means of linking Scheme code @@ -25567,7 +25346,7 @@ to evaluate an installed file from source, instead of relying on the  File: guile.info, Node: Sandboxed Evaluation, Next: REPL Servers, Prev: Local Inclusion, Up: Read/Load/Eval/Compile -6.18.12 Sandboxed Evaluation +6.16.13 Sandboxed Evaluation ---------------------------- Sometimes you would like to evaluate code that comes from an untrusted @@ -25824,7 +25603,7 @@ all of the component binding sets.  File: guile.info, Node: REPL Servers, Next: Cooperative REPL Servers, Prev: Sandboxed Evaluation, Up: Read/Load/Eval/Compile -6.18.13 REPL Servers +6.16.14 REPL Servers -------------------- The procedures in this section are provided by @@ -25871,7 +25650,7 @@ Command-line Options::.  File: guile.info, Node: Cooperative REPL Servers, Prev: REPL Servers, Up: Read/Load/Eval/Compile -6.18.14 Cooperative REPL Servers +6.16.15 Cooperative REPL Servers -------------------------------- The procedures in this section are provided by @@ -25911,7 +25690,7 @@ takes to be evaluated or if the debugger is entered.  File: guile.info, Node: Memory Management, Next: Modules, Prev: Read/Load/Eval/Compile, Up: API Reference -6.19 Memory Management and Garbage Collection +6.17 Memory Management and Garbage Collection ============================================= Guile uses a _garbage collector_ to manage most of its objects. While @@ -25931,7 +25710,7 @@ garbage collection relates to using Guile from C.  File: guile.info, Node: Garbage Collection Functions, Next: Memory Blocks, Up: Memory Management -6.19.1 Function related to Garbage Collection +6.17.1 Function related to Garbage Collection --------------------------------------------- -- Scheme Procedure: gc @@ -26005,7 +25784,7 @@ from being freed.  File: guile.info, Node: Memory Blocks, Next: Weak References, Prev: Garbage Collection Functions, Up: Memory Management -6.19.2 Memory Blocks +6.17.2 Memory Blocks -------------------- In C programs, dynamic management of memory blocks is normally done with @@ -26151,7 +25930,7 @@ the memory block, e.g., via SMOB mark functions (*note  File: guile.info, Node: Weak References, Next: Guardians, Prev: Memory Blocks, Up: Memory Management -6.19.3 Weak References +6.17.3 Weak References ---------------------- [FIXME: This chapter is based on Mikael Djurfeldt’s answer to a question @@ -26198,7 +25977,7 @@ they constitute a doubly-weak table has to be used.  File: guile.info, Node: Weak hash tables, Next: Weak vectors, Up: Weak References -6.19.3.1 Weak hash tables +6.17.3.1 Weak hash tables ......................... -- Scheme Procedure: make-weak-key-hash-table [size] @@ -26234,7 +26013,7 @@ leak. The reverse is true for weak value tables.  File: guile.info, Node: Weak vectors, Prev: Weak hash tables, Up: Weak References -6.19.3.2 Weak vectors +6.17.3.2 Weak vectors ..................... -- Scheme Procedure: make-weak-vector size [fill] @@ -26266,7 +26045,7 @@ File: guile.info, Node: Weak vectors, Prev: Weak hash tables, Up: Weak Refere  File: guile.info, Node: Guardians, Prev: Weak References, Up: Memory Management -6.19.4 Guardians +6.17.4 Guardians ---------------- Guardians provide a way to be notified about objects that would @@ -26324,7 +26103,7 @@ Programming Language Design and Implementation, June 1993.  File: guile.info, Node: Modules, Next: Foreign Function Interface, Prev: Memory Management, Up: API Reference -6.20 Modules +6.18 Modules ============ When programs become large, naming conflicts can occur when a function @@ -26373,7 +26152,7 @@ be used for interacting with the module system.  File: guile.info, Node: General Information about Modules, Next: Using Guile Modules, Up: Modules -6.20.1 General Information about Modules +6.18.1 General Information about Modules ---------------------------------------- A Guile module can be thought of as a collection of named procedures, @@ -26409,7 +26188,7 @@ installing, and otherwise manipulating modules and the module system.  File: guile.info, Node: Using Guile Modules, Next: Creating Guile Modules, Prev: General Information about Modules, Up: Modules -6.20.2 Using Guile Modules +6.18.2 Using Guile Modules -------------------------- To use a Guile module is to access either its public interface or a @@ -26540,7 +26319,7 @@ when the binding refers to a variable.  File: guile.info, Node: Creating Guile Modules, Next: Modules and the File System, Prev: Using Guile Modules, Up: Modules -6.20.3 Creating Guile Modules +6.18.3 Creating Guile Modules ----------------------------- When you want to create your own modules, you have to take the following @@ -26739,7 +26518,7 @@ trigger the load.  File: guile.info, Node: Modules and the File System, Next: R6RS Version References, Prev: Creating Guile Modules, Up: Modules -6.20.4 Modules and the File System +6.18.4 Modules and the File System ---------------------------------- Typical programs only use a small subset of modules installed on a Guile @@ -26775,7 +26554,7 @@ consideration is still not defined, Guile will signal an error.  File: guile.info, Node: R6RS Version References, Next: R6RS Libraries, Prev: Modules and the File System, Up: Modules -6.20.5 R6RS Version References +6.18.5 R6RS Version References ------------------------------ Guile’s module system includes support for locating modules based on a @@ -26843,7 +26622,7 @@ expressions:  File: guile.info, Node: R6RS Libraries, Next: Variables, Prev: R6RS Version References, Up: Modules -6.20.6 R6RS Libraries +6.18.6 R6RS Libraries --------------------- In addition to the API described in the previous sections, you also have @@ -26960,7 +26739,7 @@ required by Schemes in which phasing is explicit).  File: guile.info, Node: Variables, Next: Module System Reflection, Prev: R6RS Libraries, Up: Modules -6.20.7 Variables +6.18.7 Variables ---------------- Each module has its own hash table, sometimes known as an “obarray”, @@ -27029,7 +26808,7 @@ calling one of the constructor procedures ‘make-variable’ and  File: guile.info, Node: Module System Reflection, Next: Declarative Modules, Prev: Variables, Up: Modules -6.20.8 Module System Reflection +6.18.8 Module System Reflection ------------------------------- The previous sections have described a declarative view of the module @@ -27127,7 +26906,7 @@ Guile developers so that we can commit to stability for that interface.  File: guile.info, Node: Declarative Modules, Next: Accessing Modules from C, Prev: Module System Reflection, Up: Modules -6.20.9 Declarative Modules +6.18.9 Declarative Modules -------------------------- The first-class access to modules and module variables described in the @@ -27250,7 +27029,7 @@ when a declarative binding is redefined.  File: guile.info, Node: Accessing Modules from C, Next: provide and require, Prev: Declarative Modules, Up: Modules -6.20.10 Accessing Modules from C +6.18.10 Accessing Modules from C -------------------------------- The last sections have described how modules are used in Scheme code, @@ -27403,7 +27182,7 @@ the existing variable, if one is present. In that case, use  File: guile.info, Node: provide and require, Next: Environments, Prev: Accessing Modules from C, Up: Modules -6.20.11 provide and require +6.18.11 provide and require --------------------------- Aubrey Jaffer, mostly to support his portable Scheme library SLIB, @@ -27430,7 +27209,7 @@ access its facilities.  File: guile.info, Node: Environments, Prev: provide and require, Up: Modules -6.20.12 Environments +6.18.12 Environments -------------------- Scheme, as defined in R5RS, does _not_ have a full module system. @@ -27473,244 +27252,208 @@ i.e., passed as the second argument to ‘eval’. ‘scheme-report-environment’ are not immutable in Guile.  -File: guile.info, Node: Foreign Function Interface, Next: Scheduling, Prev: Modules, Up: API Reference +File: guile.info, Node: Foreign Function Interface, Next: Foreign Objects, Prev: Modules, Up: API Reference -6.21 Foreign Function Interface +6.19 Foreign Function Interface =============================== -The more one hacks in Scheme, the more one realizes that there are -actually two computational worlds: one which is warm and alive, that -land of parentheses, and one cold and dead, the land of C and its ilk. - - But yet we as programmers live in both worlds, and Guile itself is -half implemented in C. So it is that Guile’s living half pays respect to -its dead counterpart, via a spectrum of interfaces to C ranging from -dynamic loading of Scheme primitives to dynamic binding of stock C -library procedures. +Sometimes you need to use libraries written in C or Rust or some other +non-Scheme language. More rarely, you might need to write some C to +extend Guile. This section describes how to load these “foreign +libraries”, look up data and functions inside them, and so on. * Menu: -* Foreign Libraries:: Dynamically linking to libraries. -* Foreign Functions:: Simple calls to C procedures. -* C Extensions:: Extending Guile in C with loadable modules. -* Modules and Extensions:: Loading C extensions into modules. -* Foreign Pointers:: Accessing global variables. -* Dynamic FFI:: Calling arbitrary C functions. +* Foreign Libraries:: Dynamically linking to libraries. +* Foreign Extensions:: Extending Guile in C with loadable modules. +* Foreign Pointers:: Pointers to C data or functions. +* Foreign Types:: Expressing C types in Scheme. +* Foreign Functions:: Simple calls to C procedures. +* Void Pointers and Byte Access:: Pointers into the ether. +* Foreign Structs:: Packing and unpacking structs. +* More Foreign Functions:: Advanced examples.  -File: guile.info, Node: Foreign Libraries, Next: Foreign Functions, Up: Foreign Function Interface +File: guile.info, Node: Foreign Libraries, Next: Foreign Extensions, Up: Foreign Function Interface -6.21.1 Foreign Libraries +6.19.1 Foreign Libraries ------------------------ -Most modern Unices have something called “shared libraries”. This -ordinarily means that they have the capability to share the executable -image of a library between several running programs to save memory and -disk space. But generally, shared libraries give a lot of additional -flexibility compared to the traditional static libraries. In fact, -calling them ‘dynamic’ libraries is as correct as calling them ‘shared’. +Just as Guile can load up Scheme libraries at run-time, Guile can also +load some system libraries written in C or other low-level languages. +We refer to these as dynamically-loadable modules as “foreign +libraries”, to distinguish them from native libraries written in Scheme +or other languages implemented by Guile. - Shared libraries really give you a lot of flexibility in addition to -the memory and disk space savings. When you link a program against a -shared library, that library is not closely incorporated into the final -executable. Instead, the executable of your program only contains -enough information to find the needed shared libraries when the program -is actually run. Only then, when the program is starting, is the final -step of the linking process performed. This means that you need not -recompile all programs when you install a new, only slightly modified -version of a shared library. The programs will pick up the changes -automatically the next time they are run. + Foreign libraries usually come in two forms. Some foreign libraries +are part of the operating system, such as the compression library +‘libz’. These shared libraries are built in such a way that many +programs can use their functionality without duplicating their code. +When a program written in C is built, it can declare that it uses a +specific set of shared libraries. When the program is run, the +operating system takes care of locating and loading the shared +libraries. - Now, when all the necessary machinery is there to perform part of the -linking at run-time, why not take the next step and allow the programmer -to explicitly take advantage of it from within their program? Of -course, many operating systems that support shared libraries do just -that, and chances are that Guile will allow you to access this feature -from within your Scheme programs. As you might have guessed already, -this feature is called “dynamic linking”.(1) + The operating system components that can dynamically load and link +shared libraries when a program is run are also available +programmatically during a program’s execution. This is the interface +that’s most useful for Guile, and this is what we mean in Guile when we +refer to “dynamic linking”. Dynamic linking at run-time is sometimes +called “dlopening”, to distinguish it from the dynamic linking that +happens at program start-up. - We titled this section “foreign libraries” because although the name -“foreign” doesn’t leak into the API, the world of C really is foreign to -Scheme – and that estrangement extends to components of foreign -libraries as well, as we see in future sections. + The other kind of foreign library is sometimes known as a module, +plug-in, bundle, or an extension. These foreign libraries aren’t meant +to be linked to by C programs, but rather only to be dynamically loaded +at run-time – they extend some main program with functionality, but +don’t stand on their own. Sometimes a Guile library will implement some +of its functionality in a loadable module. - -- Scheme Procedure: dynamic-link [library] - -- C Function: scm_dynamic_link (library) - Find the shared library denoted by LIBRARY (a string) and link it - into the running Guile application. When everything works out, - return a Scheme object suitable for representing the linked object - file. Otherwise an error is thrown. How object files are searched - is system dependent. + In either case, the interface on the Guile side is the same. You +load the interface using ‘load-foreign-library’. The resulting foreign +library object implements a simple lookup interface whereby the user can +get addresses of data or code exported by the library. There is no +facility to inspect foreign libraries; you have to know what’s in there +already before you look. - Guile first tries to load LIBRARY as the absolute file name of a - shared library. If that fails, it then falls back to interpret - LIBRARY as just the name of some shared library that will be - searched for in the places where shared libraries usually reside, - such as ‘/usr/lib’ and ‘/usr/local/lib’. + Routines for loading foreign libraries and accessing their contents +are implemented in the ‘(system foreign-library)’ module. - LIBRARY should not contain an extension such as ‘.so’, unless - LIBRARY represents the absolute file name to the shared library. - The correct file name extension for the host operating system is - provided automatically, according to libltdl’s rules (*note - lt_dlopenext: (libtool)Libltdl interface.). + (use-modules (system foreign-library)) - When LIBRARY is omitted, a “global symbol handle” is returned. - This handle provides access to the symbols available to the program - at run-time, including those exported by the program itself and the - shared libraries already loaded. + -- Scheme Procedure: load-foreign-library [library] + [#:extensions=system-library-extensions] + [#:search-ltdl-library-path?=#t] [#:search-path=search-path] + [#:search-system-paths?=#t] [#:lazy?=#t] [#:global=#f] + [#:rename-on-cygwin?=#t] Find the shared library denoted by LIBRARY + (a string or ‘#f’) and link it into the running Guile application. + When everything works out, return a Scheme object suitable for + representing the linked object file. Otherwise an error is thrown. - Note that on hosts that use dynamic-link libraries (DLLs), the - global symbol handle may not be able to provide access to symbols - from recursively-loaded DLLs. Only exported symbols from those - DLLs directly loaded by the program may be available. + If LIBRARY argument is omitted, it defaults to ‘#f’. If ‘library’ + is false, the resulting foreign library gives access to all symbols + available for dynamic linking in the main binary. - -- Scheme Procedure: dynamic-object? obj - -- C Function: scm_dynamic_object_p (obj) - Return ‘#t’ if OBJ is a dynamic library handle, or ‘#f’ otherwise. + It is not necessary to include any extension such as ‘.so’ in + LIBRARY. For each system, Guile has a default set of extensions + that it will try. On GNU systems, the default extension set is + just ‘.so’; on Windows, just ‘.dll’; and on Darwin (Mac OS), it is + ‘.bundle’, ‘.so’, and ‘.dylib’. Pass ‘#:extensions EXTENSIONS’ to + override the default extensions list. If LIBRARY contains one of + the extensions, no extensions are tried, so it is possible to + specify the extension if you know exactly what file to load. - -- Scheme Procedure: dynamic-unlink dobj - -- C Function: scm_dynamic_unlink (dobj) - Unlink the indicated object file from the application. The - argument DOBJ must have been obtained by a call to ‘dynamic-link’. - After ‘dynamic-unlink’ has been called on DOBJ, its content is no - longer accessible. + Unless LIBRARY denotes an absolute file name or otherwise contains + a directory separator (‘/’, and also ‘\’ on Windows), Guile will + search for the library in the directories listed in SEARCH-PATHS. + The default search path has three components, which can all be + overriden by colon-delimited (semicolon on Windows) environment + variables: - (define libgl-obj (dynamic-link "libGL")) - libgl-obj - ⇒ # - (dynamic-unlink libGL-obj) - libGL-obj - ⇒ # + ‘GUILE_EXTENSIONS_PATH’ + This is the main environment variable for users to add + directories containing Guile extensions. The default value + has no entries. This environment variable was added in Guile + 3.0.6. + ‘LTDL_LIBRARY_PATH’ + Before Guile 3.0.6, Guile loaded foreign libraries using + ‘libltdl’, the dynamic library loader provided by libtool. + This loader used ‘LTDL_LIBRARY_PATH’, and for backwards + compatibility we still support that path. - As you can see, after calling ‘dynamic-unlink’ on a dynamically -linked library, it is marked as ‘(unlinked)’ and you are no longer able -to use it with ‘dynamic-call’, etc. Whether the library is really -removed from you program is system-dependent and will generally not -happen when some other parts of your program still use it. + However, ‘libltdl’ would not only open ‘.so’ (or ‘.dll’ and so + on) files, but also the ‘.la’ files created by libtool. In + installed libraries – libraries that are in the target + directories of ‘make install’ – ‘.la’ files are never needed, + to the extent that most GNU/Linux distributions remove them + entirely. It is sufficient to just load the ‘.so’ (or ‘.dll’ + and so on) files, which are always located in the same + directory as the ‘.la’ files. - When dynamic linking is disabled or not supported on your system, the -above functions throw errors, but they are still available. + But for uninstalled dynamic libraries, like those in a build + tree, the situation is a bit of a mess. If you have a project + that uses libtool to build libraries – which is the case for + Guile, and for most projects using autotools – and you build + ‘foo.so’ in directory ‘D’, libtool will put ‘foo.la’ in ‘D’, + but ‘foo.so’ gets put into ‘D/.libs’. - ---------- Footnotes ---------- + Users were mostly oblivious to this situation, as ‘libltdl’ + had special logic to be able to read the ‘.la’ file to know + where to find the ‘.so’, even from an uninstalled build tree, + preventing the existence of ‘.libs’ from leaking out to the + user. - (1) Some people also refer to the final linking stage at program -startup as ‘dynamic linking’, so if you want to make yourself perfectly -clear, it is probably best to use the more technical term “dlopening”, -as suggested by Gordon Matzigkeit in his libtool documentation. + We don’t use libltdl now, essentially for flexibility and + error-reporting reasons. But, to keep this old use-case + working, if SEARCH-LTDL-LIBRARY-PATH? is true, we add each + entry of ‘LTDL_LIBRARY_PATH’ to the default extensions load + path, additionally adding the ‘.libs’ subdirextories for each + entry, in case there are ‘.so’ files there instead of + alongside the ‘.la’ files. + ‘GUILE_SYSTEM_EXTENSIONS_PATH’ + The last path in Guile’s search path belongs to Guile itself, + and defaults to the libdir and the extensiondir, in that + order. For example, if you install to ‘/opt/guile’, these + would probably be ‘/opt/guile/lib’ and + ‘/opt/guile/lib/guile/3.0/extensions’, respectively. *Note + Parallel Installations::, for more details on ‘extensionsdir’. + + Finally, if no library is found in the search path, and if LIBRARY + is not absolute and does not include directory separators, and if + SEARCH-SYSTEM-PATHS? is true, the operating system may have its own + logic for where to locate LIBRARY. For example, on GNU, there will + be a default set of paths (often ‘/usr/lib’ and ‘/lib’, though it + depends on the system), and the ‘LD_LIBRARY_PATH’ environment + variable can add additional paths. Other operating systems have + other conventions. + + Falling back to the operating system for search is usually not a + great thing; it is a recipe for making programs that work on one + machine but not on others. Still, when wrapping system libraries, + it can be the only way to get things working at all. + + If LAZY? is true (the default), Guile will request the operating + system to resolve symbols used by the loaded library as they are + first used. If GLOBAL? is true, symbols defined by the loaded + library will be available when other modules need to resolve + symbols; the default is ‘#f’, which keeps symbols local. + + If RENAME-ON-CYGWIN? is true (the default) – on Cygwin hosts only – + the search behavior is modified such that a filename that starts + with “lib” will be searched for under the name “cyg”, as is + customary for Cygwin. + + The environment variables mentioned above are parsed when the +foreign-library module is first loaded and bound to parameters. Null +path components, for example the three components of +‘GUILE_SYSTEM_EXTENSIONS_PATH="::"’, are ignored. + + -- Scheme Parameter: guile-extensions-path + -- Scheme Parameter: ltdl-library-path + -- Scheme Parameter: guile-system-extensions-path + Parameters whose initial values are taken from + ‘GUILE_EXTENSIONS_PATH’, ‘LTDL_LIBRARY_PATH’, and + ‘GUILE_SYSTEM_EXTENSIONS_PATH’, respectively. *Note Parameters::. + The current values of these parameters are used when building the + search path when ‘load-foreign-library’ is called, unless the + caller explicitly passes a ‘#:search-path’ argument. + + -- Scheme Procedure: foreign-library? obj + Return ‘#t’ if OBJ is a foreign library, or ‘#f’ otherwise.  -File: guile.info, Node: Foreign Functions, Next: C Extensions, Prev: Foreign Libraries, Up: Foreign Function Interface +File: guile.info, Node: Foreign Extensions, Next: Foreign Pointers, Prev: Foreign Libraries, Up: Foreign Function Interface -6.21.2 Foreign Functions ------------------------- +6.19.2 Foreign Extensions +------------------------- -The most natural thing to do with a dynamic library is to grovel around -in it for a function pointer: a “foreign function”. ‘dynamic-func’ -exists for that purpose. +One way to use shared libraries is to extend Guile. Such loadable +modules generally define one distinguished initialization function that, +when called, will use the ‘libguile’ API to define procedures in the +current module. - -- Scheme Procedure: dynamic-func name dobj - -- C Function: scm_dynamic_func (name, dobj) - Return a “handle” for the func NAME in the shared object referred - to by DOBJ. The handle can be passed to ‘dynamic-call’ to actually - call the function. - - Regardless whether your C compiler prepends an underscore ‘_’ to - the global names in a program, you should *not* include this - underscore in NAME since it will be added automatically when - necessary. - - Guile has static support for calling functions with no arguments, -‘dynamic-call’. - - -- Scheme Procedure: dynamic-call func dobj - -- C Function: scm_dynamic_call (func, dobj) - Call the C function indicated by FUNC and DOBJ. The function is - passed no arguments and its return value is ignored. When FUNCTION - is something returned by ‘dynamic-func’, call that function and - ignore DOBJ. When FUNC is a string , look it up in DYNOBJ; this is - equivalent to - (dynamic-call (dynamic-func FUNC DOBJ) #f) - - ‘dynamic-call’ is not very powerful. It is mostly intended to be -used for calling specially written initialization functions that will -then add new primitives to Guile. For example, we do not expect that -you will dynamically link ‘libX11’ with ‘dynamic-link’ and then -construct a beautiful graphical user interface just by using -‘dynamic-call’. Instead, the usual way would be to write a special -Guile-to-X11 glue library that has intimate knowledge about both Guile -and X11 and does whatever is necessary to make them inter-operate -smoothly. This glue library could then be dynamically linked into a -vanilla Guile interpreter and activated by calling its initialization -function. That function would add all the new types and primitives to -the Guile interpreter that it has to offer. - - (There is actually another, better option: simply to create a -‘libX11’ wrapper in Scheme via the dynamic FFI. *Note Dynamic FFI::, for -more information.) - - Given some set of C extensions to Guile, the next logical step is to -integrate these glue libraries into the module system of Guile so that -you can load new primitives into a running system just as you can load -new Scheme code. - - -- Scheme Procedure: load-extension lib init - -- C Function: scm_load_extension (lib, init) - Load and initialize the extension designated by LIB and INIT. When - there is no pre-registered function for LIB/INIT, this is - equivalent to - - (dynamic-call INIT (dynamic-link LIB)) - - When there is a pre-registered function, that function is called - instead. - - Normally, there is no pre-registered function. This option exists - only for situations where dynamic linking is unavailable or - unwanted. In that case, you would statically link your program - with the desired library, and register its init function right - after Guile has been initialized. - - As for ‘dynamic-link’, LIB should not contain any suffix such as - ‘.so’ (*note dynamic-link: Foreign Libraries.). It should also not - contain any directory components. Libraries that implement Guile - Extensions should be put into the normal locations for shared - libraries. We recommend to use the naming convention - ‘libguile-bla-blum’ for a extension related to a module ‘(bla - blum)’. - - The normal way for a extension to be used is to write a small - Scheme file that defines a module, and to load the extension into - this module. When the module is auto-loaded, the extension is - loaded as well. For example, - - (define-module (bla blum)) - - (load-extension "libguile-bla-blum" "bla_init_blum") - - -File: guile.info, Node: C Extensions, Next: Modules and Extensions, Prev: Foreign Functions, Up: Foreign Function Interface - -6.21.3 C Extensions -------------------- - -The most interesting application of dynamically linked libraries is -probably to use them for providing _compiled code modules_ to Scheme -programs. As much fun as programming in Scheme is, every now and then -comes the need to write some low-level C stuff to make Scheme even more -fun. - - Not only can you put these new primitives into their own module (see -the previous section), you can even put them into a shared library that -is only then linked to your running Guile image when it is actually -needed. - - An example will hopefully make everything clear. Suppose we want to -make the Bessel functions of the C library available to Scheme in the -module ‘(math bessel)’. First we need to write the appropriate glue -code to convert the arguments and return values of the functions from -Scheme to C and back. Additionally, we need a function that will add -them to the set of Guile primitives. Because this is just an example, -we will only implement this for the ‘j0’ function. + Concretely, you might extend Guile with an implementation of the +Bessel function, ‘j0’: #include #include @@ -27722,278 +27465,137 @@ we will only implement this for the ‘j0’ function. } void - init_math_bessel () + init_math_bessel (void) { scm_c_define_gsubr ("j0", 1, 0, 0, j0_wrapper); } - We can already try to bring this into action by manually calling the -low level functions for performing dynamic linking. The C source file -needs to be compiled into a shared library. Here is how to do it on -GNU/Linux, please refer to the ‘libtool’ documentation for how to create -dynamically linkable libraries portably. + The C source file would then need to be compiled into a shared +library. On GNU/Linux, the compiler invocation might look like this: - gcc -shared -o libbessel.so -fPIC bessel.c + gcc -shared -o bessel.so -fPIC bessel.c - Now fire up Guile: + A good default place to put shared libraries that extend Guile is +into the extensions dir. From the command line or a build script, +invoke ‘pkg-config --variable=extensionsdir guile-3.0’ to print the +extensions dir. *Note Parallel Installations::, for more details. - (define bessel-lib (dynamic-link "./libbessel.so")) - (dynamic-call "init_math_bessel" bessel-lib) - (j0 2) - ⇒ 0.223890779141236 + Guile can load up ‘bessel.so’ via ‘load-extension’. - The filename ‘./libbessel.so’ should be pointing to the shared -library produced with the ‘gcc’ command above, of course. The second -line of the Guile interaction will call the ‘init_math_bessel’ function -which in turn will register the C function ‘j0_wrapper’ with the Guile -interpreter under the name ‘j0’. This function becomes immediately -available and we can call it from Scheme. + -- Scheme Procedure: load-extension lib init + -- C Function: scm_load_extension (lib, init) + Load and initialize the extension designated by LIB and INIT. - Fun, isn’t it? But we are only half way there. This is what -‘apropos’ has to say about ‘j0’: + The normal way for a extension to be used is to write a small Scheme +file that defines a module, and to load the extension into this module. +When the module is auto-loaded, the extension is loaded as well. For +example: - (apropos "j0") - ⊣ (guile-user): j0 # + (define-module (math bessel) + #:export (j0)) - As you can see, ‘j0’ is contained in the root module, where all the -other Guile primitives like ‘display’, etc live. In general, a -primitive is put into whatever module is the “current module” at the -time ‘scm_c_define_gsubr’ is called. + (load-extension "bessel" "init_math_bessel") - A compiled module should have a specially named “module init -function”. Guile knows about this special name and will call that -function automatically after having linked in the shared library. For -our example, we replace ‘init_math_bessel’ with the following code in -‘bessel.c’: + This ‘load-extension’ invocation loads the ‘bessel’ library via +‘(load-foreign-library "bessel")’, then looks up the ‘init_math_bessel’ +symbol in the library, treating it as a function of no arguments, and +calls that function. - void - init_math_bessel (void *unused) + If you decide to put your extension outside the default search path +for ‘load-foreign-library’, probably you should adapt the Scheme module +to specify its absolute path. For example, if you use ‘automake’ to +build your extension and place it in ‘$(pkglibdir)’, you might define a +build-parameters module that gets created by the build system: + + (define-module (math config) + #:export (extensiondir)) + (define extensiondir "PKGLIBDIR") + + This file would be ‘config.scm.in’. You would define a ‘make’ rule +to substitute in the absolute installed file name: + + config.scm: config.scm.in + sed 's|PKGLIBDIR|$(pkglibdir)|' <$< >$ + + Then your ‘(math bessel)’ would import ‘(math config)’, then +‘(load-extension (in-vicinity extensiondir "bessel") +"init_math_bessel")’. + + An alternate approach would be to rebind the ‘guile-extensions-path’ +parameter, or its corresponding environment variable, but note that +changing those parameters applies to other users of +‘load-foreign-library’ as well. + + Note that the new primitives that the extension adds to Guile with +‘scm_c_define_gsubr’ (*note Primitive Procedures::) or with any of the +other mechanisms are placed into the module that is current when the +‘scm_c_define_gsubr’ is executed, so to be clear about what goes vwhere +it’s best to include the ‘load-extension’ in a module, as above. +Alternately, the C code can use ‘scm_c_define_module’ to specify which +module is being created: + + static void + do_init (void *unused) { scm_c_define_gsubr ("j0", 1, 0, 0, j0_wrapper); scm_c_export ("j0", NULL); } void - scm_init_math_bessel_module () + init_math_bessel () { - scm_c_define_module ("math bessel", init_math_bessel, NULL); + scm_c_define_module ("math bessel", do_init, NULL); } - The general pattern for the name of a module init function is: -‘scm_init_’, followed by the name of the module where the individual -hierarchical components are concatenated with underscores, followed by -‘_module’. - - After ‘libbessel.so’ has been rebuilt, we need to place the shared -library into the right place. - - Once the module has been correctly installed, it should be possible -to use it like this: - - guile> (load-extension "./libbessel.so" "scm_init_math_bessel_module") - guile> (use-modules (math bessel)) - guile> (j0 2) - 0.223890779141236 - guile> (apropos "j0") - ⊣ (math bessel): j0 # - - That’s it! + And yet... if what we want is just the ‘j0’ function, it seems like +a lot of ceremony to have to compile a Guile-specific wrapper library +complete with an initialization function and wraper module to allow +Guile users to call it. There is another way, but to get there, we have +to talk about function pointers and function types first. *Note Foreign +Functions::, to skip to the good parts.  -File: guile.info, Node: Modules and Extensions, Next: Foreign Pointers, Prev: C Extensions, Up: Foreign Function Interface +File: guile.info, Node: Foreign Pointers, Next: Foreign Types, Prev: Foreign Extensions, Up: Foreign Function Interface -6.21.4 Modules and Extensions ------------------------------ - -The new primitives that you add to Guile with ‘scm_c_define_gsubr’ -(*note Primitive Procedures::) or with any of the other mechanisms are -placed into the module that is current when the ‘scm_c_define_gsubr’ is -executed. Extensions loaded from the REPL, for example, will be placed -into the ‘(guile-user)’ module, if the REPL module was not changed. - - To define C primitives within a specific module, the simplest way is: - - (define-module (foo bar)) - (load-extension "foobar-c-code" "foo_bar_init") - - When loaded with ‘(use-modules (foo bar))’, the ‘load-extension’ call -looks for the ‘foobar-c-code.so’ (etc) object file in Guile’s -‘extensiondir’, which is usually a subdirectory of the ‘libdir’. For -example, if your libdir is ‘/usr/lib’, the ‘extensiondir’ for the Guile -3.0.X series will be ‘/usr/lib/guile/3.0/’. - - The extension path includes the major and minor version of Guile (the -“effective version”), because Guile guarantees compatibility within a -given effective version. This allows you to install different versions -of the same extension for different versions of Guile. - - If the extension is not found in the ‘extensiondir’, Guile will also -search the standard system locations, such as ‘/usr/lib’ or -‘/usr/local/lib’. It is preferable, however, to keep your extension out -of the system library path, to prevent unintended interference with -other dynamically-linked C libraries. - - If someone installs your module to a non-standard location then the -object file won’t be found. You can address this by inserting the -install location in the ‘foo/bar.scm’ file. This is convenient for the -user and also guarantees the intended object is read, even if stray -older or newer versions are in the loader’s path. - - The usual way to specify an install location is with a ‘prefix’ at -the configure stage, for instance ‘./configure prefix=/opt’ results in -library files as say ‘/opt/lib/foobar-c-code.so’. When using Autoconf -(*note Introduction: (autoconf)Top.), the library location is in a -‘libdir’ variable. Its value is intended to be expanded by ‘make’, and -can by substituted into a source file like ‘foo.scm.in’ - - (define-module (foo bar)) - (load-extension "XXextensiondirXX/foobar-c-code" "foo_bar_init") - -with the following in a ‘Makefile’, using ‘sed’ (*note Introduction: -(sed)Top.), - - foo.scm: foo.scm.in - sed 's|XXextensiondirXX|$(libdir)/guile/3.0|' foo.scm - - The actual pattern ‘XXextensiondirXX’ is arbitrary, it’s only -something which doesn’t otherwise occur. If several modules need the -value, it can be easier to create one ‘foo/config.scm’ with a define of -the ‘extensiondir’ location, and use that as required. - - (define-module (foo config)) - (define-public foo-config-extensiondir "XXextensiondirXX"") - - Such a file might have other locations too, for instance a data -directory for auxiliary files, or ‘localedir’ if the module has its own -‘gettext’ message catalogue (*note Internationalization::). - - It will be noted all of the above requires that the Scheme code to be -found in ‘%load-path’ (*note Load Paths::). Presently it’s left up to -the system administrator or each user to augment that path when -installing Guile modules in non-default locations. But having reached -the Scheme code, that code should take care of hitting any of its own -private files etc. - - -File: guile.info, Node: Foreign Pointers, Next: Dynamic FFI, Prev: Modules and Extensions, Up: Foreign Function Interface - -6.21.5 Foreign Pointers +6.19.3 Foreign Pointers ----------------------- -The previous sections have shown how Guile can be extended at runtime by -loading compiled C extensions. This approach is all well and good, but -wouldn’t it be nice if we didn’t have to write any C at all? This -section takes up the problem of accessing C values from Scheme, and the -next discusses C functions. +Foreign libraries are essentially key-value mappings, where the keys are +names of definitions and the values are the addresses of those +definitions. To look up the address of a definition, use +‘foreign-library-pointer’ from the ‘(system foreign-library)’ module. -* Menu: - -* Foreign Types:: Expressing C types in Scheme. -* Foreign Variables:: Pointers to C symbols. -* Void Pointers and Byte Access:: Pointers into the ether. -* Foreign Structs:: Packing and unpacking structs. - - -File: guile.info, Node: Foreign Types, Next: Foreign Variables, Up: Foreign Pointers - -6.21.5.1 Foreign Types -...................... - -The first impedance mismatch that one sees between C and Scheme is that -in C, the storage locations (variables) are typed, but in Scheme types -are associated with values, not variables. *Note Values and -Variables::. - - So when describing a C function or a C structure so that it can be -accessed from Scheme, the data types of the parameters or fields must be -passed explicitly. - - These “C type values” may be constructed using the constants and -procedures from the ‘(system foreign)’ module, which may be loaded like -this: - - (use-modules (system foreign)) - - ‘(system foreign)’ exports a number of values expressing the basic C -types: - - -- Scheme Variable: int8 - -- Scheme Variable: uint8 - -- Scheme Variable: uint16 - -- Scheme Variable: int16 - -- Scheme Variable: uint32 - -- Scheme Variable: int32 - -- Scheme Variable: uint64 - -- Scheme Variable: int64 - -- Scheme Variable: float - -- Scheme Variable: double - These values represent the C numeric types of the specified sizes - and signednesses. - - In addition there are some convenience bindings for indicating types -of platform-dependent size: - - -- Scheme Variable: int - -- Scheme Variable: unsigned-int - -- Scheme Variable: long - -- Scheme Variable: unsigned-long - -- Scheme Variable: short - -- Scheme Variable: unsigned-short - -- Scheme Variable: size_t - -- Scheme Variable: ssize_t - -- Scheme Variable: ptrdiff_t - -- Scheme Variable: intptr_t - -- Scheme Variable: uintptr_t - Values exported by the ‘(system foreign)’ module, representing C - numeric types. For example, ‘long’ may be ‘equal?’ to ‘int64’ on a - 64-bit platform. - - -- Scheme Variable: void - The ‘void’ type. It can be used as the first argument to - ‘pointer->procedure’ to wrap a C function that returns nothing. - - In addition, the symbol ‘*’ is used by convention to denote pointer -types. Procedures detailed in the following sections, such as -‘pointer->procedure’, accept it as a type descriptor. - - -File: guile.info, Node: Foreign Variables, Next: Void Pointers and Byte Access, Prev: Foreign Types, Up: Foreign Pointers - -6.21.5.2 Foreign Variables -.......................... - -Pointers to variables in the current address space may be looked up -dynamically using ‘dynamic-pointer’. - - -- Scheme Procedure: dynamic-pointer name dobj - -- C Function: scm_dynamic_pointer (name, dobj) + -- Scheme Procedure: foreign-library-pointer lib name Return a “wrapped pointer” for the symbol NAME in the shared object - referred to by DOBJ. The returned pointer points to a C object. + referred to by LIB. The returned pointer points to a C object. - Regardless whether your C compiler prepends an underscore ‘_’ to - the global names in a program, you should *not* include this - underscore in NAME since it will be added automatically when - necessary. + As a convenience, if LIB is not a foreign library, it will be + passed to ‘load-foreign-library’. - For example, currently Guile has a variable, ‘scm_numptob’, as part -of its API. It is declared as a C ‘long’. So, to create a handle -pointing to that foreign value, we do: + If we continue with the ‘bessel.so’ example from before, we can get +the address of the ‘init_math_bessel’ function via: - (use-modules (system foreign)) - (define numptob (dynamic-pointer "scm_numptob" (dynamic-link))) - numptob + (use-modules (system foreign-library)) + (define init (foreign-library-pointer "bessel" "init_math_bessel")) + init ⇒ # - (The next section discusses ways to dereference pointers.) + A value returned by ‘foreign-library-pointer’ is a Scheme wrapper for +a C pointer. Pointers are a data type in Guile that is disjoint from +all other types. The next section discusses ways to dereference +pointers, but before then we describe the usual type predicates and so +on. - A value returned by ‘dynamic-pointer’ is a Scheme wrapper for a C -pointer. + Note that the rest of the interfaces in this section are part of the +‘(system foreign)’ library: + + (use-modules (system foreign)) -- Scheme Procedure: pointer-address pointer -- C Function: scm_pointer_address (pointer) Return the numerical value of POINTER. - (pointer-address numptob) + (pointer-address init) ⇒ 139984413364296 ; YMMV -- Scheme Procedure: make-pointer address [finalizer] @@ -28002,7 +27604,7 @@ pointer. will be called when the pointer object becomes unreachable. -- Scheme Procedure: pointer? obj - Return ‘#t’ if OBJ is a pointer object, ‘#f’ otherwise. + Return ‘#t’ if OBJ is a pointer object, or ‘#f’ otherwise. -- Scheme Variable: %null-pointer A foreign pointer whose value is 0. @@ -28037,10 +27639,144 @@ to refer to ‘void *’ values. Unpack the pointer value from a pointer object.  -File: guile.info, Node: Void Pointers and Byte Access, Next: Foreign Structs, Prev: Foreign Variables, Up: Foreign Pointers +File: guile.info, Node: Foreign Types, Next: Foreign Functions, Prev: Foreign Pointers, Up: Foreign Function Interface -6.21.5.3 Void Pointers and Byte Access -...................................... +6.19.4 Foreign Types +-------------------- + +From Scheme’s perspective, foreign pointers are shards of chaos. The +user can create a foreign pointer for any address, and do with it what +they will. The only thing that lends a sense of order to the whole is a +shared hallucination that certain storage locations have certain types. +When making Scheme wrappers for foreign interfaces, we hide the madness +by explicitly representing the the data types of parameters and fields. + + These “foreign type values” may be constructed using the constants +and procedures from the ‘(system foreign)’ module, which may be loaded +like this: + + (use-modules (system foreign)) + + ‘(system foreign)’ exports a number of values expressing the basic C +types. + + -- Scheme Variable: int8 + -- Scheme Variable: uint8 + -- Scheme Variable: uint16 + -- Scheme Variable: int16 + -- Scheme Variable: uint32 + -- Scheme Variable: int32 + -- Scheme Variable: uint64 + -- Scheme Variable: int64 + -- Scheme Variable: float + -- Scheme Variable: double + -- Scheme Variable: complex-double + -- Scheme Variable: complex-float + These values represent the C numeric types of the specified sizes + and signednesses. ‘complex-float’ and ‘complex-double’ stand for + C99 ‘float _Complex’ and ‘double _Complex’ respecively. + + In addition there are some convenience bindings for indicating types +of platform-dependent size. + + -- Scheme Variable: int + -- Scheme Variable: unsigned-int + -- Scheme Variable: long + -- Scheme Variable: unsigned-long + -- Scheme Variable: short + -- Scheme Variable: unsigned-short + -- Scheme Variable: size_t + -- Scheme Variable: ssize_t + -- Scheme Variable: ptrdiff_t + -- Scheme Variable: intptr_t + -- Scheme Variable: uintptr_t + Values exported by the ‘(system foreign)’ module, representing C + numeric types. For example, ‘long’ may be ‘equal?’ to ‘int64’ on a + 64-bit platform. + + -- Scheme Variable: void + The ‘void’ type. It can be used as the first argument to + ‘pointer->procedure’ to wrap a C function that returns nothing. + + In addition, the symbol ‘*’ is used by convention to denote pointer +types. Procedures detailed in the following sections, such as +‘pointer->procedure’, accept it as a type descriptor. + + +File: guile.info, Node: Foreign Functions, Next: Void Pointers and Byte Access, Prev: Foreign Types, Up: Foreign Function Interface + +6.19.5 Foreign Functions +------------------------ + +The most natural thing to do with a dynamic library is to grovel around +in it for a function pointer: a “foreign function”. Load the ‘(system +foreign)’ module to use these Scheme interfaces. + + (use-modules (system foreign)) + + -- Scheme Procedure: pointer->procedure return_type func_ptr arg_types + [#:return-errno?=#f] + -- C Function: scm_pointer_to_procedure (return_type, func_ptr, + arg_types) + -- C Function: scm_pointer_to_procedure_with_errno (return_type, + func_ptr, arg_types) + + Make a foreign function. + + Given the foreign void pointer FUNC_PTR, its argument and return + types ARG_TYPES and RETURN_TYPE, return a procedure that will pass + arguments to the foreign function and return appropriate values. + + ARG_TYPES should be a list of foreign types. ‘return_type’ should + be a foreign type. *Note Foreign Types::, for more information on + foreign types. + + If RETURN-ERRNO? is true, or when calling + ‘scm_pointer_to_procedure_with_errno’, the returned procedure will + return two values, with ‘errno’ as the second value. + + Finally, in ‘(system foreign-library)’ there is a convenient wrapper +function, joining together ‘foreign-libary-pointer’ and +‘procedure->pointer’: + + -- Scheme Procedure: foreign-library-function lib name + [#:return-type=void] [#:arg-types='()] [#:return-errno?=#f] + Load the address of NAME from LIB, and treat it as a function + taking arguments ARG-TYPES and returning RETURN-TYPE, optionally + also with errno. + + An invocation of ‘foreign-library-function’ is entirely equivalent + to: + (pointer->procedure RETURN-TYPE + (foreign-library-pointer LIB NAME) + ARG-TYPES + #:return-errno? RETURN-ERRNO?). + + Pulling all this together, here is a better definition of ‘(math +bessel)’: + + (define-module (math bessel) + #:use-module (system foreign) + #:use-module (system foreign-library) + #:export (j0)) + + (define j0 + (foreign-library-function "libm" "j0" + #:return-type double + #:arg-types (list double))) + + That’s it! No C at all. + + Before going on to more detailed examples, the next two sections +discuss how to deal with data that is more complex than, say, ‘int8’. +*Note More Foreign Functions::, to continue with foreign function +examples. + + +File: guile.info, Node: Void Pointers and Byte Access, Next: Foreign Structs, Prev: Foreign Functions, Up: Foreign Function Interface + +6.19.6 Void Pointers and Byte Access +------------------------------------ Wrapped pointers are untyped, so they are essentially equivalent to C ‘void’ pointers. As in C, the memory region pointed to by a pointer can @@ -28049,6 +27785,10 @@ be accessed at the byte level. This is achieved using _bytevectors_ procedures that can be used to convert byte sequences to Scheme objects such as strings, floating point numbers, or integers. + Load the ‘(system foreign)’ module to use these Scheme interfaces. + + (use-modules (system foreign)) + -- Scheme Procedure: pointer->bytevector pointer len [offset [uvec_type]] -- C Function: scm_pointer_to_bytevector (pointer, len, offset, @@ -28068,8 +27808,8 @@ such as strings, floating point numbers, or integers. -- Scheme Procedure: bytevector->pointer bv [offset] -- C Function: scm_bytevector_to_pointer (bv, offset) - Return a pointer pointer aliasing the memory pointed to by BV or - OFFSET bytes after BV when OFFSET is passed. + Return a pointer aliasing the memory pointed to by BV or OFFSET + bytes after BV when OFFSET is passed. In addition to these primitives, convenience procedures are available: @@ -28131,19 +27871,17 @@ different pointer types as disjoint Scheme types. The (define grab-bottle ;; Wrapper for `bottle_t *grab (void)'. - (let ((grab (pointer->procedure '* - (dynamic-func "grab_bottle" libbottle) - '()))) + (let ((grab (foreign-library-function libbottle "grab_bottle" + #:return-type '*))) (lambda () "Return a new bottle." (wrap-bottle (grab))))) (define bottle-contents ;; Wrapper for `const char *bottle_contents (bottle_t *)'. - (let ((contents (pointer->procedure '* - (dynamic-func "bottle_contents" - libbottle) - '(*)))) + (let ((contents (foreign-library-function libbottle "bottle_contents" + #:return-type '* + #:arg-types '(*)))) (lambda (b) "Return the contents of B." (pointer->string (contents (unwrap-bottle b)))))) @@ -28155,11 +27893,15 @@ different pointer types as disjoint Scheme types. The ‘bottle’ object satisfying ‘bottle?’. Likewise, ‘bottle-contents’ errors out when its argument is not a genuine ‘bottle’ object. - Going back to the ‘scm_numptob’ example above, here is how we can -read its value as a C ‘long’ integer: + As another example, currently Guile has a variable, ‘scm_numptob’, as +part of its API. It is declared as a C ‘long’. So, to read its value, +we can do: + (use-modules (system foreign)) (use-modules (rnrs bytevectors)) - + (define numptob + (foreign-library-pointer #f "scm_numptob")) + numptob (bytevector-uint-ref (pointer->bytevector numptob (sizeof long)) 0 (native-endianness) (sizeof long)) @@ -28173,16 +27915,18 @@ your program, simply accessing the data pointed to by a dangling pointer or similar can prove equally disastrous.  -File: guile.info, Node: Foreign Structs, Prev: Void Pointers and Byte Access, Up: Foreign Pointers +File: guile.info, Node: Foreign Structs, Next: More Foreign Functions, Prev: Void Pointers and Byte Access, Up: Foreign Function Interface -6.21.5.4 Foreign Structs -........................ +6.19.7 Foreign Structs +---------------------- Finally, one last note on foreign values before moving on to actually calling foreign functions. Sometimes you need to deal with C structs, which requires interpreting each element of the struct according to the -its type, offset, and alignment. Guile has some primitives to support -this. +its type, offset, and alignment. The ‘(system foreign)’ module has some +primitives to support this. + + (use-modules (system foreign)) -- Scheme Procedure: sizeof type -- C Function: scm_sizeof (type) @@ -28231,64 +27975,21 @@ structs and unions by hand. See the code for ‘(system foreign)’ for details.  -File: guile.info, Node: Dynamic FFI, Prev: Foreign Pointers, Up: Foreign Function Interface +File: guile.info, Node: More Foreign Functions, Prev: Foreign Structs, Up: Foreign Function Interface -6.21.6 Dynamic FFI ------------------- +6.19.8 More Foreign Functions +----------------------------- -Of course, the land of C is not all nouns and no verbs: there are -functions too, and Guile allows you to call them. - - -- Scheme Procedure: pointer->procedure return_type func_ptr arg_types - [#:return-errno?=#f] - -- C Function: scm_pointer_to_procedure (return_type, func_ptr, - arg_types) - -- C Function: scm_pointer_to_procedure_with_errno (return_type, - func_ptr, arg_types) - - Make a foreign function. - - Given the foreign void pointer FUNC_PTR, its argument and return - types ARG_TYPES and RETURN_TYPE, return a procedure that will pass - arguments to the foreign function and return appropriate values. - - ARG_TYPES should be a list of foreign types. ‘return_type’ should - be a foreign type. *Note Foreign Types::, for more information on - foreign types. - - If RETURN-ERRNO? is true, or when calling - ‘scm_pointer_to_procedure_with_errno’, the returned procedure will - return two values, with ‘errno’ as the second value. - - Here is a better definition of ‘(math bessel)’: - - (define-module (math bessel) - #:use-module (system foreign) - #:export (j0)) - - (define libm (dynamic-link "libm")) - - (define j0 - (pointer->procedure double - (dynamic-func "j0" libm) - (list double))) - - That’s it! No C at all. - - Numeric arguments and return values from foreign functions are -represented as Scheme values. For example, ‘j0’ in the above example -takes a Scheme number as its argument, and returns a Scheme number. - - Pointers may be passed to and returned from foreign functions as -well. In that case the type of the argument or return value should be -the symbol ‘*’, indicating a pointer. For example, the following code -makes ‘memcpy’ available to Scheme: +It is possible to pass pointers to foreign functions, and to return them +as well. In that case the type of the argument or return value should +be the symbol ‘*’, indicating a pointer. For example, the following +code makes ‘memcpy’ available to Scheme: + (use-modules (system foreign)) (define memcpy - (let ((this (dynamic-link))) - (pointer->procedure '* - (dynamic-func "memcpy" this) - (list '* '* size_t)))) + (foreign-library-function #f "memcpy" + #:return-type '* + #:arg-types (list '* '* size_t))) To invoke ‘memcpy’, one must pass it foreign pointers: @@ -28320,10 +28021,9 @@ to by the foreign pointer is mutated in place. ;; assuming fields are of type "long" (define gettimeofday - (let ((f (pointer->procedure - int - (dynamic-func "gettimeofday" (dynamic-link)) - (list '* '*))) + (let ((f (foreign-library-function #f "gettimeofday" + #:return-type int + #:arg-types (list '* '*))) (tv-type (list long long))) (lambda () (let* ((timeval (make-c-struct tv-type (list 0 0))) @@ -28355,10 +28055,8 @@ function can be made accessible to Scheme (*note ‘qsort’: (libc)Array Sort Function.): (define qsort! - (let ((qsort (pointer->procedure void - (dynamic-func "qsort" - (dynamic-link)) - (list '* size_t size_t '*)))) + (let ((qsort (foreign-library-function + #f "qsort" #:arg-types (list '* size_t size_t '*)))) (lambda (bv compare) ;; Sort bytevector BV in-place according to comparison ;; procedure COMPARE. @@ -28404,7 +28102,312 @@ ARM, and MIPS, to name a few. most welcome.  -File: guile.info, Node: Scheduling, Next: Options and Config, Prev: Foreign Function Interface, Up: API Reference +File: guile.info, Node: Foreign Objects, Next: Smobs, Prev: Foreign Function Interface, Up: API Reference + +6.20 Foreign Objects +==================== + +This chapter contains reference information related to defining and +working with foreign objects. *Note Defining New Foreign Object +Types::, for a tutorial-like introduction to foreign objects. + + -- C Type: scm_t_struct_finalize + This function type returns ‘void’ and takes one ‘SCM’ argument. + + -- C Function: SCM scm_make_foreign_object_type (SCM name, SCM slots, + scm_t_struct_finalize finalizer) + Create a fresh foreign object type. NAME is a symbol naming the + type. SLOTS is a list of symbols, each one naming a field in the + foreign object type. FINALIZER indicates the finalizer, and may be + ‘NULL’. + + We recommend that finalizers be avoided if possible. *Note Foreign +Object Memory Management::. Finalizers must be async-safe and +thread-safe. Again, *note Foreign Object Memory Management::. If you +are embedding Guile in an application that is not thread-safe, and you +define foreign object types that need finalization, you might want to +disable automatic finalization, and arrange to call +‘scm_manually_run_finalizers ()’ yourself. + + -- C Function: int scm_set_automatic_finalization_enabled (int + enabled_p) + Enable or disable automatic finalization. By default, Guile + arranges to invoke object finalizers automatically, in a separate + thread if possible. Passing a zero value for ENABLED_P will + disable automatic finalization for Guile as a whole. If you + disable automatic finalization, you will have to call + ‘scm_run_finalizers ()’ periodically. + + Unlike most other Guile functions, you can call + ‘scm_set_automatic_finalization_enabled’ before Guile has been + initialized. + + Return the previous status of automatic finalization. + + -- C Function: int scm_run_finalizers (void) + Invoke any pending finalizers. Returns the number of finalizers + that were invoked. This function should be called when automatic + finalization is disabled, though it may be called if it is enabled + as well. + + -- C Function: void scm_assert_foreign_object_type (SCM type, SCM val) + When VAL is a foreign object of the given TYPE, do nothing. + Otherwise, signal an error. + + -- C Function: SCM scm_make_foreign_object_0 (SCM type) + -- C Function: SCM scm_make_foreign_object_1 (SCM type, void *val0) + -- C Function: SCM scm_make_foreign_object_2 (SCM type, void *val0, + void *val1) + -- C Function: SCM scm_make_foreign_object_3 (SCM type, void *val0, + void *val1, void *val2) + -- C Function: SCM scm_make_foreign_object_n (SCM type, size_t n, void + *vals[]) + Make a new foreign object of the type with type TYPE and initialize + the first N fields to the given values, as appropriate. + + The number of fields for objects of a given type is fixed when the + type is created. It is an error to give more initializers than + there are fields in the value. It is perfectly fine to give fewer + initializers than needed; this is convenient when some fields are + of non-pointer types, and would be easier to initialize with the + setters described below. + + -- C Function: void* scm_foreign_object_ref (SCM obj, size_t n); + -- C Function: scm_t_bits scm_foreign_object_unsigned_ref (SCM obj, + size_t n); + -- C Function: scm_t_signed_bits scm_foreign_object_signed_ref (SCM + obj, size_t n); + Return the value of the Nth field of the foreign object OBJ. The + backing store for the fields is as wide as a ‘scm_t_bits’ value, + which is at least as wide as a pointer. The different variants + handle casting in a portable way. + + -- C Function: void scm_foreign_object_set_x (SCM obj, size_t n, void + *val); + -- C Function: void scm_foreign_object_unsigned_set_x (SCM obj, size_t + n, scm_t_bits val); + -- C Function: void scm_foreign_object_signed_set_x (SCM obj, size_t n, + scm_t_signed_bits val); + Set the value of the Nth field of the foreign object OBJ to VAL, + after portably converting to a ‘scm_t_bits’ value, if needed. + + One can also access foreign objects from Scheme. *Note Foreign +Objects and Scheme::, for some examples. + + (use-modules (system foreign-object)) + + -- Scheme Procedure: make-foreign-object-type name slots + [#:finalizer=#f] + Make a new foreign object type. See the above documentation for + ‘scm_make_foreign_object_type’; these functions are exactly + equivalent, except for the way in which the finalizer gets attached + to instances (an internal detail). + + The resulting value is a GOOPS class. *Note GOOPS::, for more on + classes in Guile. + + -- Scheme Syntax: define-foreign-object-type name constructor (slot + ...) [#:finalizer=#f] + A convenience macro to define a type, using + ‘make-foreign-object-type’, and bind it to NAME. A constructor + will be bound to CONSTRUCTOR, and getters will be bound to each of + SLOT.... + + +File: guile.info, Node: Smobs, Next: Scheduling, Prev: Foreign Objects, Up: API Reference + +6.21 Smobs +========== + +A “smob” is a “small object”. Before foreign objects were introduced in +Guile 2.0.12 (*note Foreign Objects::), smobs were the preferred way to +for C code to define new kinds of Scheme objects. With the exception of +the so-called “applicable SMOBs” discussed below, smobs are now a legacy +interface and are headed for eventual deprecation. *Note Deprecation::. +New code should use the foreign object interface. + + This section contains reference information related to defining and +working with smobs. For a tutorial-like introduction to smobs, see +“Defining New Types (Smobs)” in previous versions of this manual. + + -- Function: scm_t_bits scm_make_smob_type (const char *name, size_t + size) + This function adds a new smob type, named NAME, with instance size + SIZE, to the system. The return value is a tag that is used in + creating instances of the type. + + If SIZE is 0, the default _free_ function will do nothing. + + If SIZE is not 0, the default _free_ function will deallocate the + memory block pointed to by ‘SCM_SMOB_DATA’ with ‘scm_gc_free’. The + WHAT parameter in the call to ‘scm_gc_free’ will be NAME. + + Default values are provided for the _mark_, _free_, _print_, and + _equalp_ functions. If you want to customize any of these + functions, the call to ‘scm_make_smob_type’ should be immediately + followed by calls to one or several of ‘scm_set_smob_mark’, + ‘scm_set_smob_free’, ‘scm_set_smob_print’, and/or + ‘scm_set_smob_equalp’. + + -- C Function: void scm_set_smob_free (scm_t_bits tc, size_t (*free) + (SCM obj)) + This function sets the smob freeing procedure (sometimes referred + to as a “finalizer”) for the smob type specified by the tag TC. TC + is the tag returned by ‘scm_make_smob_type’. + + The FREE procedure must deallocate all resources that are directly + associated with the smob instance OBJ. It must assume that all + ‘SCM’ values that it references have already been freed and are + thus invalid. + + It must also not call any libguile function or macro except + ‘scm_gc_free’, ‘SCM_SMOB_FLAGS’, ‘SCM_SMOB_DATA’, + ‘SCM_SMOB_DATA_2’, and ‘SCM_SMOB_DATA_3’. + + The FREE procedure must return 0. + + Note that defining a freeing procedure is not necessary if the + resources associated with OBJ consists only of memory allocated + with ‘scm_gc_malloc’ or ‘scm_gc_malloc_pointerless’ because this + memory is automatically reclaimed by the garbage collector when it + is no longer needed (*note ‘scm_gc_malloc’: Memory Blocks.). + + Smob free functions must be thread-safe. *Note Foreign Object Memory +Management::, for a discussion on finalizers and concurrency. If you +are embedding Guile in an application that is not thread-safe, and you +define smob types that need finalization, you might want to disable +automatic finalization, and arrange to call ‘scm_manually_run_finalizers +()’ yourself. *Note Foreign Objects::. + + -- C Function: void scm_set_smob_mark (scm_t_bits tc, SCM (*mark) (SCM + obj)) + This function sets the smob marking procedure for the smob type + specified by the tag TC. TC is the tag returned by + ‘scm_make_smob_type’. + + Defining a marking procedure is almost always the wrong thing to + do. It is much, much preferable to allocate smob data with the + ‘scm_gc_malloc’ and ‘scm_gc_malloc_pointerless’ functions, and + allow the GC to trace pointers automatically. + + Any mark procedures you see currently almost surely date from the + time of Guile 1.8, before the switch to the Boehm-Demers-Weiser + collector. Such smob implementations should be changed to just use + ‘scm_gc_malloc’ and friends, and to lose their mark function. + + If you decide to keep the mark function, note that it may be called + on objects that are on the free list. Please read and digest the + comments from the BDW GC’s ‘gc/gc_mark.h’ header. + + The MARK procedure must cause ‘scm_gc_mark’ to be called for every + ‘SCM’ value that is directly referenced by the smob instance OBJ. + One of these ‘SCM’ values can be returned from the procedure and + Guile will call ‘scm_gc_mark’ for it. This can be used to avoid + deep recursions for smob instances that form a list. + + It must not call any libguile function or macro except + ‘scm_gc_mark’, ‘SCM_SMOB_FLAGS’, ‘SCM_SMOB_DATA’, + ‘SCM_SMOB_DATA_2’, and ‘SCM_SMOB_DATA_3’. + + -- C Function: void scm_set_smob_print (scm_t_bits tc, int (*print) + (SCM obj, SCM port, scm_print_state* pstate)) + This function sets the smob printing procedure for the smob type + specified by the tag TC. TC is the tag returned by + ‘scm_make_smob_type’. + + The PRINT procedure should output a textual representation of the + smob instance OBJ to PORT, using information in PSTATE. + + The textual representation should be of the form ‘#’. + This ensures that ‘read’ will not interpret it as some other Scheme + value. + + It is often best to ignore PSTATE and just print to PORT with + ‘scm_display’, ‘scm_write’, ‘scm_simple_format’, and ‘scm_puts’. + + -- C Function: void scm_set_smob_equalp (scm_t_bits tc, SCM (*equalp) + (SCM obj1, SCM obj2)) + This function sets the smob equality-testing predicate for the smob + type specified by the tag TC. TC is the tag returned by + ‘scm_make_smob_type’. + + The EQUALP procedure should return ‘SCM_BOOL_T’ when OBJ1 is + ‘equal?’ to OBJ2. Else it should return ‘SCM_BOOL_F’. Both OBJ1 + and OBJ2 are instances of the smob type TC. + + -- C Function: void scm_assert_smob_type (scm_t_bits tag, SCM val) + When VAL is a smob of the type indicated by TAG, do nothing. Else, + signal an error. + + -- C Macro: int SCM_SMOB_PREDICATE (scm_t_bits tag, SCM exp) + Return true if EXP is a smob instance of the type indicated by TAG, + or false otherwise. The expression EXP can be evaluated more than + once, so it shouldn’t contain any side effects. + + -- C Function: SCM scm_new_smob (scm_t_bits tag, void *data) + -- C Function: SCM scm_new_double_smob (scm_t_bits tag, void *data, + void *data2, void *data3) + Make a new smob of the type with tag TAG and smob data DATA, DATA2, + and DATA3, as appropriate. + + The TAG is what has been returned by ‘scm_make_smob_type’. The + initial values DATA, DATA2, and DATA3 are of type ‘scm_t_bits’; + when you want to use them for ‘SCM’ values, these values need to be + converted to a ‘scm_t_bits’ first by using ‘SCM_UNPACK’. + + The flags of the smob instance start out as zero. + + -- C Macro: scm_t_bits SCM_SMOB_FLAGS (SCM obj) + Return the 16 extra bits of the smob OBJ. No meaning is predefined + for these bits, you can use them freely. + + -- C Macro: scm_t_bits SCM_SET_SMOB_FLAGS (SCM obj, scm_t_bits flags) + Set the 16 extra bits of the smob OBJ to FLAGS. No meaning is + predefined for these bits, you can use them freely. + + -- C Macro: scm_t_bits SCM_SMOB_DATA (SCM obj) + -- C Macro: scm_t_bits SCM_SMOB_DATA_2 (SCM obj) + -- C Macro: scm_t_bits SCM_SMOB_DATA_3 (SCM obj) + Return the first (second, third) immediate word of the smob OBJ as + a ‘scm_t_bits’ value. When the word contains a ‘SCM’ value, use + ‘SCM_SMOB_OBJECT’ (etc.) instead. + + -- C Macro: void SCM_SET_SMOB_DATA (SCM obj, scm_t_bits val) + -- C Macro: void SCM_SET_SMOB_DATA_2 (SCM obj, scm_t_bits val) + -- C Macro: void SCM_SET_SMOB_DATA_3 (SCM obj, scm_t_bits val) + Set the first (second, third) immediate word of the smob OBJ to + VAL. When the word should be set to a ‘SCM’ value, use + ‘SCM_SMOB_SET_OBJECT’ (etc.) instead. + + -- C Macro: SCM SCM_SMOB_OBJECT (SCM obj) + -- C Macro: SCM SCM_SMOB_OBJECT_2 (SCM obj) + -- C Macro: SCM SCM_SMOB_OBJECT_3 (SCM obj) + Return the first (second, third) immediate word of the smob OBJ as + a ‘SCM’ value. When the word contains a ‘scm_t_bits’ value, use + ‘SCM_SMOB_DATA’ (etc.) instead. + + -- C Macro: void SCM_SET_SMOB_OBJECT (SCM obj, SCM val) + -- C Macro: void SCM_SET_SMOB_OBJECT_2 (SCM obj, SCM val) + -- C Macro: void SCM_SET_SMOB_OBJECT_3 (SCM obj, SCM val) + Set the first (second, third) immediate word of the smob OBJ to + VAL. When the word should be set to a ‘scm_t_bits’ value, use + ‘SCM_SMOB_SET_DATA’ (etc.) instead. + + -- C Macro: SCM * SCM_SMOB_OBJECT_LOC (SCM obj) + -- C Macro: SCM * SCM_SMOB_OBJECT_2_LOC (SCM obj) + -- C Macro: SCM * SCM_SMOB_OBJECT_3_LOC (SCM obj) + Return a pointer to the first (second, third) immediate word of the + smob OBJ. Note that this is a pointer to ‘SCM’. If you need to + work with ‘scm_t_bits’ values, use ‘SCM_PACK’ and ‘SCM_UNPACK’, as + appropriate. + + -- Function: SCM scm_markcdr (SCM X) + Mark the references in the smob X, assuming that X’s first data + word contains an ordinary Scheme object, and X refers to no other + objects. This function simply returns X’s first data word. + + +File: guile.info, Node: Scheduling, Next: Options and Config, Prev: Smobs, Up: API Reference 6.22 Threads, Mutexes, Asyncs and Dynamic Roots =============================================== @@ -28516,13 +28519,13 @@ Futures::). -- macro: make-thread proc arg ... Apply PROC to ARG ... in a new thread formed by - ‘call-with-new-thread’ using a default error handler that display + ‘call-with-new-thread’ using a default error handler that displays the error to the current error port. The ARG ... expressions are evaluated in the new thread. -- macro: begin-thread expr1 expr2 ... Evaluate forms EXPR1 EXPR2 ... in a new thread formed by - ‘call-with-new-thread’ using a default error handler that display + ‘call-with-new-thread’ using a default error handler that displays the error to the current error port. One often wants to limit the number of threads running to be @@ -30743,31 +30746,22 @@ File: guile.info, Node: Source Properties, Next: Programmatic Error Handling, 6.26.2 Source Properties ------------------------ -As Guile reads in Scheme code from file or from standard input, it -remembers the file name, line number and column number where each -expression begins. These pieces of information are known as the “source -properties” of the expression. Syntax expanders and the compiler -propagate these source properties to compiled procedures, so that, if an -error occurs when evaluating the transformed expression, Guile’s -debugger can point back to the file and location where the expression -originated. +How best to associate source locations with datums parsed from a port? +The right way to do this is to annotate all components of each parsed +datum. *Note Annotated Scheme Read::, for more on ‘read-syntax’. - The way that source properties are stored means that Guile cannot -associate source properties with individual symbols, keywords, -characters, booleans, or small integers. This can be seen by typing -‘(xxx)’ and ‘xxx’ at the Guile prompt (where the variable ‘xxx’ has not -been defined): + Guile only switched to use ‘read-syntax’ in 2021, however. For the +previous thirty years, it used a mechanism known as “source properties”. - scheme@(guile-user)> (xxx) - :4:1: In procedure module-lookup: - :4:1: Unbound variable: xxx + As Guile reads in Scheme code from file or from standard input, it +can record the file name, line number and column number where each +expression begins in a side table. - scheme@(guile-user)> xxx - ERROR: In procedure module-lookup: - ERROR: Unbound variable: xxx - -In the latter case, no source properties were stored, so the error -doesn’t have any source information. + The way that this side table associates datums with source properties +has a limitation, however: Guile can only associate source properties +with freshly allocated objects. This notably excludes individual +symbols, keywords, characters, booleans, or small integers. This +limitation finally motivated the switch to ‘read-syntax’. -- Scheme Procedure: supports-source-properties? obj -- C Function: scm_supports_source_properties_p (obj) @@ -30776,7 +30770,8 @@ doesn’t have any source information. The recording of source properties is controlled by the read option named “positions” (*note Scheme Read::). This option is switched _on_ -by default. +by default. Now that ‘read-syntax’ is available, however, Guile may +change the default for this flag to off in the future. The following procedures can be used to access and set the source properties of read expressions. @@ -32835,24 +32830,27 @@ directory: The safe way is to create the file using ‘open’ with ‘O_EXCL’ to avoid any overwriting. A loop can try again with another name if - the file exists (error ‘EEXIST’). ‘mkstemp!’ below does that. + the file exists (error ‘EEXIST’). ‘mkstemp’ below does that. - -- Scheme Procedure: mkstemp! tmpl [mode] - -- C Function: scm_mkstemp (tmpl) + -- Scheme Procedure: mkstemp tmpl [mode] Create a new unique file in the file system and return a new buffered port open for reading and writing to the file. TMPL is a string specifying where the file should be created: it - must end with ‘XXXXXX’ and those ‘X’s will be changed in the string - to return the name of the file. (‘port-filename’ on the port also - gives the name.) + must end with ‘XXXXXX’. The name of the newly created file will be + the same as TMPL, but with those ‘X’s changed, and can be + determined by calling ‘port-filename’ on the returned port. - POSIX doesn’t specify the permissions mode of the file, on GNU and - most systems it’s ‘#o600’. An application can use ‘chmod’ to relax + Note that the newly created file is not deleted automatically by + Guile; probably the caller should arrange to call ‘delete-file’ + when the file is no longer needed. + + POSIX doesn’t specify the permissions mode of the file. On GNU and + most systems it’s ‘#o600’; an application can use ‘chmod’ to relax that if desired. For example ‘#o666’ less ‘umask’, which is usual for ordinary file creation, - (let ((port (mkstemp! (string-copy "/tmp/myfile-XXXXXX")))) + (let ((port (mkstemp "/tmp/myfile-XXXXXX"))) (chmod port (logand #o666 (lognot (umask)))) ...) @@ -32867,6 +32865,23 @@ directory: automatically deleted when the port is closed or the program terminates. + -- Scheme Procedure: mkdtemp tmpl + -- C Function: scm_mkdtemp (tmpl) + Create a new directory named in accordance with the template string + TMPL. + + TMPL is a string specifying the directory’s name. The last six + characters of TMPL must be ‘XXXXXX’. Upon successful execution, + the name of the new directory is returned which has the same form + as TMPL but with the ‘XXXXXX’ characters modified to ensure the + directory name is unique. + + The permissions of the directory created are OS dependent, but, are + usually ‘#o700’. + + An error may be thrown if the template has the wrong format or if + the directory cannot be created. + -- Scheme Procedure: dirname filename -- C Function: scm_dirname (filename) Return the directory name component of the file name FILENAME. If @@ -38801,6 +38816,10 @@ extensions module: (use-modules (srfi srfi-4 gnu)) + -- Scheme Procedure: srfi-4-vector-type-size obj + Return the size, in bytes, of each element of SRFI-4 vector OBJ. + For example, ‘(srfi-4-vector-type-size #u32())’ returns ‘4’. + -- Scheme Procedure: any->u8vector obj -- Scheme Procedure: any->s8vector obj -- Scheme Procedure: any->u16vector obj @@ -38830,6 +38849,49 @@ extensions module: a list, a vector, or a uniform vector. When OBJ is already a suitable uniform numeric vector, it is returned unchanged. + -- Scheme Procedure: u8vector-copy! dst at src [start [end]] + -- Scheme Procedure: s8vector-copy! dst at src [start [end]] + -- Scheme Procedure: u16vector-copy! dst at src [start [end]] + -- Scheme Procedure: s16vector-copy! dst at src [start [end]] + -- Scheme Procedure: u32vector-copy! dst at src [start [end]] + -- Scheme Procedure: s32vector-copy! dst at src [start [end]] + -- Scheme Procedure: u64vector-copy! dst at src [start [end]] + -- Scheme Procedure: s64vector-copy! dst at src [start [end]] + -- Scheme Procedure: f32vector-copy! dst at src [start [end]] + -- Scheme Procedure: f64vector-copy! dst at src [start [end]] + -- Scheme Procedure: c32vector-copy! dst at src [start [end]] + -- Scheme Procedure: c64vector-copy! dst at src [start [end]] + Copy a block of elements from SRC to DST, both of which must be + vectors of the indicated type, starting in DST at AT and starting + in SRC at START and ending at END. It is an error for DST to have + a length less than AT + (END - START). AT and START default to 0 + and END defaults to the length of SRC. + + If source and destination overlap, copying takes place as if the + source is first copied into a temporary vector and then into the + destination. + + See also *note ‘vector-copy!’: x-vector-copy!. + + -- Scheme Procedure: u8vector-copy src [start [end]] + -- Scheme Procedure: s8vector-copy src [start [end]] + -- Scheme Procedure: u16vector-copy src [start [end]] + -- Scheme Procedure: s16vector-copy src [start [end]] + -- Scheme Procedure: u32vector-copy src [start [end]] + -- Scheme Procedure: s32vector-copy src [start [end]] + -- Scheme Procedure: u64vector-copy src [start [end]] + -- Scheme Procedure: s64vector-copy src [start [end]] + -- Scheme Procedure: f32vector-copy src [start [end]] + -- Scheme Procedure: f64vector-copy src [start [end]] + -- Scheme Procedure: c32vector-copy src [start [end]] + -- Scheme Procedure: c64vector-copy src [start [end]] + Returns a freshly allocated vector of the indicated type, which + must be the same as that of SRC, containing the elements of SRC + between START and END. START defaults to 0 and END defaults to the + length of SRC. + + See also *note ‘vector-copy’: x-vector-copy. +  File: guile.info, Node: SRFI-6, Next: SRFI-8, Prev: SRFI-4, Up: SRFI Support @@ -41709,7 +41771,7 @@ File: guile.info, Node: SRFI-69 Creating hash tables, Next: SRFI-69 Accessing procedure, and should answer whether two keys are the same for this table’s purposes. - My default HASH-PROC assumes that ‘equal-proc’ is no coarser than + By default HASH-PROC assumes that ‘equal-proc’ is no coarser than ‘equal?’ unless it is literally ‘string-ci=?’. If provided, HASH-PROC should be a two-argument procedure that takes a key and the current table size, and answers a reasonably good hash integer @@ -42023,7 +42085,7 @@ intermediate lists. Transducers are oblivious to what kind of process they are used in, and are composable without building intermediate collections. This -means we can create a transducer that squares all even numbers: +means we can create a transducer that squares all odd numbers: (compose (tfilter odd?) (tmap (lambda (x) (* x x)))) @@ -42092,7 +42154,7 @@ a reducing function that behaves as follows: A simple example is as following: - (list-transduce (tfilter odd?)+ '(1 2 3 4 5)). + (list-transduce (tfilter odd?) + '(1 2 3 4 5)). This first returns a transducer filtering all odd elements, then it runs ‘+’ without arguments to retrieve its identity. It then starts the @@ -42165,7 +42227,7 @@ File: guile.info, Node: SRFI-171 Applying Transducers, Next: SRFI-171 Reducers -- Scheme Procedure: port-transduce xform f reader port -- Scheme Procedure: port-transduce xform f identity reader port - Same as ‘list-reduce’ but for ports. Called without a port, it + Same as ‘list-transduce’ but for ports. Called without a port, it reduces over the results of applying READER until the EOF-object is returned, presumably to read from ‘current-input-port’. With a port READER is applied to PORT instead of without any arguments. @@ -42231,7 +42293,7 @@ File: guile.info, Node: SRFI-171 Transducers, Next: SRFI-171 Helpers, Prev: S -- Scheme Procedure: tmap proc Returns a transducer that applies PROC to all values. Stateless. - -- tfilter: pred? + -- Scheme Procedure: tfilter pred? Returns a transducer that removes values for which PRED? returns #f. @@ -42273,8 +42335,8 @@ File: guile.info, Node: SRFI-171 Transducers, Next: SRFI-171 Helpers, Prev: S Stateful. -- Scheme Procedure: tdrop-while pred? - Returns a transducer that discards the the first values for which - PRED? returns true. + Returns a transducer that discards the first values for which PRED? + returns true. Stateful. @@ -42321,7 +42383,7 @@ File: guile.info, Node: SRFI-171 Transducers, Next: SRFI-171 Helpers, Prev: S Stateful. -- Scheme Procedure: tsegment n - Returns a transducer that groups N inputs in lists of N elements. + Returns a transducer that groups inputs into lists of N elements. When the transduction stops, it flushes any remaining collection, even if it contains fewer than N elements. @@ -42433,12 +42495,12 @@ usable when you want to write your own transducers. The bytevector-u8 version of list-reduce. -- Scheme Procedure: port-reduce f identity reader port - The port version of list-reducer. It reduces over port using - reader until reader returns the EOF object. + The port version of list-reduce. It reduces over port using reader + until reader returns the EOF object. -- Scheme Procedure: generator-reduce f identity gen - The port version of list-reduce. It reduces over ‘gen’ until it - returns the EOF object + The generator version of list-reduce. It reduces over ‘gen’ until + it returns the EOF object  File: guile.info, Node: R6RS Support, Next: R7RS Support, Prev: SRFI Support, Up: Guile Modules @@ -43953,6 +44015,7 @@ port interface. -- Scheme Procedure: port? obj -- Scheme Procedure: input-port? obj -- Scheme Procedure: output-port? obj + -- Scheme Procedure: call-with-port port proc *Note Ports::, for documentation. -- Scheme Procedure: port-transcoder port @@ -44005,10 +44068,6 @@ port interface. -- Scheme Procedure: port-has-set-port-position!? port Return ‘#t’ is PORT supports ‘set-port-position!’. - -- Scheme Procedure: call-with-port port proc - Call PROC, passing it PORT and closing PORT upon exit of PROC. - Return the return values of PROC. - -- Scheme Procedure: port-eof? input-port Equivalent to ‘(eof-object? (lookahead-u8 INPUT-PORT))’. @@ -47851,8 +47910,8 @@ fragment: (parrot (@ (type "African Grey")) (name "Alfie")) SXML is very general, and is capable of representing all of XML. -Formally, this means that SXML is a conforming implementation of the -http://www.w3.org/TR/xml-infoset/ (XML Information Set) standard. +Formally, this means that SXML is a conforming implementation of the XML +Information Set (http://www.w3.org/TR/xml-infoset/) standard. Guile includes several facilities for working with XML and SXML: parsers, serializers, and transformers. @@ -53612,10 +53671,12 @@ operands can be encoded. ‘l24’ An offset from the current ‘ip’, in 32-bit units, as a signed 24-bit value. Indicates a bytecode address, for a relative jump. +‘zi16’ ‘i16’ ‘i32’ An immediate Scheme value (*note Immediate Objects::), encoded - directly in 16 or 32 bits. + directly in 16 or 32 bits. ‘zi16’ is sign-extended; the others are + zero-extended. ‘a32’ ‘b32’ An immediate Scheme value, encoded as a pair of 32-bit words. @@ -53641,6 +53702,12 @@ operands can be encoded. an ‘lo32’ address to be specified as a label and then some number of words offset from that label, for example when patching a field of a statically allocated object. +‘v32:x8-l24’ + Almost all VM instructions have a fixed size. The ‘jtable’ + instruction used to perform optimized ‘case’ branches is an + exception, which uses a ‘v32’ trailing word to indicate the number + of additional words in the instruction, which themselves are + encoded as ‘x8-l24’ values. ‘b1’ A boolean value: 1 for true, otherwise 0. ‘xN’ @@ -54294,6 +54361,9 @@ two kinds. The first set of instructions loads immediate values. These instructions encode the immediate directly into the instruction stream. + -- Instruction: make-immediate s8:DST zi16:LOW-BITS + Make an immediate whose low bits are LOW-BITS, sign-extended. + -- Instruction: make-short-immediate s8:DST i16:LOW-BITS Make an immediate whose low bits are LOW-BITS, and whose top bits are 0. @@ -54624,6 +54694,10 @@ File: guile.info, Node: Comparison Instructions, Next: Branch Instructions, P Set the comparison result to EQUAL if the SCM values A and B are ‘eq?’, or ‘NONE’ otherwise. + -- Instruction: eq-immediate? s8:A zi16:B + Set the comparison result to EQUAL if the SCM value A is equal to + the immediate SCM value B (sign-extended), or ‘NONE’ otherwise. + There are a set of macro-instructions for ‘immediate-tag=?’ and ‘heap-tag=?’ as well that abstract away the precise type tag values. *Note The SCM Type in Guile::. @@ -54728,6 +54802,15 @@ for relative jumps. sets ‘INVALID’ instead of ‘NONE’ if either value is a NaN. For exact numbers, ‘jnge’ is the same as ‘jl’. + -- Instruction: jtable s24:IDX v32:LENGTH [x8:_ l24:OFFSET]... + Branch to an entry in a table, as in C’s ‘switch’ statement. IDX + is a ‘u64’ local indicating which entry to branch to. The + immediate LEN indicates the number of entries in the table, and + should be greater than or equal to 1. The last entry in the table + is the "catch-all" entry. The OFFSET... values are signed 24-bit + immediates (‘l24’ encoding), indicating a memory address as a + number of 32-bit words away from the current instruction pointer. +  File: guile.info, Node: Raw Memory Access Instructions, Prev: Branch Instructions, Up: Instruction Set @@ -55626,7 +55709,8 @@ lowering ‘$call’ to ‘$callk’. To summarize: a ‘$continue’ is a CPS term that continues to a single label. But there are other kinds of CPS terms that can continue to a -different number of labels: ‘$branch’, ‘$throw’, and ‘$prompt’. +different number of labels: ‘$branch’, ‘$switch’, ‘$throw’, and +‘$prompt’. -- CPS Term: $branch kf kt src op param args Evaluate the branching primcall OP, with arguments ARGS and @@ -55644,6 +55728,18 @@ different number of labels: ‘$branch’, ‘$throw’, and ‘$prompt’. ‘true?’ op referencing that variable. The optimizer should inline the branch if possible. + -- CPS Term: $switch kf kt* src arg + Continue to a label in the list K* according to the index argument + ARG, or to the default continuation KF if ARG is greater than or + equal to the length K*. The index variable ARG is an unboxed, + unsigned 64-bit value. + + The ‘$switch’ term is like C’s ‘switch’ statement. The compiler to + CPS can generate a ‘$switch’ term directly, if the source language + has such a concept, or it can rely on the CPS optimizer to turn + appropriate chains of ‘$branch’ statements to ‘$switch’ instances, + which is what the Scheme compiler does. + -- CPS Term: $throw src op param args Throw a non-resumable exception. Throw terms do not continue at all. The usual value of OP is ‘throw’, with two arguments KEY and @@ -55766,6 +55862,7 @@ value; see the specifications below for full details. -- Scheme Syntax: build-exp ($prompt escape? tag handler) -- Scheme Syntax: build-term ($branch kf kt src op param (arg ...)) -- Scheme Syntax: build-term ($branch kf kt src op param args) + -- Scheme Syntax: build-term ($switch kf kt* src arg) -- Scheme Syntax: build-term ($throw src op param (arg ...)) -- Scheme Syntax: build-term ($throw src op param args) -- Scheme Syntax: build-term ($prompt k kh src escape? tag) @@ -56679,7 +56776,7 @@ features, to make it easier to locate the desired sections. * /etc/hosts: Network Databases. (line 159) * /etc/protocols: Network Databases. (line 283) * /etc/services: Network Databases. (line 330) -* absolute file name: File System. (line 367) +* absolute file name: File System. (line 387) * addrinfo object type: Network Databases. (line 13) * affinity, CPU: Processes. (line 342) * alist: Association Lists. (line 6) @@ -56728,7 +56825,8 @@ features, to make it easier to locate the desired sections. (line 6) * byte order mark: BOM Handling. (line 6) * bytevector: Bytevectors. (line 6) -* callbacks: Dynamic FFI. (line 109) +* callbacks: More Foreign Functions. + (line 65) * canonical host type: Build Config. (line 91) * case: Conditionals. (line 6) * case folding: Characters. (line 133) @@ -56821,6 +56919,7 @@ features, to make it easier to locate the desired sections. * directory traversal: File Tree Walk. (line 6) * distribution, of Guile projects: Distributing Guile Code. (line 6) +* dlopening: Foreign Libraries. (line 27) * domain-specific language: Macros. (line 20) * dominate, CPS: CPS in Guile. (line 78) * DSL: Macros. (line 20) @@ -56830,6 +56929,7 @@ features, to make it easier to locate the desired sections. (line 107) * duplicate binding handlers: Creating Guile Modules. (line 107) +* dynamic linking: Foreign Libraries. (line 27) * EDSL: Macros. (line 20) * effective version: Parallel Installations. (line 6) @@ -56873,8 +56973,6 @@ features, to make it easier to locate the desired sections. * extensible record types: Records. (line 44) * extensiondir: Parallel Installations. (line 42) -* extensiondir <1>: Modules and Extensions. - (line 17) * fdes finalizers: Ports and File Descriptors. (line 381) * ffi: Foreign Function Interface. @@ -56885,7 +56983,7 @@ features, to make it easier to locate the desired sections. (line 381) * file locking: Ports and File Descriptors. (line 317) -* file name separator: File System. (line 367) +* file name separator: File System. (line 387) * File port: File Ports. (line 6) * file system: File System. (line 6) * file system combinator: File Tree Walk. (line 69) @@ -56908,6 +57006,7 @@ features, to make it easier to locate the desired sections. * fold-case: Case Sensitivity. (line 6) * foreign function interface: Foreign Function Interface. (line 6) +* foreign libraries: Foreign Libraries. (line 10) * foreign object: Foreign Objects. (line 6) * formatted output: Formatted Output. (line 6) * frame rank: Arrays as arrays of arrays. @@ -56995,6 +57094,8 @@ features, to make it easier to locate the desired sections. * libdir: Build Config. (line 68) * libexecdir: Build Config. (line 68) * libguileinterface: Build Config. (line 74) +* libraries, foreign: Foreign Libraries. (line 10) +* libraries, shared: Foreign Libraries. (line 17) * LIBS: Build Config. (line 72) * license: Guile License. (line 6) * Line buffered input: Buffered Input. (line 31) @@ -57076,7 +57177,7 @@ features, to make it easier to locate the desired sections. * no-fold-case: Case Sensitivity. (line 6) * non-local exit: Prompts. (line 6) * numerical-overflow: Handling Errors. (line 61) -* optimizations, compiler: Compilation. (line 81) +* optimizations, compiler: Compilation. (line 79) * options (command line): Command-line Options. (line 6) * options - debug: Debug Options. (line 9) @@ -57229,6 +57330,7 @@ features, to make it easier to locate the desired sections. * Setting breakpoints: High-Level Traps. (line 50) * Setting tracepoints: High-Level Traps. (line 55) * shadowing an imported variable binding: Chaining. (line 6) +* shared libraries: Foreign Libraries. (line 17) * sharedstatedir: Build Config. (line 68) * shell: Environment Variables. (line 6) @@ -57258,7 +57360,7 @@ features, to make it easier to locate the desired sections. * sorting vectors: Sorting. (line 6) * source file encoding: Character Encoding of Source Files. (line 6) -* source properties: Source Properties. (line 6) +* source properties: Source Properties. (line 10) * specialize parameter: SRFI-26. (line 6) * splicing: begin. (line 23) * srcdir: Build Config. (line 68) @@ -57350,8 +57452,9 @@ features, to make it easier to locate the desired sections. * tail calls: Tail Calls. (line 6) * template jit: Just-In-Time Native Code. (line 6) +* temporary directory: File System. (line 344) * temporary file: File System. (line 296) -* temporary file <1>: File System. (line 311) +* temporary file <1>: File System. (line 310) * term, CPS: CPS in Guile. (line 11) * terminal: Terminals and Ptys. (line 8) * terminal <1>: Terminals and Ptys. (line 13) @@ -57416,7 +57519,7 @@ features, to make it easier to locate the desired sections. * word order: Bytevector Endianness. (line 6) * wrapped pointer types: Void Pointers and Byte Access. - (line 59) + (line 63) * wrong-number-of-args: Handling Errors. (line 68) * wrong-type-arg: Handling Errors. (line 66) * WWW: Web. (line 6) @@ -57600,7 +57703,7 @@ the Scheme names by a simple transformation described in the section * abort-to-prompt: Prompt Primitives. (line 34) * abs: Arithmetic. (line 41) * abs <1>: rnrs base. (line 243) -* absolute-file-name?: File System. (line 385) +* absolute-file-name?: File System. (line 405) * accept: Network Sockets and Communication. (line 194) * access?: File System. (line 12) @@ -57645,7 +57748,7 @@ the Scheme names by a simple transformation described in the section * addrinfo:protocol: Network Databases. (line 145) * addrinfo:socktype: Network Databases. (line 142) * alarm: Signals. (line 120) -* alignof: Foreign Structs. (line 21) +* alignof: Foreign Structs. (line 23) * alist->hash-table: Hash Table Reference. (line 66) * alist->hash-table <1>: SRFI-69 Creating hash tables. @@ -57682,18 +57785,18 @@ the Scheme names by a simple transformation described in the section * angle: Complex. (line 28) * angle <1>: rnrs base. (line 140) * any: SRFI-1 Searching. (line 46) -* any->c32vector: SRFI-4 Extensions. (line 22) -* any->c64vector: SRFI-4 Extensions. (line 23) -* any->f32vector: SRFI-4 Extensions. (line 20) -* any->f64vector: SRFI-4 Extensions. (line 21) -* any->s16vector: SRFI-4 Extensions. (line 15) -* any->s32vector: SRFI-4 Extensions. (line 17) -* any->s64vector: SRFI-4 Extensions. (line 19) -* any->s8vector: SRFI-4 Extensions. (line 13) -* any->u16vector: SRFI-4 Extensions. (line 14) -* any->u32vector: SRFI-4 Extensions. (line 16) -* any->u64vector: SRFI-4 Extensions. (line 18) -* any->u8vector: SRFI-4 Extensions. (line 12) +* any->c32vector: SRFI-4 Extensions. (line 26) +* any->c64vector: SRFI-4 Extensions. (line 27) +* any->f32vector: SRFI-4 Extensions. (line 24) +* any->f64vector: SRFI-4 Extensions. (line 25) +* any->s16vector: SRFI-4 Extensions. (line 19) +* any->s32vector: SRFI-4 Extensions. (line 21) +* any->s64vector: SRFI-4 Extensions. (line 23) +* any->s8vector: SRFI-4 Extensions. (line 17) +* any->u16vector: SRFI-4 Extensions. (line 18) +* any->u32vector: SRFI-4 Extensions. (line 20) +* any->u64vector: SRFI-4 Extensions. (line 22) +* any->u8vector: SRFI-4 Extensions. (line 16) * any-bits-set?: SRFI-60. (line 24) * append: Append/Reverse. (line 13) * append <1>: Append/Reverse. (line 14) @@ -57755,7 +57858,7 @@ the Scheme names by a simple transformation described in the section * array-type: Array Procedures. (line 85) * array?: Array Procedures. (line 21) * array? <1>: Comparison Instructions. - (line 121) + (line 125) * ash: Bitwise Operations. (line 67) * asin: Scientific. (line 31) * asin <1>: rnrs base. (line 150) @@ -57813,7 +57916,7 @@ the Scheme names by a simple transformation described in the section * atomic-box-swap!: Atomics. (line 48) * atomic-box?: Atomics. (line 39) * atomic-box? <1>: Comparison Instructions. - (line 114) + (line 118) * atomic-scm-compare-and-swap!/immediate: Atomic Memory Access Instructions. (line 24) * atomic-scm-ref/immediate: Atomic Memory Access Instructions. @@ -57830,13 +57933,13 @@ the Scheme names by a simple transformation described in the section * backtrace: Debug Commands. (line 9) * backtrace <1>: Pre-Unwind Debugging. (line 28) -* basename: File System. (line 344) +* basename: File System. (line 364) * begin: begin. (line 16) * begin <1>: rnrs base. (line 106) * begin-thread: Threads. (line 100) * bignum?: Comparison Instructions. - (line 125) -* binary-port?: rnrs io ports. (line 37) + (line 129) +* binary-port?: rnrs io ports. (line 38) * bind: Network Sockets and Communication. (line 166) * bind <1>: Network Sockets and Communication. @@ -57875,18 +57978,19 @@ the Scheme names by a simple transformation described in the section * bitvector-bit-set?: Bit Vectors. (line 28) * bitvector-clear-all-bits!: Bit Vectors. (line 39) * bitvector-clear-bit!: Bit Vectors. (line 34) -* bitvector-clear-bits!: Bit Vectors. (line 85) -* bitvector-count: Bit Vectors. (line 52) -* bitvector-count-bits: Bit Vectors. (line 57) +* bitvector-clear-bits!: Bit Vectors. (line 91) +* bitvector-copy: Bit Vectors. (line 52) +* bitvector-count: Bit Vectors. (line 58) +* bitvector-count-bits: Bit Vectors. (line 63) * bitvector-flip-all-bits!: Bit Vectors. (line 40) * bitvector-length: Bit Vectors. (line 25) -* bitvector-position: Bit Vectors. (line 66) +* bitvector-position: Bit Vectors. (line 72) * bitvector-set-all-bits!: Bit Vectors. (line 38) * bitvector-set-bit!: Bit Vectors. (line 33) -* bitvector-set-bits!: Bit Vectors. (line 75) +* bitvector-set-bits!: Bit Vectors. (line 81) * bitvector?: Bit Vectors. (line 15) * bitvector? <1>: Comparison Instructions. - (line 122) + (line 126) * bitwise-and: SRFI-60. (line 20) * bitwise-and <1>: rnrs arithmetic bitwise. (line 15) @@ -57944,13 +58048,13 @@ the Scheme names by a simple transformation described in the section (line 219) * buffer-mode: R6RS File Ports. (line 9) * buffer-mode?: R6RS File Ports. (line 19) -* build-cont: Building CPS. (line 44) -* build-cont <1>: Building CPS. (line 45) -* build-cont <2>: Building CPS. (line 46) -* build-cont <3>: Building CPS. (line 47) -* build-cont <4>: Building CPS. (line 48) -* build-cont <5>: Building CPS. (line 49) -* build-cont <6>: Building CPS. (line 50) +* build-cont: Building CPS. (line 45) +* build-cont <1>: Building CPS. (line 46) +* build-cont <2>: Building CPS. (line 47) +* build-cont <3>: Building CPS. (line 48) +* build-cont <4>: Building CPS. (line 49) +* build-cont <5>: Building CPS. (line 50) +* build-cont <6>: Building CPS. (line 51) * build-exp: Building CPS. (line 23) * build-exp <1>: Building CPS. (line 24) * build-exp <2>: Building CPS. (line 25) @@ -57977,12 +58081,13 @@ the Scheme names by a simple transformation described in the section * build-term <4>: Building CPS. (line 41) * build-term <5>: Building CPS. (line 42) * build-term <6>: Building CPS. (line 43) +* build-term <7>: Building CPS. (line 44) * build-uri: URIs. (line 32) * build-uri-reference: URIs. (line 133) * builtin-ref: Trampoline Instructions. (line 29) * bytevector->pointer: Void Pointers and Byte Access. - (line 30) + (line 34) * bytevector->sint-list: Bytevectors and Integer Lists. (line 28) * bytevector->string: Representing Strings as Bytes. @@ -57993,9 +58098,9 @@ the Scheme names by a simple transformation described in the section * bytevector->uint-list: Bytevectors and Integer Lists. (line 23) * bytevector-copy: Bytevector Manipulation. - (line 47) + (line 51) * bytevector-copy!: Bytevector Manipulation. - (line 38) + (line 39) * bytevector-fill!: Bytevector Manipulation. (line 34) * bytevector-ieee-double-native-ref: Bytevectors as Floats. @@ -58090,15 +58195,19 @@ the Scheme names by a simple transformation described in the section * bytevector?: Bytevector Manipulation. (line 15) * bytevector? <1>: Comparison Instructions. - (line 118) + (line 122) * c32vector: SRFI-4 API. (line 75) * c32vector->list: SRFI-4 API. (line 183) +* c32vector-copy: SRFI-4 Extensions. (line 79) +* c32vector-copy!: SRFI-4 Extensions. (line 55) * c32vector-length: SRFI-4 API. (line 103) * c32vector-ref: SRFI-4 API. (line 129) * c32vector-set!: SRFI-4 API. (line 156) * c32vector?: SRFI-4 API. (line 19) * c64vector: SRFI-4 API. (line 76) * c64vector->list: SRFI-4 API. (line 184) +* c64vector-copy: SRFI-4 Extensions. (line 80) +* c64vector-copy!: SRFI-4 Extensions. (line 56) * c64vector-length: SRFI-4 API. (line 104) * c64vector-ref: SRFI-4 API. (line 130) * c64vector-set!: SRFI-4 API. (line 157) @@ -58131,7 +58240,7 @@ the Scheme names by a simple transformation described in the section * caddr <1>: rnrs base. (line 46) * cadr: Pairs. (line 87) * cadr <1>: rnrs base. (line 39) -* call: Instruction Set. (line 69) +* call: Instruction Set. (line 77) * call <1>: Call and Return Instructions. (line 27) * call-f64<-scm: Intrinsic Call Instructions. @@ -58181,16 +58290,19 @@ the Scheme names by a simple transformation described in the section (line 16) * call-with-escape-continuation: Prompt Primitives. (line 111) * call-with-file-and-dir: texinfo. (line 43) +* call-with-input-bytevector: Bytevector Ports. (line 36) * call-with-input-file: File Ports. (line 112) * call-with-input-file <1>: rnrs io simple. (line 29) * call-with-input-string: String Ports. (line 13) * call-with-new-thread: Threads. (line 28) +* call-with-output-bytevector: Bytevector Ports. (line 30) * call-with-output-encoded-string: Representing Strings as Bytes. (line 62) * call-with-output-file: File Ports. (line 114) * call-with-output-file <1>: rnrs io simple. (line 30) * call-with-output-string: String Ports. (line 6) -* call-with-port: rnrs io ports. (line 83) +* call-with-port: Ports. (line 86) +* call-with-port <1>: rnrs io ports. (line 31) * call-with-prompt: Prompt Primitives. (line 9) * call-with-stack-overflow-handler: Stack Overflow. (line 105) * call-with-time-and-allocation-limits: Sandboxed Evaluation. @@ -58205,7 +58317,7 @@ the Scheme names by a simple transformation described in the section * call/cc <1>: rnrs base. (line 351) * call/ec: Prompt Primitives. (line 112) * cancel-thread: Threads. (line 82) -* canonicalize-path: File System. (line 353) +* canonicalize-path: File System. (line 373) * capture-continuation: Non-Local Control Flow Instructions. (line 6) * car: Pairs. (line 70) @@ -58400,7 +58512,7 @@ the Scheme names by a simple transformation described in the section * char?: Characters. (line 106) * char? <1>: rnrs base. (line 20) * char? <2>: Comparison Instructions. - (line 82) + (line 86) * chdir: Processes. (line 6) * chmod: File System. (line 143) * chown: File System. (line 130) @@ -58446,15 +58558,15 @@ the Scheme names by a simple transformation described in the section * command-line: Runtime Environment. (line 7) * command-line <1>: rnrs programs. (line 9) * compile: Compile Commands. (line 6) -* compile <1>: Compilation. (line 121) +* compile <1>: Compilation. (line 119) * compile-file: Compile Commands. (line 9) -* compile-file <1>: Compilation. (line 132) +* compile-file <1>: Compilation. (line 130) * compile-peg-pattern: PEG API Reference. (line 90) -* compiled-file-name: Compilation. (line 160) +* compiled-file-name: Compilation. (line 158) * complex?: Complex Numbers. (line 36) * complex? <1>: rnrs base. (line 132) * compnum?: Comparison Instructions. - (line 127) + (line 131) * compose: Higher-Order Functions. (line 31) * compose-continuation: Non-Local Control Flow Instructions. @@ -58507,7 +58619,7 @@ the Scheme names by a simple transformation described in the section * cons*: List Constructors. (line 25) * cons* <1>: rnrs lists. (line 64) * cons* <2>: rnrs lists. (line 65) -* cons-source: Source Properties. (line 86) +* cons-source: Source Properties. (line 78) * const: Higher-Order Functions. (line 11) * context-flatten: PEG API Reference. (line 243) @@ -58519,7 +58631,7 @@ the Scheme names by a simple transformation described in the section * copy-file: File System. (line 176) * copy-random-state: Random. (line 14) * copy-time: SRFI-19 Time. (line 59) -* copy-tree: Copying. (line 12) +* copy-tree: Copying. (line 15) * cos: Scientific. (line 25) * cos <1>: rnrs base. (line 148) * cosh: Scientific. (line 54) @@ -58533,13 +58645,13 @@ the Scheme names by a simple transformation described in the section * current-dynamic-state: Fluids and Dynamic States. (line 151) * current-error-port: Default Ports. (line 38) -* current-error-port <1>: rnrs io ports. (line 100) +* current-error-port <1>: rnrs io ports. (line 97) * current-exception-handler: SRFI-18 Exceptions. (line 14) -* current-filename: Source Properties. (line 77) +* current-filename: Source Properties. (line 69) * current-http-proxy: Web Client. (line 132) * current-https-proxy: Web Client. (line 133) * current-input-port: Default Ports. (line 6) -* current-input-port <1>: rnrs io ports. (line 98) +* current-input-port <1>: rnrs io ports. (line 95) * current-julian-day: SRFI-19 Date. (line 74) * current-load-port: Loading. (line 78) * current-modified-julian-day: SRFI-19 Date. (line 77) @@ -58548,10 +58660,10 @@ the Scheme names by a simple transformation described in the section * current-module <1>: Intrinsic Call Instructions. (line 210) * current-output-port: Default Ports. (line 23) -* current-output-port <1>: rnrs io ports. (line 99) +* current-output-port <1>: rnrs io ports. (line 96) * current-processor-count: Threads. (line 122) * current-read-waiter: Non-Blocking I/O. (line 109) -* current-source-location: Source Properties. (line 73) +* current-source-location: Source Properties. (line 65) * current-ssax-error-port: SSAX. (line 151) * current-thread: Threads. (line 24) * current-thread <1>: SRFI-18 Threads. (line 16) @@ -58603,11 +58715,11 @@ the Scheme names by a simple transformation described in the section (line 36) * default-duplicate-binding-handler: Creating Guile Modules. (line 159) -* default-optimization-level: Compilation. (line 151) +* default-optimization-level: Compilation. (line 149) * default-prompt-tag: Prompt Primitives. (line 27) * default-random-source: SRFI-27 Default Random Source. (line 15) -* default-warning-level: Compilation. (line 154) +* default-warning-level: Compilation. (line 152) * define: Top Level. (line 32) * define <1>: rnrs base. (line 77) * define <2>: Curried Definitions. (line 24) @@ -58660,7 +58772,7 @@ the Scheme names by a simple transformation described in the section * define-values: Binding Multiple Values. (line 6) * define-wrapped-pointer-type: Void Pointers and Byte Access. - (line 64) + (line 68) * defined?: Binding Reflection. (line 9) * defmacro: Defmacros. (line 14) * defmacro*: ice-9 optargs. (line 83) @@ -58688,10 +58800,10 @@ the Scheme names by a simple transformation described in the section * denominator <1>: rnrs base. (line 158) * deq!: Queues. (line 31) * dereference-pointer: Void Pointers and Byte Access. - (line 38) + (line 42) * describe: Help Commands. (line 35) * directory-stream?: File System. (line 244) -* dirname: File System. (line 339) +* dirname: File System. (line 359) * disable-trap!: Trap States. (line 43) * disable-value-history!: Value History. (line 48) * disassemble: Compile Commands. (line 18) @@ -58736,16 +58848,10 @@ the Scheme names by a simple transformation described in the section (line 245) * duplicate-port: Ports and File Descriptors. (line 218) -* dynamic-call: Foreign Functions. (line 24) -* dynamic-func: Foreign Functions. (line 10) -* dynamic-link: Foreign Libraries. (line 37) -* dynamic-object?: Foreign Libraries. (line 67) -* dynamic-pointer: Foreign Variables. (line 9) * dynamic-state?: Fluids and Dynamic States. (line 142) * dynamic-state? <1>: Comparison Instructions. - (line 111) -* dynamic-unlink: Foreign Libraries. (line 71) + (line 115) * dynamic-wind: Dynamic Wind. (line 69) * dynamic-wind <1>: rnrs base. (line 358) * eager: SRFI-45. (line 56) @@ -58808,16 +58914,18 @@ the Scheme names by a simple transformation described in the section * eof-object? <1>: rnrs io ports. (line 19) * eof-object? <2>: rnrs io simple. (line 20) * eof-object? <3>: Comparison Instructions. - (line 89) + (line 93) * eol-style: R6RS Transcoders. (line 41) * eq-false?: Comparison Instructions. - (line 83) + (line 87) +* eq-immediate?: Comparison Instructions. + (line 76) * eq-nil?: Comparison Instructions. - (line 84) + (line 88) * eq-null?: Comparison Instructions. - (line 85) + (line 89) * eq-true?: Comparison Instructions. - (line 86) + (line 90) * eq?: Equality. (line 32) * eq? <1>: rnrs base. (line 124) * eq? <2>: Comparison Instructions. @@ -58899,6 +59007,8 @@ the Scheme names by a simple transformation described in the section (line 40) * f32vector: SRFI-4 API. (line 73) * f32vector->list: SRFI-4 API. (line 181) +* f32vector-copy: SRFI-4 Extensions. (line 77) +* f32vector-copy!: SRFI-4 Extensions. (line 53) * f32vector-length: SRFI-4 API. (line 101) * f32vector-ref: SRFI-4 API. (line 127) * f32vector-set!: SRFI-4 API. (line 154) @@ -58913,6 +59023,8 @@ the Scheme names by a simple transformation described in the section (line 38) * f64vector: SRFI-4 API. (line 74) * f64vector->list: SRFI-4 API. (line 182) +* f64vector-copy: SRFI-4 Extensions. (line 78) +* f64vector-copy!: SRFI-4 Extensions. (line 54) * f64vector-length: SRFI-4 API. (line 102) * f64vector-ref: SRFI-4 API. (line 128) * f64vector-set!: SRFI-4 API. (line 155) @@ -58921,7 +59033,7 @@ the Scheme names by a simple transformation described in the section (line 6) * false-if-exception: Error Reporting. (line 38) * false?: Comparison Instructions. - (line 91) + (line 95) * fchmod: File System. (line 143) * fchown: File System. (line 130) * fcntl: Ports and File Descriptors. @@ -58942,8 +59054,8 @@ the Scheme names by a simple transformation described in the section * fifth: SRFI-1 Selectors. (line 10) * file-encoding: Character Encoding of Source Files. (line 64) -* file-exists?: File System. (line 364) -* file-name-separator?: File System. (line 381) +* file-exists?: File System. (line 384) +* file-name-separator?: File System. (line 401) * file-options: R6RS File Ports. (line 31) * file-port?: File Ports. (line 174) * file-system-fold: File Tree Walk. (line 75) @@ -58977,7 +59089,7 @@ the Scheme names by a simple transformation described in the section * fixnum?: rnrs arithmetic fixnums. (line 20) * fixnum? <1>: Comparison Instructions. - (line 80) + (line 84) * fl*: rnrs arithmetic flonums. (line 53) * fl+: rnrs arithmetic flonums. @@ -59063,7 +59175,7 @@ the Scheme names by a simple transformation described in the section * flonum?: rnrs arithmetic flonums. (line 14) * flonum? <1>: Comparison Instructions. - (line 126) + (line 130) * floor: Arithmetic. (line 65) * floor <1>: rnrs base. (line 245) * floor-quotient: Arithmetic. (line 105) @@ -59101,9 +59213,9 @@ the Scheme names by a simple transformation described in the section * fluid?: Fluids and Dynamic States. (line 60) * fluid? <1>: Comparison Instructions. - (line 109) + (line 113) * flush-all-ports: Buffering. (line 93) -* flush-output-port: rnrs io ports. (line 176) +* flush-output-port: rnrs io ports. (line 173) * flzero?: rnrs arithmetic flonums. (line 32) * fmul: Floating-Point Arithmetic Instructions. @@ -59130,12 +59242,15 @@ the Scheme names by a simple transformation described in the section * force-output: Buffering. (line 85) * foreign-call: Trampoline Instructions. (line 23) +* foreign-library-function: Foreign Functions. (line 37) +* foreign-library-pointer: Foreign Pointers. (line 11) +* foreign-library?: Foreign Libraries. (line 165) * formal-name->char: Characters. (line 258) * format: SRFI-28. (line 12) * format <1>: Formatted Output. (line 26) * fourth: SRFI-1 Selectors. (line 9) * fracnum?: Comparison Instructions. - (line 128) + (line 132) * frame: Debug Commands. (line 27) * frame-address: Frames. (line 24) * frame-arguments: Frames. (line 20) @@ -59150,7 +59265,7 @@ the Scheme names by a simple transformation described in the section * frame-stack-pointer: Frames. (line 26) * frame?: Frames. (line 6) * frame? <1>: Comparison Instructions. - (line 112) + (line 116) * free-identifier=?: Syntax Transformer Helpers. (line 16) * free-identifier=? <1>: rnrs syntax-case. (line 34) @@ -59270,32 +59385,32 @@ the Scheme names by a simple transformation described in the section * generic-function-name: Generic Functions. (line 10) * gensym: Symbol Primitives. (line 159) * get-bytevector-all: Binary I/O. (line 66) -* get-bytevector-all <1>: rnrs io ports. (line 120) +* get-bytevector-all <1>: rnrs io ports. (line 117) * get-bytevector-n: Binary I/O. (line 40) -* get-bytevector-n <1>: rnrs io ports. (line 117) +* get-bytevector-n <1>: rnrs io ports. (line 114) * get-bytevector-n!: Binary I/O. (line 46) -* get-bytevector-n! <1>: rnrs io ports. (line 118) +* get-bytevector-n! <1>: rnrs io ports. (line 115) * get-bytevector-some: Binary I/O. (line 52) -* get-bytevector-some <1>: rnrs io ports. (line 119) +* get-bytevector-some <1>: rnrs io ports. (line 116) * get-bytevector-some!: Binary I/O. (line 59) * get-char: Textual I/O. (line 20) -* get-char <1>: rnrs io ports. (line 125) -* get-datum: rnrs io ports. (line 136) +* get-char <1>: rnrs io ports. (line 122) +* get-datum: rnrs io ports. (line 133) * get-environment-variable: SRFI-98. (line 9) * get-environment-variables: SRFI-98. (line 14) * get-internal-real-time: Time. (line 163) * get-internal-run-time: Time. (line 167) * get-line: Textual I/O. (line 91) -* get-line <1>: rnrs io ports. (line 131) +* get-line <1>: rnrs io ports. (line 128) * get-output-string: String Ports. (line 43) * get-string-all: Textual I/O. (line 82) -* get-string-all <1>: rnrs io ports. (line 130) +* get-string-all <1>: rnrs io ports. (line 127) * get-string-n: Textual I/O. (line 52) -* get-string-n <1>: rnrs io ports. (line 127) +* get-string-n <1>: rnrs io ports. (line 124) * get-string-n!: Textual I/O. (line 67) -* get-string-n! <1>: rnrs io ports. (line 128) +* get-string-n! <1>: rnrs io ports. (line 125) * get-u8: Binary I/O. (line 19) -* get-u8 <1>: rnrs io ports. (line 115) +* get-u8 <1>: rnrs io ports. (line 112) * getaddrinfo: Network Databases. (line 16) * getaffinity: Processes. (line 342) * getcwd: Processes. (line 11) @@ -59362,6 +59477,8 @@ the Scheme names by a simple transformation described in the section * guard: SRFI-34. (line 20) * guard <1>: rnrs exceptions. (line 18) * guild compile: Compilation. (line 49) +* guile-extensions-path: Foreign Libraries. (line 155) +* guile-system-extensions-path: Foreign Libraries. (line 157) * GUILE_CHECK_RETVAL: Autoconf Macros. (line 111) * GUILE_FLAGS: Autoconf Macros. (line 40) * GUILE_MODULE_AVAILABLE: Autoconf Macros. (line 127) @@ -59436,7 +59553,7 @@ the Scheme names by a simple transformation described in the section * hash-table?: Hash Table Reference. (line 81) * hash-table? <1>: Comparison Instructions. - (line 107) + (line 111) * hashq: Hash Table Reference. (line 125) * hashq-create-handle!: Hash Table Reference. @@ -59492,11 +59609,11 @@ the Scheme names by a simple transformation described in the section * header-validator: HTTP. (line 61) * header-writer: HTTP. (line 66) * heap-number?: Comparison Instructions. - (line 106) + (line 110) * heap-numbers-equal?: Comparison Instructions. (line 52) * heap-object?: Comparison Instructions. - (line 81) + (line 85) * heap-tag=?: Comparison Instructions. (line 67) * help: Help Commands. (line 10) @@ -59551,7 +59668,7 @@ the Scheme names by a simple transformation described in the section * immediate-tag=?: Comparison Instructions. (line 62) * immutable-vector?: Comparison Instructions. - (line 102) + (line 106) * implementation-restriction-violation?: rnrs conditions. (line 138) * import: Module Commands. (line 9) * import <1>: R6RS Libraries. (line 112) @@ -59616,6 +59733,7 @@ the Scheme names by a simple transformation described in the section * jnl: Branch Instructions. (line 21) * join-thread: Threads. (line 58) * join-timeout-exception?: SRFI-18 Exceptions. (line 28) +* jtable: Branch Instructions. (line 47) * julian-day->date: SRFI-19 Time/Date conversions. (line 11) * julian-day->time-monotonic: SRFI-19 Time/Date conversions. @@ -59630,7 +59748,7 @@ the Scheme names by a simple transformation described in the section * keyword?: Keyword Procedures. (line 6) * keyword? <1>: SRFI-88. (line 19) * keyword? <2>: Comparison Instructions. - (line 113) + (line 117) * kill: Signals. (line 14) * known-header?: HTTP. (line 51) * lalr-parser: LALR(1) Parsing. (line 12) @@ -59744,18 +59862,19 @@ the Scheme names by a simple transformation described in the section * load: Module Commands. (line 12) * load <1>: Loading. (line 6) * load-compiled: Loading. (line 25) -* load-extension: Foreign Functions. (line 55) +* load-extension: Foreign Extensions. (line 41) * load-f64: Constant Instructions. - (line 47) + (line 50) +* load-foreign-library: Foreign Libraries. (line 48) * load-from-path: Load Paths. (line 21) * load-label: Constant Instructions. - (line 40) + (line 43) * load-s64: Constant Instructions. - (line 55) + (line 58) * load-thunk-from-file: Bytecode. (line 103) * load-thunk-from-memory: Bytecode. (line 108) * load-u64: Constant Instructions. - (line 51) + (line 54) * local-compile: Local Evaluation. (line 18) * local-eval: Local Evaluation. (line 16) * locale-am-string: Accessing Locale Information. @@ -59859,9 +59978,9 @@ the Scheme names by a simple transformation described in the section * long-mov: Shuffling Instructions. (line 9) * lookahead-char: Textual I/O. (line 30) -* lookahead-char <1>: rnrs io ports. (line 126) +* lookahead-char <1>: rnrs io ports. (line 123) * lookahead-u8: Binary I/O. (line 24) -* lookahead-u8 <1>: rnrs io ports. (line 116) +* lookahead-u8 <1>: rnrs io ports. (line 113) * lookup: Intrinsic Call Instructions. (line 204) * lookup-language: Compiler Tower. (line 56) @@ -59897,6 +60016,7 @@ the Scheme names by a simple transformation described in the section * lsh/immediate: Intrinsic Call Instructions. (line 136) * lstat: File System. (line 119) +* ltdl-library-path: Foreign Libraries. (line 156) * macro-binding: Internal Macros. (line 31) * macro-name: Internal Macros. (line 27) * macro-transformer: Internal Macros. (line 35) @@ -59912,7 +60032,7 @@ the Scheme names by a simple transformation described in the section (line 128) * make-accessor: Generic Function Internals. (line 51) -* make-arity: Building CPS. (line 55) +* make-arity: Building CPS. (line 56) * make-array: Array Procedures. (line 39) * make-assertion-violation: rnrs conditions. (line 110) * make-atomic-box: Atomics. (line 36) @@ -59921,7 +60041,7 @@ the Scheme names by a simple transformation described in the section * make-buffered-input-port: Buffered Input. (line 15) * make-bytevector: Bytevector Manipulation. (line 9) -* make-c-struct: Foreign Structs. (line 33) +* make-c-struct: Foreign Structs. (line 35) * make-c32vector: SRFI-4 API. (line 46) * make-c64vector: SRFI-4 API. (line 47) * make-chunked-input-port: Transfer Codings. (line 23) @@ -59937,11 +60057,11 @@ the Scheme names by a simple transformation described in the section * make-condition-variable <1>: SRFI-18 Condition variables. (line 17) * make-custom-binary-input-port: Custom Ports. (line 12) -* make-custom-binary-input-port <1>: rnrs io ports. (line 107) +* make-custom-binary-input-port <1>: rnrs io ports. (line 104) * make-custom-binary-input/output-port: Custom Ports. (line 76) -* make-custom-binary-input/output-port <1>: rnrs io ports. (line 111) +* make-custom-binary-input/output-port <1>: rnrs io ports. (line 108) * make-custom-binary-output-port: Custom Ports. (line 64) -* make-custom-binary-output-port <1>: rnrs io ports. (line 109) +* make-custom-binary-output-port <1>: rnrs io ports. (line 106) * make-date: SRFI-19 Date. (line 27) * make-doubly-weak-hash-table: Weak hash tables. (line 8) * make-empty-attlist: SSAX. (line 165) @@ -59986,6 +60106,8 @@ the Scheme names by a simple transformation described in the section * make-i/o-port-error: R6RS I/O Conditions. (line 64) * make-i/o-read-error: R6RS I/O Conditions. (line 15) * make-i/o-write-error: R6RS I/O Conditions. (line 20) +* make-immediate: Constant Instructions. + (line 12) * make-implementation-restriction-violation: rnrs conditions. (line 137) * make-instance: Instance Creation. (line 40) * make-instance <1>: Instance Creation. (line 41) @@ -59997,9 +60119,9 @@ the Scheme names by a simple transformation described in the section * make-list: List Constructors. (line 36) * make-locale: i18n Introduction. (line 37) * make-long-immediate: Constant Instructions. - (line 16) + (line 19) * make-long-long-immediate: Constant Instructions. - (line 20) + (line 23) * make-message-condition: rnrs conditions. (line 79) * make-method: Method Definition Internals. (line 38) @@ -60013,10 +60135,10 @@ the Scheme names by a simple transformation described in the section * make-non-continuable-error: Exception Objects. (line 161) * make-non-continuable-violation: rnrs conditions. (line 131) * make-non-immediate: Constant Instructions. - (line 30) + (line 33) * make-object-property: Object Properties. (line 34) * make-parameter: Parameters. (line 44) -* make-pointer: Foreign Variables. (line 40) +* make-pointer: Foreign Pointers. (line 44) * make-polar: Complex. (line 11) * make-polar <1>: rnrs base. (line 138) * make-procedure-with-setter: Procedures with Setters. @@ -60045,7 +60167,7 @@ the Scheme names by a simple transformation described in the section * make-serious-condition: rnrs conditions. (line 91) * make-shared-array: Shared Arrays. (line 6) * make-short-immediate: Constant Instructions. - (line 12) + (line 15) * make-socket-address: Network Socket Address. (line 12) * make-socket-address <1>: Network Socket Address. @@ -60148,8 +60270,9 @@ the Scheme names by a simple transformation described in the section * min <1>: rnrs base. (line 242) * minor-version: Build Config. (line 12) * mkdir: File System. (line 223) +* mkdtemp: File System. (line 342) * mknod: File System. (line 279) -* mkstemp!: File System. (line 309) +* mkstemp: File System. (line 309) * mktime: Time. (line 78) * mod: rnrs base. (line 251) * mod <1>: Intrinsic Call Instructions. @@ -60193,7 +60316,7 @@ the Scheme names by a simple transformation described in the section * mul: Intrinsic Call Instructions. (line 110) * mutable-vector?: Comparison Instructions. - (line 103) + (line 107) * mutex-level: Mutexes and Condition Variables. (line 177) * mutex-lock!: SRFI-18 Mutexes. (line 36) @@ -60240,7 +60363,7 @@ the Scheme names by a simple transformation described in the section * nice: Processes. (line 310) * nil?: Nil. (line 19) * nil? <1>: Comparison Instructions. - (line 92) + (line 96) * ninth: SRFI-1 Selectors. (line 14) * nl_langinfo: Accessing Locale Information. (line 6) @@ -60281,11 +60404,11 @@ the Scheme names by a simple transformation described in the section * null-environment: Environments. (line 26) * null-environment <1>: rnrs r5rs. (line 26) * null-list?: SRFI-1 Predicates. (line 47) -* null-pointer?: Foreign Variables. (line 51) +* null-pointer?: Foreign Pointers. (line 55) * null?: List Predicates. (line 20) * null? <1>: rnrs base. (line 31) * null? <2>: Comparison Instructions. - (line 90) + (line 94) * number->locale-string: Number Input and Output. (line 36) * number->string: Conversion. (line 11) @@ -60303,9 +60426,9 @@ the Scheme names by a simple transformation described in the section * open: Ports and File Descriptors. (line 127) * open-bytevector-input-port: Bytevector Ports. (line 6) -* open-bytevector-input-port <1>: rnrs io ports. (line 103) +* open-bytevector-input-port <1>: rnrs io ports. (line 100) * open-bytevector-output-port: Bytevector Ports. (line 13) -* open-bytevector-output-port <1>: rnrs io ports. (line 104) +* open-bytevector-output-port <1>: rnrs io ports. (line 101) * open-fdes: Ports and File Descriptors. (line 151) * open-file: File Ports. (line 18) @@ -60360,12 +60483,12 @@ the Scheme names by a simple transformation described in the section * pair?: Pairs. (line 51) * pair? <1>: rnrs base. (line 34) * pair? <2>: Comparison Instructions. - (line 97) + (line 101) * par-for-each: Parallel Forms. (line 29) * par-map: Parallel Forms. (line 28) * parallel: Parallel Forms. (line 15) * parameterize: Parameters. (line 62) -* parse-c-struct: Foreign Structs. (line 39) +* parse-c-struct: Foreign Structs. (line 41) * parse-header: HTTP. (line 113) * parse-http-method: HTTP. (line 132) * parse-http-version: HTTP. (line 136) @@ -60404,19 +60527,19 @@ the Scheme names by a simple transformation described in the section * pipeline: Pipes. (line 89) * PKG_CHECK_MODULES: Autoconf Macros. (line 12) * pointer->bytevector: Void Pointers and Byte Access. - (line 13) -* pointer->procedure: Dynamic FFI. (line 9) -* pointer->scm: Foreign Variables. (line 61) + (line 17) +* pointer->procedure: Foreign Functions. (line 12) +* pointer->scm: Foreign Pointers. (line 65) * pointer->string: Void Pointers and Byte Access. - (line 50) -* pointer-address: Foreign Variables. (line 33) + (line 54) +* pointer-address: Foreign Pointers. (line 37) * pointer-ref/immediate: Memory Access Instructions. (line 40) * pointer-set!/immediate: Memory Access Instructions. (line 44) -* pointer?: Foreign Variables. (line 45) +* pointer?: Foreign Pointers. (line 49) * pointer? <1>: Comparison Instructions. - (line 108) + (line 112) * poll-coop-repl-server: Cooperative REPL Servers. (line 34) * pop: Shuffling Instructions. @@ -60435,19 +60558,19 @@ the Scheme names by a simple transformation described in the section * port-column: Textual I/O. (line 133) * port-conversion-strategy: Encoding. (line 60) * port-encoding: Encoding. (line 11) -* port-eof?: rnrs io ports. (line 87) +* port-eof?: rnrs io ports. (line 84) * port-filename: File Ports. (line 159) * port-for-each: Ports and File Descriptors. (line 254) -* port-has-port-position?: rnrs io ports. (line 73) -* port-has-set-port-position!?: rnrs io ports. (line 80) +* port-has-port-position?: rnrs io ports. (line 74) +* port-has-set-port-position!?: rnrs io ports. (line 81) * port-line: Textual I/O. (line 134) * port-mode: File Ports. (line 152) -* port-position: rnrs io ports. (line 70) +* port-position: rnrs io ports. (line 71) * port-reduce: SRFI-171 Helpers. (line 46) * port-revealed: Ports and File Descriptors. (line 61) -* port-transcoder: rnrs io ports. (line 33) +* port-transcoder: rnrs io ports. (line 34) * port-transduce: SRFI-171 Applying Transducers. (line 32) * port-transduce <1>: SRFI-171 Applying Transducers. @@ -60457,15 +60580,13 @@ the Scheme names by a simple transformation described in the section * port?: Ports. (line 59) * port? <1>: rnrs io ports. (line 28) * port? <2>: Comparison Instructions. - (line 124) + (line 128) * positional-arguments<=?: Function Prologue Instructions. (line 33) * positive?: Comparison. (line 39) * positive? <1>: rnrs base. (line 186) * post-order: Transforming SXML. (line 71) * pre-post-order: Transforming SXML. (line 73) -* pred?: SRFI-171 Transducers. - (line 9) * preserving-reduced: SRFI-171 Helpers. (line 23) * pretty-print: Inspect Commands. (line 9) * pretty-print <1>: Pretty Printing. (line 28) @@ -60483,7 +60604,8 @@ the Scheme names by a simple transformation described in the section * print-set!: Scheme Write. (line 57) * procedure: Procedures with Setters. (line 53) -* procedure->pointer: Dynamic FFI. (line 113) +* procedure->pointer: More Foreign Functions. + (line 69) * procedure-documentation: Procedure Properties. (line 58) * procedure-execution-count: Code Coverage. (line 61) @@ -60514,7 +60636,7 @@ the Scheme names by a simple transformation described in the section * program-sources: Compiled Procedures. (line 76) * program?: Compiled Procedures. (line 35) * program? <1>: Comparison Instructions. - (line 116) + (line 120) * programming-error?: Exception Objects. (line 154) * promise?: Delayed Evaluation. (line 14) * promise? <1>: SRFI-45. (line 34) @@ -60537,16 +60659,16 @@ the Scheme names by a simple transformation described in the section * push-fluid: Intrinsic Call Instructions. (line 181) * put-bytevector: Binary I/O. (line 87) -* put-bytevector <1>: rnrs io ports. (line 122) +* put-bytevector <1>: rnrs io ports. (line 119) * put-char: Textual I/O. (line 108) -* put-char <1>: rnrs io ports. (line 132) -* put-datum: rnrs io ports. (line 155) +* put-char <1>: rnrs io ports. (line 129) +* put-datum: rnrs io ports. (line 152) * put-string: Textual I/O. (line 112) * put-string <1>: Textual I/O. (line 113) * put-string <2>: Textual I/O. (line 114) -* put-string <3>: rnrs io ports. (line 133) +* put-string <3>: rnrs io ports. (line 130) * put-u8: Binary I/O. (line 82) -* put-u8 <1>: rnrs io ports. (line 121) +* put-u8 <1>: rnrs io ports. (line 118) * putenv: Runtime Environment. (line 94) * pwd: Processes. (line 11) * q-empty-check: Queues. (line 49) @@ -60567,6 +60689,7 @@ the Scheme names by a simple transformation described in the section (line 114) * quote: Expression Syntax. (line 49) * quote <1>: rnrs base. (line 109) +* quote-syntax: Syntax Case. (line 339) * quotient: Integer Operations. (line 14) * quotient <1>: rnrs r5rs. (line 14) * raise: Signals. (line 43) @@ -60624,8 +60747,8 @@ the Scheme names by a simple transformation described in the section * read-client: Web Server. (line 92) * read-delimited: Line/Delimited. (line 40) * read-delimited!: Line/Delimited. (line 46) -* read-disable: Scheme Read. (line 52) -* read-enable: Scheme Read. (line 51) +* read-disable: Scheme Read. (line 51) +* read-enable: Scheme Read. (line 50) * read-hash-extend: Reader Extensions. (line 6) * read-header: HTTP. (line 105) * read-headers: HTTP. (line 121) @@ -60638,9 +60761,11 @@ the Scheme names by a simple transformation described in the section * read-response: Responses. (line 32) * read-response-body: Responses. (line 80) * read-response-line: HTTP. (line 152) -* read-set!: Scheme Read. (line 53) +* read-set!: Scheme Read. (line 52) * read-string: sxml ssax input-parse. (line 54) +* read-syntax: Annotated Scheme Read. + (line 14) * read-text-line: sxml ssax input-parse. (line 52) * read-with-shared-structure: SRFI-38. (line 69) @@ -60864,9 +60989,9 @@ the Scheme names by a simple transformation described in the section * reverse-vector->list: SRFI-43 Conversion. (line 11) * revery: SRFI-171 Reducers. (line 30) * rewinddir: File System. (line 255) -* rewrite-cont: Building CPS. (line 60) -* rewrite-exp: Building CPS. (line 59) -* rewrite-term: Building CPS. (line 58) +* rewrite-cont: Building CPS. (line 61) +* rewrite-exp: Building CPS. (line 60) +* rewrite-term: Building CPS. (line 59) * right-justify-string: texinfo string-utils. (line 99) * rmdir: File System. (line 230) @@ -60890,6 +61015,8 @@ the Scheme names by a simple transformation described in the section (line 35) * s16vector: SRFI-4 API. (line 68) * s16vector->list: SRFI-4 API. (line 176) +* s16vector-copy: SRFI-4 Extensions. (line 72) +* s16vector-copy!: SRFI-4 Extensions. (line 48) * s16vector-length: SRFI-4 API. (line 96) * s16vector-ref: SRFI-4 API. (line 122) * s16vector-set!: SRFI-4 API. (line 149) @@ -60900,6 +61027,8 @@ the Scheme names by a simple transformation described in the section (line 37) * s32vector: SRFI-4 API. (line 70) * s32vector->list: SRFI-4 API. (line 178) +* s32vector-copy: SRFI-4 Extensions. (line 74) +* s32vector-copy!: SRFI-4 Extensions. (line 50) * s32vector-length: SRFI-4 API. (line 98) * s32vector-ref: SRFI-4 API. (line 124) * s32vector-set!: SRFI-4 API. (line 151) @@ -60918,6 +61047,8 @@ the Scheme names by a simple transformation described in the section (line 14) * s64vector: SRFI-4 API. (line 72) * s64vector->list: SRFI-4 API. (line 180) +* s64vector-copy: SRFI-4 Extensions. (line 76) +* s64vector-copy!: SRFI-4 Extensions. (line 52) * s64vector-length: SRFI-4 API. (line 100) * s64vector-ref: SRFI-4 API. (line 126) * s64vector-set!: SRFI-4 API. (line 153) @@ -60928,6 +61059,8 @@ the Scheme names by a simple transformation described in the section (line 33) * s8vector: SRFI-4 API. (line 66) * s8vector->list: SRFI-4 API. (line 174) +* s8vector-copy: SRFI-4 Extensions. (line 70) +* s8vector-copy!: SRFI-4 Extensions. (line 46) * s8vector-length: SRFI-4 API. (line 94) * s8vector-ref: SRFI-4 API. (line 120) * s8vector-set!: SRFI-4 API. (line 147) @@ -60940,7 +61073,7 @@ the Scheme names by a simple transformation described in the section * scheme-report-environment <1>: rnrs r5rs. (line 27) * scm->f64: Intrinsic Call Instructions. (line 143) -* scm->pointer: Foreign Variables. (line 58) +* scm->pointer: Foreign Pointers. (line 62) * scm->s64: Intrinsic Call Instructions. (line 153) * scm->u64: Intrinsic Call Instructions. @@ -60972,21 +61105,21 @@ the Scheme names by a simple transformation described in the section (line 23) * scm_add_hook_x: Hook Reference. (line 43) * scm_alarm: Signals. (line 121) -* scm_alignof: Foreign Structs. (line 22) +* scm_alignof: Foreign Structs. (line 24) * scm_all_threads: Threads. (line 21) * scm_angle: Complex. (line 29) -* scm_any_to_c32vector: SRFI-4 Extensions. (line 34) -* scm_any_to_c64vector: SRFI-4 Extensions. (line 35) -* scm_any_to_f32vector: SRFI-4 Extensions. (line 32) -* scm_any_to_f64vector: SRFI-4 Extensions. (line 33) -* scm_any_to_s16vector: SRFI-4 Extensions. (line 27) -* scm_any_to_s32vector: SRFI-4 Extensions. (line 29) -* scm_any_to_s64vector: SRFI-4 Extensions. (line 31) -* scm_any_to_s8vector: SRFI-4 Extensions. (line 25) -* scm_any_to_u16vector: SRFI-4 Extensions. (line 26) -* scm_any_to_u32vector: SRFI-4 Extensions. (line 28) -* scm_any_to_u64vector: SRFI-4 Extensions. (line 30) -* scm_any_to_u8vector: SRFI-4 Extensions. (line 24) +* scm_any_to_c32vector: SRFI-4 Extensions. (line 38) +* scm_any_to_c64vector: SRFI-4 Extensions. (line 39) +* scm_any_to_f32vector: SRFI-4 Extensions. (line 36) +* scm_any_to_f64vector: SRFI-4 Extensions. (line 37) +* scm_any_to_s16vector: SRFI-4 Extensions. (line 31) +* scm_any_to_s32vector: SRFI-4 Extensions. (line 33) +* scm_any_to_s64vector: SRFI-4 Extensions. (line 35) +* scm_any_to_s8vector: SRFI-4 Extensions. (line 29) +* scm_any_to_u16vector: SRFI-4 Extensions. (line 30) +* scm_any_to_u32vector: SRFI-4 Extensions. (line 32) +* scm_any_to_u64vector: SRFI-4 Extensions. (line 34) +* scm_any_to_u8vector: SRFI-4 Extensions. (line 28) * scm_append: Append/Reverse. (line 17) * scm_append_x: Append/Reverse. (line 18) * scm_apply: Fly Evaluation. (line 71) @@ -61136,28 +61269,29 @@ the Scheme names by a simple transformation described in the section (line 30) * scm_backtrace_with_highlights: Pre-Unwind Debugging. (line 29) -* scm_basename: File System. (line 345) +* scm_basename: File System. (line 365) * scm_bind: Network Sockets and Communication. (line 171) * scm_bindtextdomain: Gettext Support. (line 85) * scm_bind_textdomain_codeset: Gettext Support. (line 101) -* scm_bitvector_bit_is_clear: Bit Vectors. (line 98) -* scm_bitvector_bit_is_set: Bit Vectors. (line 97) -* scm_bitvector_elements: Bit Vectors. (line 112) -* scm_bitvector_position: Bit Vectors. (line 67) +* scm_bitvector_bit_is_clear: Bit Vectors. (line 104) +* scm_bitvector_bit_is_set: Bit Vectors. (line 103) +* scm_bitvector_copy: Bit Vectors. (line 53) +* scm_bitvector_elements: Bit Vectors. (line 118) +* scm_bitvector_position: Bit Vectors. (line 73) * scm_bitvector_to_list: Bit Vectors. (line 48) -* scm_bitvector_writable_elements: Bit Vectors. (line 121) +* scm_bitvector_writable_elements: Bit Vectors. (line 127) * scm_bit_extract: Bitwise Operations. (line 142) * scm_boolean_p: Booleans. (line 62) * scm_boot_guile: Initialization. (line 78) * scm_broadcast_condition_variable: Mutexes and Condition Variables. (line 220) * SCM_BYTEVECTOR_CONTENTS: Bytevector Manipulation. - (line 64) + (line 68) * scm_bytevector_copy: Bytevector Manipulation. - (line 48) + (line 52) * scm_bytevector_copy_x: Bytevector Manipulation. - (line 40) + (line 41) * scm_bytevector_eq_p: Bytevector Manipulation. (line 30) * scm_bytevector_fill_x: Bytevector Manipulation. @@ -61181,7 +61315,7 @@ the Scheme names by a simple transformation described in the section * scm_bytevector_length: Bytevector Manipulation. (line 23) * SCM_BYTEVECTOR_LENGTH: Bytevector Manipulation. - (line 61) + (line 65) * scm_bytevector_p: Bytevector Manipulation. (line 16) * scm_bytevector_s16_native_ref: Bytevectors as Integers. @@ -61217,7 +61351,7 @@ the Scheme names by a simple transformation described in the section * scm_bytevector_sint_set_x: Bytevectors as Integers. (line 45) * scm_bytevector_to_pointer: Void Pointers and Byte Access. - (line 31) + (line 35) * scm_bytevector_to_sint_list: Bytevectors and Integer Lists. (line 29) * scm_bytevector_to_u8_list: Bytevectors and Integer Lists. @@ -61304,7 +61438,7 @@ the Scheme names by a simple transformation described in the section * scm_call_with_output_string: String Ports. (line 7) * scm_call_with_unblocked_asyncs: Asyncs. (line 63) * scm_cancel_thread: Threads. (line 83) -* scm_canonicalize_path: File System. (line 354) +* scm_canonicalize_path: File System. (line 374) * scm_car: Pairs. (line 72) * SCM_CAR: Pairs. (line 76) * scm_catch: Throw and Catch. (line 15) @@ -61473,10 +61607,10 @@ the Scheme names by a simple transformation described in the section * scm_connect: Network Sockets and Communication. (line 155) * scm_cons: Pairs. (line 46) -* scm_cons_source: Source Properties. (line 87) +* scm_cons_source: Source Properties. (line 79) * scm_copy_file: File System. (line 177) * scm_copy_random_state: Random. (line 15) -* scm_copy_tree: Copying. (line 13) +* scm_copy_tree: Copying. (line 16) * scm_crypt: Encryption. (line 14) * scm_ctermid: Terminals and Ptys. (line 17) * scm_current_dynamic_state: Fluids and Dynamic States. @@ -61493,22 +61627,22 @@ the Scheme names by a simple transformation described in the section * scm_c_angle: Complex. (line 42) * scm_c_array_rank: Array Procedures. (line 141) * scm_c_bind_keyword_arguments: Keyword Procedures. (line 40) -* scm_c_bitvector_clear_all_bits_x: Bit Vectors. (line 104) -* scm_c_bitvector_clear_bits_x: Bit Vectors. (line 102) -* scm_c_bitvector_clear_bit_x: Bit Vectors. (line 100) -* scm_c_bitvector_count: Bit Vectors. (line 107) -* scm_c_bitvector_count_bits: Bit Vectors. (line 108) -* scm_c_bitvector_flip_all_bits_x: Bit Vectors. (line 105) -* scm_c_bitvector_length: Bit Vectors. (line 106) -* scm_c_bitvector_set_all_bits_x: Bit Vectors. (line 103) -* scm_c_bitvector_set_bits_x: Bit Vectors. (line 101) -* scm_c_bitvector_set_bit_x: Bit Vectors. (line 99) +* scm_c_bitvector_clear_all_bits_x: Bit Vectors. (line 110) +* scm_c_bitvector_clear_bits_x: Bit Vectors. (line 108) +* scm_c_bitvector_clear_bit_x: Bit Vectors. (line 106) +* scm_c_bitvector_count: Bit Vectors. (line 113) +* scm_c_bitvector_count_bits: Bit Vectors. (line 114) +* scm_c_bitvector_flip_all_bits_x: Bit Vectors. (line 111) +* scm_c_bitvector_length: Bit Vectors. (line 112) +* scm_c_bitvector_set_all_bits_x: Bit Vectors. (line 109) +* scm_c_bitvector_set_bits_x: Bit Vectors. (line 107) +* scm_c_bitvector_set_bit_x: Bit Vectors. (line 105) * scm_c_bytevector_length: Bytevector Manipulation. (line 26) * scm_c_bytevector_ref: Bytevector Manipulation. - (line 51) + (line 55) * scm_c_bytevector_set_x: Bytevector Manipulation. - (line 54) + (line 58) * scm_c_call_with_blocked_asyncs: Asyncs. (line 58) * scm_c_call_with_current_module: Accessing Modules from C. (line 12) @@ -61534,7 +61668,7 @@ the Scheme names by a simple transformation described in the section * scm_c_lookup: Accessing Modules from C. (line 78) * scm_c_magnitude: Complex. (line 41) -* scm_c_make_bitvector: Bit Vectors. (line 96) +* scm_c_make_bitvector: Bit Vectors. (line 102) * scm_c_make_bytevector: Bytevector Manipulation. (line 11) * scm_c_make_gsubr: Primitive Procedures. @@ -61631,7 +61765,7 @@ the Scheme names by a simple transformation described in the section * scm_denominator: Reals and Rationals. (line 125) * scm_difference: Arithmetic. (line 18) * scm_directory_stream_p: File System. (line 245) -* scm_dirname: File System. (line 340) +* scm_dirname: File System. (line 360) * scm_display_application: Frames. (line 62) * scm_display_backtrace: Stacks. (line 26) * scm_display_backtrace_with_highlights: Stacks. (line 24) @@ -61645,14 +61779,8 @@ the Scheme names by a simple transformation described in the section (line 246) * scm_dup_to_fdes: Ports and File Descriptors. (line 199) -* scm_dynamic_call: Foreign Functions. (line 25) -* scm_dynamic_func: Foreign Functions. (line 11) -* scm_dynamic_link: Foreign Libraries. (line 38) -* scm_dynamic_object_p: Foreign Libraries. (line 68) -* scm_dynamic_pointer: Foreign Variables. (line 10) * scm_dynamic_state_p: Fluids and Dynamic States. (line 143) -* scm_dynamic_unlink: Foreign Libraries. (line 72) * scm_dynamic_wind: Dynamic Wind. (line 70) * scm_dynwind_begin: Dynamic Wind. (line 127) * scm_dynwind_block_asyncs: Asyncs. (line 73) @@ -61788,7 +61916,7 @@ the Scheme names by a simple transformation described in the section * scm_from_long: Integers. (line 187) * scm_from_long_long: Integers. (line 189) * scm_from_mpz: Integers. (line 218) -* scm_from_pointer: Foreign Variables. (line 70) +* scm_from_pointer: Foreign Pointers. (line 74) * scm_from_port_string: Conversion to/from C. (line 203) * scm_from_port_stringn: Conversion to/from C. @@ -61986,7 +62114,7 @@ the Scheme names by a simple transformation described in the section * scm_internal_catch: Exceptions and C. (line 14) * scm_isatty_p: Terminals and Ptys. (line 7) * scm_is_array: Array Procedures. (line 33) -* scm_is_bitvector: Bit Vectors. (line 95) +* scm_is_bitvector: Bit Vectors. (line 101) * scm_is_bool: Booleans. (line 77) * scm_is_bytevector: Bytevector Manipulation. (line 19) @@ -62006,8 +62134,6 @@ the Scheme names by a simple transformation described in the section * scm_is_rational: Reals and Rationals. (line 129) * scm_is_real: Reals and Rationals. (line 128) * scm_is_signed_integer: Integers. (line 117) -* scm_is_simple_vector: Vector Accessing from C. - (line 17) * scm_is_string: String Predicates. (line 13) * scm_is_symbol: Symbol Primitives. (line 13) * scm_is_true: Booleans. (line 71) @@ -62061,7 +62187,7 @@ the Scheme names by a simple transformation described in the section * scm_list_to_u8vector: SRFI-4 API. (line 211) * scm_lnaof: Network Address Conversion. (line 40) -* scm_load_extension: Foreign Functions. (line 56) +* scm_load_extension: Foreign Extensions. (line 42) * scm_load_thunk_from_file: Bytecode. (line 104) * scm_load_thunk_from_memory: Bytecode. (line 109) * scm_locale_p: i18n Introduction. (line 69) @@ -62168,8 +62294,8 @@ the Scheme names by a simple transformation described in the section * scm_minor_version: Build Config. (line 17) * scm_misc_error: Handling Errors. (line 107) * scm_mkdir: File System. (line 224) +* scm_mkdtemp: File System. (line 343) * scm_mknod: File System. (line 280) -* scm_mkstemp: File System. (line 310) * scm_mktime: Time. (line 79) * scm_module_define: Accessing Modules from C. (line 107) @@ -62235,11 +62361,11 @@ the Scheme names by a simple transformation described in the section (line 32) * scm_pipe: Ports and File Descriptors. (line 170) -* scm_pointer_address: Foreign Variables. (line 34) +* scm_pointer_address: Foreign Pointers. (line 38) * scm_pointer_to_bytevector: Void Pointers and Byte Access. - (line 15) -* scm_pointer_to_procedure: Dynamic FFI. (line 11) -* scm_pointer_to_procedure_with_errno: Dynamic FFI. (line 13) + (line 19) +* scm_pointer_to_procedure: Foreign Functions. (line 14) +* scm_pointer_to_procedure_with_errno: Foreign Functions. (line 16) * scm_port_closed_p: Ports. (line 83) * scm_port_column: Textual I/O. (line 135) * scm_port_conversion_strategy: Encoding. (line 61) @@ -62280,7 +62406,8 @@ the Scheme names by a simple transformation described in the section (line 44) * scm_procedure_source: Procedure Properties. (line 35) -* scm_procedure_to_pointer: Dynamic FFI. (line 114) +* scm_procedure_to_pointer: More Foreign Functions. + (line 70) * scm_procedure_with_setter_p: Procedures with Setters. (line 49) * scm_product: Arithmetic. (line 24) @@ -62489,8 +62616,8 @@ the Scheme names by a simple transformation described in the section * SCM_SET_SMOB_OBJECT_2: Smobs. (line 174) * SCM_SET_SMOB_OBJECT_3: Smobs. (line 175) * scm_set_smob_print: Smobs. (line 96) -* scm_set_source_properties_x: Source Properties. (line 45) -* scm_set_source_property_x: Source Properties. (line 50) +* scm_set_source_properties_x: Source Properties. (line 37) +* scm_set_source_property_x: Source Properties. (line 42) * scm_set_struct_vtable_name_x: Vtable Contents. (line 47) * scm_shared_array_increments: Shared Arrays. (line 95) * scm_shared_array_offset: Shared Arrays. (line 100) @@ -62504,14 +62631,14 @@ the Scheme names by a simple transformation described in the section (line 216) * scm_simple_format: Simple Output. (line 10) * SCM_SIMPLE_VECTOR_LENGTH: Vector Accessing from C. - (line 26) + (line 17) * SCM_SIMPLE_VECTOR_REF: Vector Accessing from C. - (line 30) + (line 21) * SCM_SIMPLE_VECTOR_SET: Vector Accessing from C. - (line 34) + (line 25) * scm_sint_list_to_bytevector: Bytevectors and Integer Lists. (line 39) -* scm_sizeof: Foreign Structs. (line 13) +* scm_sizeof: Foreign Structs. (line 15) * scm_sleep: Signals. (line 139) * scm_sloppy_assoc: Sloppy Alist Functions. (line 54) @@ -62540,8 +62667,8 @@ the Scheme names by a simple transformation described in the section * scm_sort_list: Sorting. (line 76) * scm_sort_list_x: Sorting. (line 81) * scm_sort_x: Sorting. (line 54) -* scm_source_properties: Source Properties. (line 55) -* scm_source_property: Source Properties. (line 59) +* scm_source_properties: Source Properties. (line 47) +* scm_source_property: Source Properties. (line 51) * scm_spawn_thread: Threads. (line 40) * scm_stable_sort: Sorting. (line 61) * scm_stable_sort_x: Sorting. (line 66) @@ -62733,15 +62860,11 @@ the Scheme names by a simple transformation described in the section * scm_substring_upcase_x: Alphabetic Case Mapping. (line 22) * scm_sum: Arithmetic. (line 13) -* scm_supports_source_properties_p: Source Properties. (line 33) +* scm_supports_source_properties_p: Source Properties. (line 24) * SCM_SYMBOL: Snarfing Macros. (line 44) -* scm_symbol_fref: Symbol Props. (line 30) -* scm_symbol_fset_x: Symbol Props. (line 34) * scm_symbol_hash: Symbol Keys. (line 54) * scm_symbol_interned_p: Symbol Uninterned. (line 53) * scm_symbol_p: Symbol Primitives. (line 10) -* scm_symbol_pref: Symbol Props. (line 38) -* scm_symbol_pset_x: Symbol Props. (line 42) * scm_symbol_to_keyword: Keyword Procedures. (line 15) * scm_symbol_to_string: Symbol Primitives. (line 22) * scm_symlink: File System. (line 219) @@ -62788,7 +62911,7 @@ the Scheme names by a simple transformation described in the section * scm_timed_lock_mutex: Mutexes and Condition Variables. (line 133) * scm_times: Time. (line 142) -* scm_tmpfile: File System. (line 333) +* scm_tmpfile: File System. (line 336) * scm_tmpnam: File System. (line 295) * scm_total_processor_count: Threads. (line 110) * scm_to_bool: Booleans. (line 83) @@ -62812,7 +62935,7 @@ the Scheme names by a simple transformation described in the section * scm_to_long: Integers. (line 151) * scm_to_long_long: Integers. (line 153) * scm_to_mpz: Integers. (line 211) -* scm_to_pointer: Foreign Variables. (line 77) +* scm_to_pointer: Foreign Pointers. (line 81) * scm_to_port_string: Conversion to/from C. (line 206) * scm_to_port_stringn: Conversion to/from C. @@ -62923,19 +63046,19 @@ the Scheme names by a simple transformation described in the section * scm_variable_set_x: Variables. (line 57) * scm_variable_unset_x: Variables. (line 62) * scm_vector: Vector Creation. (line 14) -* scm_vector_copy: Vector Accessors. (line 57) +* scm_vector_copy: Vector Accessors. (line 59) * scm_vector_elements: Vector Accessing from C. - (line 38) + (line 29) * scm_vector_fill_x: Vector Accessors. (line 52) * scm_vector_length: Vector Accessors. (line 11) -* scm_vector_move_left_x: Vector Accessors. (line 61) -* scm_vector_move_right_x: Vector Accessors. (line 73) +* scm_vector_move_left_x: Vector Accessors. (line 80) +* scm_vector_move_right_x: Vector Accessors. (line 94) * scm_vector_p: Vector Creation. (line 47) * scm_vector_ref: Vector Accessors. (line 18) * scm_vector_set_x: Vector Accessors. (line 41) * scm_vector_to_list: Vector Creation. (line 23) * scm_vector_writable_elements: Vector Accessing from C. - (line 67) + (line 60) * scm_version: Build Config. (line 14) * scm_waitpid: Processes. (line 127) * scm_wait_condition_variable: Mutexes and Condition Variables. @@ -62959,6 +63082,7 @@ the Scheme names by a simple transformation described in the section * scm_with_throw_handler: Throw and Catch. (line 60) * scm_words: Allocating Heap Objects. (line 18) +* scm_write_line: Line/Delimited. (line 88) * scm_wrong_num_args: Handling Errors. (line 102) * scm_wrong_type_arg: Handling Errors. (line 103) * scm_wrong_type_arg_msg: Handling Errors. (line 105) @@ -63020,7 +63144,7 @@ the Scheme names by a simple transformation described in the section (line 43) * set-port-filename!: File Ports. (line 167) * set-port-line!: Textual I/O. (line 147) -* set-port-position!: rnrs io ports. (line 76) +* set-port-position!: rnrs io ports. (line 77) * set-port-revealed!: Ports and File Descriptors. (line 65) * set-procedure-properties!: Procedure Properties. @@ -63032,10 +63156,9 @@ the Scheme names by a simple transformation described in the section * set-readline-output-port!: Readline Functions. (line 22) * set-readline-prompt!: Readline Functions. (line 59) * set-record-type-printer!: SRFI-9 Records. (line 86) -* set-source-properties!: Source Properties. (line 44) -* set-source-property!: Source Properties. (line 49) +* set-source-properties!: Source Properties. (line 36) +* set-source-property!: Source Properties. (line 41) * set-struct-vtable-name!: Vtable Contents. (line 45) -* set-symbol-property!: Symbol Props. (line 52) * set-time-nanosecond!: SRFI-19 Time. (line 50) * set-time-second!: SRFI-19 Time. (line 51) * set-time-type!: SRFI-19 Time. (line 49) @@ -63107,7 +63230,7 @@ the Scheme names by a simple transformation described in the section * sint-list->bytevector: Bytevectors and Integer Lists. (line 38) * sixth: SRFI-1 Selectors. (line 11) -* sizeof: Foreign Structs. (line 12) +* sizeof: Foreign Structs. (line 14) * size_t: Array Procedures. (line 133) * skip-until: sxml ssax input-parse. (line 43) @@ -63150,7 +63273,7 @@ the Scheme names by a simple transformation described in the section * slot-unbound <2>: Accessing Slots. (line 125) * slot-unbound <3>: Accessing Slots. (line 126) * smob?: Comparison Instructions. - (line 123) + (line 127) * sockaddr:addr: Network Socket Address. (line 44) * sockaddr:fam: Network Socket Address. @@ -63172,8 +63295,8 @@ the Scheme names by a simple transformation described in the section * sort-list: Sorting. (line 75) * sort-list!: Sorting. (line 80) * sorted?: Sorting. (line 41) -* source-properties: Source Properties. (line 54) -* source-property: Source Properties. (line 58) +* source-properties: Source Properties. (line 46) +* source-property: Source Properties. (line 50) * source:addr: Compiled Procedures. (line 77) * source:column: Compiled Procedures. (line 79) * source:file: Compiled Procedures. (line 80) @@ -63188,6 +63311,7 @@ the Scheme names by a simple transformation described in the section * split-at!: SRFI-1 Selectors. (line 44) * sqrt: Scientific. (line 9) * sqrt <1>: rnrs base. (line 143) +* srfi-4-vector-type-size: SRFI-4 Extensions. (line 12) * srsh: Integer Arithmetic Instructions. (line 50) * srsh/immediate: Integer Arithmetic Instructions. @@ -63214,9 +63338,9 @@ the Scheme names by a simple transformation described in the section * stack-length: Stacks. (line 14) * stack-ref: Stacks. (line 18) * stack?: Stacks. (line 6) -* standard-error-port: rnrs io ports. (line 92) -* standard-input-port: rnrs io ports. (line 90) -* standard-output-port: rnrs io ports. (line 91) +* standard-error-port: rnrs io ports. (line 89) +* standard-input-port: rnrs io ports. (line 87) +* standard-output-port: rnrs io ports. (line 88) * start-stack: Stack Capture. (line 52) * stat: File System. (line 49) * stat:atime: File System. (line 85) @@ -63238,11 +63362,11 @@ the Scheme names by a simple transformation described in the section * stat:type: File System. (line 112) * stat:uid: File System. (line 75) * static-patch!: Constant Instructions. - (line 80) + (line 83) * static-ref: Constant Instructions. - (line 65) + (line 68) * static-set!: Constant Instructions. - (line 76) + (line 79) * statistics: System Commands. (line 9) * statprof: Statprof. (line 105) * statprof-accumulated-time: Statprof. (line 148) @@ -63378,7 +63502,7 @@ the Scheme names by a simple transformation described in the section * string->number <2>: Intrinsic Call Instructions. (line 163) * string->pointer: Void Pointers and Byte Access. - (line 42) + (line 46) * string->relative-ref: URIs. (line 168) * string->symbol: Symbol Primitives. (line 66) * string->symbol <1>: rnrs base. (line 17) @@ -63577,9 +63701,9 @@ the Scheme names by a simple transformation described in the section * string?: String Predicates. (line 9) * string? <1>: rnrs base. (line 71) * string? <2>: Comparison Instructions. - (line 105) + (line 109) * stringbuf?: Comparison Instructions. - (line 110) + (line 114) * strptime: Time. (line 127) * strtod: Number Input and Output. (line 12) @@ -63594,7 +63718,7 @@ the Scheme names by a simple transformation described in the section * struct-vtable?: Meta-Vtables. (line 48) * struct?: Structure Basics. (line 45) * struct? <1>: Comparison Instructions. - (line 98) + (line 102) * sub: Intrinsic Call Instructions. (line 107) * sub/immediate: Intrinsic Call Instructions. @@ -63610,7 +63734,7 @@ the Scheme names by a simple transformation described in the section * substring/shared: String Selection. (line 46) * subtract-duration: SRFI-19 Time. (line 94) * subtract-duration!: SRFI-19 Time. (line 95) -* supports-source-properties?: Source Properties. (line 32) +* supports-source-properties?: Source Properties. (line 23) * suspendable-continuation?: Prompt Primitives. (line 147) * sxml->string: Reading and Writing XML. (line 141) @@ -63627,27 +63751,21 @@ the Scheme names by a simple transformation described in the section * symbol->string: Symbol Primitives. (line 21) * symbol->string <1>: rnrs base. (line 16) * symbol-append: Symbol Primitives. (line 58) -* symbol-fref: Symbol Props. (line 29) -* symbol-fset!: Symbol Props. (line 33) * symbol-hash: Symbol Keys. (line 53) * symbol-hash <1>: rnrs hashtables. (line 116) * symbol-interned?: Symbol Uninterned. (line 52) -* symbol-pref: Symbol Props. (line 37) * symbol-prefix-proc: Using Guile Modules. (line 75) -* symbol-property: Symbol Props. (line 45) -* symbol-property-remove!: Symbol Props. (line 57) -* symbol-pset!: Symbol Props. (line 41) * symbol=?: rnrs base. (line 127) * symbol?: Symbol Primitives. (line 9) * symbol? <1>: rnrs base. (line 15) * symbol? <2>: Comparison Instructions. - (line 99) + (line 103) * symlink: File System. (line 218) * sync: File System. (line 274) * sync-q!: Queues. (line 79) * syntax: Syntax Case. (line 63) * syntax <1>: rnrs syntax-case. (line 23) -* syntax->datum: Syntax Case. (line 188) +* syntax->datum: Syntax Case. (line 203) * syntax->datum <1>: rnrs syntax-case. (line 48) * syntax-case: Syntax Case. (line 9) * syntax-case <1>: rnrs syntax-case. (line 20) @@ -63656,9 +63774,9 @@ the Scheme names by a simple transformation described in the section * syntax-error-subform: Exception Objects. (line 180) * syntax-error?: Exception Objects. (line 178) * syntax-local-binding: Syntax Transformer Helpers. - (line 41) + (line 46) * syntax-locally-bound-identifiers: Syntax Transformer Helpers. - (line 110) + (line 115) * syntax-module: Syntax Transformer Helpers. (line 37) * syntax-parameterize: Syntax Parameters. (line 34) @@ -63666,18 +63784,20 @@ the Scheme names by a simple transformation described in the section * syntax-rules <1>: rnrs base. (line 90) * syntax-source: Syntax Transformer Helpers. (line 23) +* syntax-sourcev: Syntax Transformer Helpers. + (line 41) * syntax-violation: rnrs syntax-case. (line 54) * syntax-violation <1>: rnrs syntax-case. (line 55) * syntax-violation-form: rnrs conditions. (line 151) * syntax-violation-subform: rnrs conditions. (line 152) * syntax-violation?: rnrs conditions. (line 150) * syntax?: Comparison Instructions. - (line 115) + (line 119) * system: Processes. (line 184) * system*: Processes. (line 194) * system-async-mark: Asyncs. (line 11) * system-error-errno: Conventions. (line 66) -* system-file-name-convention: File System. (line 377) +* system-file-name-convention: File System. (line 397) * tadd-between: SRFI-171 Transducers. (line 111) * tag-char: Tagging and Untagging Instructions. @@ -63733,7 +63853,9 @@ the Scheme names by a simple transformation described in the section * texi-fragment->stexi: texinfo. (line 63) * text-content-type?: Responses. (line 123) * textdomain: Gettext Support. (line 74) -* textual-port?: rnrs io ports. (line 46) +* textual-port?: rnrs io ports. (line 47) +* tfilter: SRFI-171 Transducers. + (line 9) * tfilter-map: SRFI-171 Transducers. (line 21) * tflatten: SRFI-171 Transducers. @@ -63835,7 +63957,7 @@ the Scheme names by a simple transformation described in the section * tm:zone: Time. (line 60) * tmap: SRFI-171 Transducers. (line 6) -* tmpfile: File System. (line 332) +* tmpfile: File System. (line 335) * tmpnam: File System. (line 294) * tms:clock: Time. (line 147) * tms:cstime: Time. (line 159) @@ -63851,7 +63973,7 @@ the Scheme names by a simple transformation described in the section * trace-calls-to-procedure: Tracing Traps. (line 73) * trace-instructions-in-procedure: Tracing Traps. (line 82) * tracepoint: Debug Commands. (line 63) -* transcoded-port: rnrs io ports. (line 54) +* transcoded-port: rnrs io ports. (line 55) * transcoder-codec: R6RS Transcoders. (line 169) * transcoder-eol-style: R6RS Transcoders. (line 170) * transcoder-error-handling-mode: R6RS Transcoders. (line 171) @@ -63902,6 +64024,8 @@ the Scheme names by a simple transformation described in the section (line 34) * u16vector: SRFI-4 API. (line 67) * u16vector->list: SRFI-4 API. (line 175) +* u16vector-copy: SRFI-4 Extensions. (line 71) +* u16vector-copy!: SRFI-4 Extensions. (line 47) * u16vector-length: SRFI-4 API. (line 95) * u16vector-ref: SRFI-4 API. (line 121) * u16vector-set!: SRFI-4 API. (line 148) @@ -63912,6 +64036,8 @@ the Scheme names by a simple transformation described in the section (line 36) * u32vector: SRFI-4 API. (line 69) * u32vector->list: SRFI-4 API. (line 177) +* u32vector-copy: SRFI-4 Extensions. (line 73) +* u32vector-copy!: SRFI-4 Extensions. (line 49) * u32vector-length: SRFI-4 API. (line 97) * u32vector-ref: SRFI-4 API. (line 123) * u32vector-set!: SRFI-4 API. (line 150) @@ -63930,6 +64056,8 @@ the Scheme names by a simple transformation described in the section (line 6) * u64vector: SRFI-4 API. (line 71) * u64vector->list: SRFI-4 API. (line 179) +* u64vector-copy: SRFI-4 Extensions. (line 75) +* u64vector-copy!: SRFI-4 Extensions. (line 51) * u64vector-length: SRFI-4 API. (line 99) * u64vector-ref: SRFI-4 API. (line 125) * u64vector-set!: SRFI-4 API. (line 152) @@ -63942,6 +64070,8 @@ the Scheme names by a simple transformation described in the section (line 32) * u8vector: SRFI-4 API. (line 65) * u8vector->list: SRFI-4 API. (line 173) +* u8vector-copy: SRFI-4 Extensions. (line 69) +* u8vector-copy!: SRFI-4 Extensions. (line 45) * u8vector-length: SRFI-4 API. (line 93) * u8vector-ref: SRFI-4 API. (line 119) * u8vector-set!: SRFI-4 API. (line 146) @@ -63981,7 +64111,7 @@ the Scheme names by a simple transformation described in the section * undefined-variable-error?: Exception Objects. (line 187) * undefined-violation?: rnrs conditions. (line 159) * undefined?: Comparison Instructions. - (line 88) + (line 92) * unfold: SRFI-1 Fold and Map. (line 111) * unfold-right: SRFI-1 Fold and Map. (line 138) * unget-bytevector: Binary I/O. (line 72) @@ -64004,7 +64134,7 @@ the Scheme names by a simple transformation described in the section * unreduce: SRFI-171 Helpers. (line 16) * unsetenv: Runtime Environment. (line 80) * unspecified?: Comparison Instructions. - (line 87) + (line 91) * unsyntax: rnrs syntax-case. (line 25) * unsyntax-splicing: rnrs syntax-case. (line 26) * untag-char: Tagging and Untagging Instructions. @@ -64083,7 +64213,7 @@ the Scheme names by a simple transformation described in the section * variable-unset!: Variables. (line 61) * variable?: Variables. (line 65) * variable? <1>: Comparison Instructions. - (line 100) + (line 104) * vector: Vector Creation. (line 12) * vector <1>: SRFI-43 Constructors. (line 12) @@ -64098,10 +64228,11 @@ the Scheme names by a simple transformation described in the section * vector-binary-search: SRFI-43 Searching. (line 42) * vector-concatenate: SRFI-43 Constructors. (line 76) -* vector-copy: Vector Accessors. (line 56) +* vector-copy: Vector Accessors. (line 58) * vector-copy <1>: SRFI-43 Constructors. (line 41) -* vector-copy!: SRFI-43 Mutators. (line 20) +* vector-copy!: Vector Accessors. (line 64) +* vector-copy! <1>: SRFI-43 Mutators. (line 20) * vector-count: SRFI-43 Iteration. (line 38) * vector-empty?: SRFI-43 Predicates. (line 9) * vector-every: SRFI-43 Searching. (line 73) @@ -64120,8 +64251,8 @@ the Scheme names by a simple transformation described in the section * vector-map: SRFI-43 Iteration. (line 20) * vector-map <1>: rnrs base. (line 331) * vector-map!: SRFI-43 Iteration. (line 27) -* vector-move-left!: Vector Accessors. (line 60) -* vector-move-right!: Vector Accessors. (line 72) +* vector-move-left!: Vector Accessors. (line 79) +* vector-move-right!: Vector Accessors. (line 93) * vector-reduce: SRFI-171 Helpers. (line 37) * vector-ref: Vector Accessors. (line 17) * vector-ref <1>: SRFI-43 Selectors. (line 6) @@ -64151,7 +64282,7 @@ the Scheme names by a simple transformation described in the section * vector? <1>: SRFI-43 Predicates. (line 6) * vector? <2>: rnrs base. (line 337) * vector? <3>: Comparison Instructions. - (line 101) + (line 105) * version: Build Config. (line 9) * vhash-assoc: VHashes. (line 67) * vhash-assq: VHashes. (line 68) @@ -64194,7 +64325,7 @@ the Scheme names by a simple transformation described in the section * vm-add-next-hook!: VM Hooks. (line 40) * vm-add-return-hook!: VM Hooks. (line 53) * vm-continuation?: Comparison Instructions. - (line 117) + (line 121) * vm-remove-abort-hook!: VM Hooks. (line 72) * vm-remove-apply-hook!: VM Hooks. (line 70) * vm-remove-next-hook!: VM Hooks. (line 69) @@ -64207,16 +64338,16 @@ the Scheme names by a simple transformation described in the section * warning? <1>: rnrs conditions. (line 87) * weak-key-hash-table?: Weak hash tables. (line 26) * weak-set?: Comparison Instructions. - (line 119) + (line 123) * weak-table?: Comparison Instructions. - (line 120) + (line 124) * weak-value-hash-table?: Weak hash tables. (line 27) * weak-vector: Weak vectors. (line 12) * weak-vector-ref: Weak vectors. (line 23) * weak-vector-set!: Weak vectors. (line 28) * weak-vector?: Weak vectors. (line 19) * weak-vector? <1>: Comparison Instructions. - (line 104) + (line 108) * when: Conditionals. (line 34) * when <1>: rnrs control. (line 10) * while: while do. (line 64) @@ -64230,7 +64361,7 @@ the Scheme names by a simple transformation described in the section * with-default-trap-handler: High-Level Traps. (line 26) * with-dynamic-state: Fluids and Dynamic States. (line 163) -* with-ellipsis: Syntax Case. (line 285) +* with-ellipsis: Syntax Case. (line 300) * with-error-to-file: File Ports. (line 130) * with-error-to-port: Default Ports. (line 58) * with-exception-handler: Raising and Handling Exceptions. @@ -64256,7 +64387,7 @@ the Scheme names by a simple transformation described in the section * with-parameters*: SRFI-39. (line 14) * with-readline-completion-function: Readline Functions. (line 76) * with-ssax-error-to-port: SSAX. (line 153) -* with-syntax: Syntax Case. (line 235) +* with-syntax: Syntax Case. (line 250) * with-throw-handler: Throw and Catch. (line 59) * word-ref: Memory Access Instructions. (line 31) @@ -64278,6 +64409,7 @@ the Scheme names by a simple transformation described in the section * write-client: Web Server. (line 130) * write-header: HTTP. (line 117) * write-headers: HTTP. (line 125) +* write-line: Line/Delimited. (line 87) * write-request: Requests. (line 83) * write-request-body: Requests. (line 93) * write-request-line: HTTP. (line 149) @@ -64318,7 +64450,7 @@ in the section *Note API Overview::. [index] * Menu: -* %auto-compilation-options: Compilation. (line 171) +* %auto-compilation-options: Compilation. (line 169) * %default-port-encoding: Encoding. (line 28) * %global-locale: i18n Introduction. (line 72) * %guile-build-info: Build Config. (line 61) @@ -64327,7 +64459,7 @@ in the section *Note API Overview::. * %load-extensions: Load Paths. (line 70) * %load-hook: Loading. (line 64) * %load-path: Load Paths. (line 10) -* %null-pointer: Foreign Variables. (line 48) +* %null-pointer: Foreign Pointers. (line 52) * &condition: SRFI-35. (line 113) * &error: SRFI-35. (line 134) * &message: SRFI-35. (line 117) @@ -64404,6 +64536,8 @@ in the section *Note API Overview::. (line 50) * clock-bindings: Sandboxed Evaluation. (line 198) +* complex-double: Foreign Types. (line 32) +* complex-float: Foreign Types. (line 33) * connection: HTTP Headers. (line 88) * content-encoding: HTTP Headers. (line 153) * content-language: HTTP Headers. (line 158) @@ -64416,7 +64550,7 @@ in the section *Note API Overview::. (line 199) * current-reader: Loading. (line 44) * date: HTTP Headers. (line 96) -* double: Foreign Types. (line 33) +* double: Foreign Types. (line 31) * error-bindings: Sandboxed Evaluation. (line 200) * etag: HTTP Headers. (line 361) @@ -64426,8 +64560,8 @@ in the section *Note API Overview::. * expires: HTTP Headers. (line 200) * FD_CLOEXEC: Ports and File Descriptors. (line 286) -* file-name-separator-string: File System. (line 389) -* float: Foreign Types. (line 32) +* file-name-separator-string: File System. (line 409) +* float: Foreign Types. (line 30) * fluid-bindings: Sandboxed Evaluation. (line 201) * from: HTTP Headers. (line 257) @@ -64448,27 +64582,29 @@ in the section *Note API Overview::. (line 311) * GUILE_AUTO_COMPILE: Environment Variables. (line 37) +* GUILE_EXTENSIONS_PATH: Environment Variables. + (line 124) * GUILE_HISTORY: Environment Variables. (line 65) * GUILE_INSTALL_LOCALE: Environment Variables. (line 71) * GUILE_JIT_LOG: Environment Variables. - (line 149) + (line 156) * GUILE_JIT_STOP_AFTER: Environment Variables. - (line 153) + (line 160) * GUILE_JIT_THRESHOLD: Environment Variables. - (line 139) + (line 146) * GUILE_LOAD_COMPILED_PATH: Environment Variables. (line 84) * GUILE_LOAD_PATH: Environment Variables. (line 101) * GUILE_TLS_CERTIFICATE_DIRECTORY: Web Client. (line 111) * GUILE_WARN_DEPRECATED: Environment Variables. - (line 124) + (line 131) * hash-bindings: Sandboxed Evaluation. (line 202) * HOME: Environment Variables. - (line 134) + (line 141) * host: HTTP Headers. (line 262) * if-match: HTTP Headers. (line 270) * if-modified-since: HTTP Headers. (line 281) @@ -64481,13 +64617,13 @@ in the section *Note API Overview::. (line 25) * INADDR_LOOPBACK: Network Address Conversion. (line 28) -* int: Foreign Types. (line 40) -* int16: Foreign Types. (line 27) -* int32: Foreign Types. (line 29) -* int64: Foreign Types. (line 31) -* int8: Foreign Types. (line 24) +* int: Foreign Types. (line 41) +* int16: Foreign Types. (line 25) +* int32: Foreign Types. (line 27) +* int64: Foreign Types. (line 29) +* int8: Foreign Types. (line 22) * internal-time-units-per-second: Time. (line 137) -* intptr_t: Foreign Types. (line 49) +* intptr_t: Foreign Types. (line 50) * IPPROTO_IP: Network Sockets and Communication. (line 71) * IPPROTO_TCP: Network Sockets and Communication. @@ -64528,7 +64664,7 @@ in the section *Note API Overview::. (line 320) * LOCK_UN: Ports and File Descriptors. (line 326) -* long: Foreign Types. (line 42) +* long: Foreign Types. (line 43) * macro-bindings: Sandboxed Evaluation. (line 206) * max-forwards: HTTP Headers. (line 307) @@ -64618,7 +64754,7 @@ in the section *Note API Overview::. (line 213) * proxy-authenticate: HTTP Headers. (line 373) * proxy-authorization: HTTP Headers. (line 313) -* ptrdiff_t: Foreign Types. (line 48) +* ptrdiff_t: Foreign Types. (line 49) * range: HTTP Headers. (line 320) * referer: HTTP Headers. (line 329) * regexp-bindings: Sandboxed Evaluation. @@ -64702,10 +64838,10 @@ in the section *Note API Overview::. * SEEK_END: Random Access. (line 20) * SEEK_SET: Random Access. (line 16) * server: HTTP Headers. (line 386) -* short: Foreign Types. (line 44) +* short: Foreign Types. (line 45) * SIGHUP: Signals. (line 34) * SIGINT: Signals. (line 37) -* size_t: Foreign Types. (line 46) +* size_t: Foreign Types. (line 47) * SOCK_DGRAM: Network Sockets and Communication. (line 34) * SOCK_RAW: Network Sockets and Communication. @@ -64752,7 +64888,7 @@ in the section *Note API Overview::. (line 85) * srfi-4-bindings: Sandboxed Evaluation. (line 216) -* ssize_t: Foreign Types. (line 47) +* ssize_t: Foreign Types. (line 48) * SSL_CERT_DIR: Web Client. (line 114) * standard-vtable-fields: Meta-Vtables. (line 78) * stream-null: SRFI-41 Stream Primitives. @@ -64775,14 +64911,14 @@ in the section *Note API Overview::. * time-utc: SRFI-19 Time. (line 14) * trailer: HTTP Headers. (line 106) * transfer-encoding: HTTP Headers. (line 112) -* uint16: Foreign Types. (line 26) -* uint32: Foreign Types. (line 28) -* uint64: Foreign Types. (line 30) -* uint8: Foreign Types. (line 25) -* uintptr_t: Foreign Types. (line 50) -* unsigned-int: Foreign Types. (line 41) -* unsigned-long: Foreign Types. (line 43) -* unsigned-short: Foreign Types. (line 45) +* uint16: Foreign Types. (line 24) +* uint32: Foreign Types. (line 26) +* uint64: Foreign Types. (line 28) +* uint8: Foreign Types. (line 23) +* uintptr_t: Foreign Types. (line 51) +* unsigned-int: Foreign Types. (line 42) +* unsigned-long: Foreign Types. (line 44) +* unsigned-short: Foreign Types. (line 46) * unspecified-bindings: Sandboxed Evaluation. (line 219) * upgrade: HTTP Headers. (line 118) @@ -64796,7 +64932,7 @@ in the section *Note API Overview::. (line 222) * via: HTTP Headers. (line 125) * vlist-null: VLists. (line 59) -* void: Foreign Types. (line 55) +* void: Foreign Types. (line 56) * vtable-index-layout: Vtable Contents. (line 18) * vtable-index-printer: Vtable Contents. (line 31) * vtable-offset-user: Meta-Vtables. (line 82) @@ -64822,8 +64958,8 @@ the Guile Programmers Manual. [index] * Menu: -* $arity: CPS in Guile. (line 237) -* $branch: CPS in Guile. (line 176) +* $arity: CPS in Guile. (line 250) +* $branch: CPS in Guile. (line 177) * $call: CPS in Guile. (line 101) * $callk: CPS in Guile. (line 165) * $code: CPS in Guile. (line 155) @@ -64832,16 +64968,17 @@ the Guile Programmers Manual. * $continue: CPS in Guile. (line 51) * $fun: CPS in Guile. (line 121) * $kargs: CPS in Guile. (line 41) -* $kclause: CPS in Guile. (line 265) -* $kfun: CPS in Guile. (line 252) -* $kreceive: CPS in Guile. (line 228) -* $ktail: CPS in Guile. (line 262) +* $kclause: CPS in Guile. (line 278) +* $kfun: CPS in Guile. (line 265) +* $kreceive: CPS in Guile. (line 241) +* $ktail: CPS in Guile. (line 275) * $prim: CPS in Guile. (line 97) * $primcall: CPS in Guile. (line 61) * $prompt: CPS in Guile. (line 110) -* $prompt <1>: CPS in Guile. (line 206) +* $prompt <1>: CPS in Guile. (line 219) * $rec: CPS in Guile. (line 127) -* $throw: CPS in Guile. (line 192) +* $switch: CPS in Guile. (line 193) +* $throw: CPS in Guile. (line 205) * $values: CPS in Guile. (line 107) * &error: Exception Objects. (line 135) * &exception: Exception Objects. (line 11) @@ -65183,6 +65320,8 @@ R5RS Index * values: Multiple Values. (line 19) * vector: Vector Creation. (line 12) * vector->list: Vector Creation. (line 22) +* vector-copy: Vector Accessors. (line 58) +* vector-copy!: Vector Accessors. (line 64) * vector-fill!: Vector Accessors. (line 51) * vector-length: Vector Accessors. (line 10) * vector-ref: Vector Accessors. (line 17) @@ -65220,809 +65359,814 @@ Node: Using the Guile Module System26067 Node: Using Modules26648 Node: Writing new Modules27634 Node: Putting Extensions into Modules28515 -Node: Reporting Bugs29406 -Node: Hello Scheme!33643 -Node: About Data34845 -Node: Latent Typing35523 -Node: Values and Variables37495 -Node: Definition39488 -Node: About Procedures42128 -Node: Procedures as Values43073 -Node: Simple Invocation45814 -Node: Creating a Procedure47617 -Node: Lambda Alternatives50221 -Node: About Expressions52326 -Node: Evaluating53739 -Ref: Evaluating-Footnote-155947 -Node: Eval Literal56083 -Node: Eval Variable57383 -Node: Eval Procedure58136 -Node: Eval Special61290 -Node: Tail Calls63350 -Node: The REPL66249 -Node: Syntax Summary67309 -Node: About Closure69260 -Node: About Environments70474 -Node: Local Variables72342 -Node: Chaining73900 -Node: Lexical Scope76336 -Node: Scoping Example77834 -Node: Closure81827 -Node: Serial Number84168 -Node: Shared Variable85740 -Node: Callback Closure87358 -Node: OO Closure89645 -Node: Further Reading91938 -Node: Programming in Scheme92823 -Node: Guile Scheme94026 -Node: Invoking Guile94825 -Node: Command-line Options95347 -Node: Environment Variables104674 -Ref: Environment Variables-Footnote-1112346 -Node: Guile Scripting112452 -Node: The Top of a Script File113178 -Node: The Meta Switch115233 -Node: Command Line Handling119343 -Node: Scripting Examples122279 -Node: Using Guile Interactively128497 -Node: Init File129757 -Node: Readline130297 -Node: Value History131010 -Node: REPL Commands133104 -Node: Help Commands134457 -Node: Module Commands135807 -Node: Language Commands136651 -Node: Compile Commands136879 -Node: Profile Commands137464 -Node: Debug Commands138566 -Node: Inspect Commands141356 -Node: System Commands141683 -Node: Error Handling143566 -Node: Interactive Debugging145016 -Node: Using Guile in Emacs149452 -Node: Using Guile Tools151650 -Node: Installing Site Packages152696 -Node: Distributing Guile Code155339 -Node: Programming in C156610 -Node: Parallel Installations158525 -Ref: Parallel Installations-Footnote-1161435 -Node: Linking Programs With Guile161529 -Node: Guile Initialization Functions162592 -Node: A Sample Guile Main Program164295 -Node: Linking Guile with Libraries168483 -Node: A Sample Guile Extension170542 -Node: General Libguile Concepts172813 -Node: Dynamic Types174482 -Node: Garbage Collection180105 -Ref: Garbage Collection-Footnote-1185462 -Node: Control Flow185723 -Node: Asynchronous Signals191743 -Node: Multi-Threading193647 -Ref: Multi-Threading-Footnote-1201776 -Node: Defining New Foreign Object Types201981 -Node: Defining Foreign Object Types202988 -Node: Creating Foreign Objects204315 -Node: Type Checking of Foreign Objects208247 -Node: Foreign Object Memory Management209295 -Node: Foreign Objects and Scheme216488 -Node: Function Snarfing221637 -Node: Programming Overview226149 -Node: Extending Dia227644 -Node: Dia Objective228640 -Node: Dia Steps230702 -Node: Dia Objects232053 -Node: Dia Primitives237516 -Node: Dia Hook240109 -Node: Dia Structure241164 -Node: Dia Advanced242783 -Node: Scheme vs C247563 -Node: Testbed Example249615 -Ref: Testbed Example-Footnote-1251247 -Node: Programming Options251372 -Node: Available Functionality253915 -Node: Basic Constraints256585 -Node: Style Choices256806 -Node: Program Control257007 -Node: User Programming257182 -Ref: User Programming-Footnote-1260320 -Node: Autoconf Support260602 -Node: Autoconf Background261060 -Node: Autoconf Macros262080 -Node: Using Autoconf Macros268745 -Node: API Reference271357 -Node: API Overview273518 -Node: Deprecation276037 -Node: The SCM Type277169 -Node: Initialization278787 -Node: Snarfing Macros283991 -Node: Data Types287493 -Node: Booleans289257 -Node: Numbers292321 -Node: Numerical Tower293722 -Node: Integers296107 -Node: Reals and Rationals305643 -Node: Complex Numbers311841 -Node: Exactness313530 -Node: Number Syntax316249 -Node: Integer Operations318151 -Node: Comparison320611 -Node: Conversion322295 -Node: Complex323914 -Node: Arithmetic325529 -Node: Scientific336320 -Node: Bitwise Operations338184 -Node: Random343819 -Node: Characters348636 -Node: Character Sets359857 -Node: Character Set Predicates/Comparison360790 -Node: Iterating Over Character Sets361985 -Node: Creating Character Sets365379 -Node: Querying Character Sets369022 -Node: Character-Set Algebra371218 -Node: Standard Character Sets374769 -Node: Strings378214 -Node: String Syntax381493 -Node: String Predicates384115 -Node: String Constructors386555 -Node: List/String Conversion389193 -Node: String Selection390613 -Node: String Modification395990 -Node: String Comparison398041 -Node: String Searching408638 -Node: Alphabetic Case Mapping414223 -Node: Reversing and Appending Strings416785 -Node: Mapping Folding and Unfolding419307 -Node: Miscellaneous String Operations423407 -Node: Representing Strings as Bytes426722 -Node: Conversion to/from C429935 -Node: String Internals440858 -Node: Symbols443178 -Node: Symbol Data446136 -Node: Symbol Keys448455 -Node: Symbol Variables450915 -Node: Symbol Primitives451966 -Node: Symbol Props459436 -Node: Symbol Read Syntax462368 -Node: Symbol Uninterned464589 -Node: Keywords468144 -Node: Why Use Keywords?468790 -Node: Coding With Keywords470716 -Node: Keyword Read Syntax472862 -Node: Keyword Procedures474487 -Node: Pairs478618 -Node: Lists484717 -Ref: Lists-Footnote-1485593 -Node: List Syntax485794 -Ref: List Syntax-Footnote-1486802 -Node: List Predicates486909 -Node: List Constructors487904 -Node: List Selection490144 -Node: Append/Reverse491394 -Node: List Modification493724 -Node: List Searching497113 -Node: List Mapping498742 -Node: Vectors500160 -Node: Vector Syntax501455 -Node: Vector Creation502219 -Node: Vector Accessors504326 -Node: Vector Accessing from C507758 -Node: Uniform Numeric Vectors511477 -Node: Bit Vectors512175 -Node: Bytevectors517443 -Node: Bytevector Endianness519190 -Ref: Bytevector Endianness-Footnote-1520433 -Node: Bytevector Manipulation520681 -Node: Bytevectors as Integers523201 -Node: Bytevectors and Integer Lists529564 -Node: Bytevectors as Floats531461 -Node: Bytevectors as Strings533575 -Node: Bytevectors as Arrays535528 -Node: Bytevectors as Uniform Vectors536257 -Node: Arrays536576 -Node: Array Syntax538682 -Node: Array Procedures541516 -Node: Shared Arrays550688 -Node: Arrays as arrays of arrays556842 -Node: Accessing Arrays from C563454 -Node: VLists576455 -Node: Record Overview581646 -Node: SRFI-9 Records583479 -Node: Records590907 -Node: Structures597350 -Node: Vtables598179 -Node: Structure Basics601052 -Node: Vtable Contents604433 -Node: Meta-Vtables606761 -Node: Vtable Example610984 -Node: Dictionary Types614342 -Node: Association Lists616233 -Node: Alist Key Equality617567 -Node: Adding or Setting Alist Entries618459 -Node: Retrieving Alist Entries623139 -Node: Removing Alist Entries625055 -Node: Sloppy Alist Functions627895 -Node: Alist Example630171 -Node: VHashes631439 -Node: Hash Tables636797 -Node: Hash Table Examples637531 -Node: Hash Table Reference639848 -Node: Other Types649861 -Node: Foreign Objects650538 -Node: Smobs655657 -Node: Procedures665068 -Node: Lambda665803 -Node: Primitive Procedures668882 -Node: Compiled Procedures670518 -Node: Optional Arguments677278 -Node: lambda* and define*678489 -Node: ice-9 optargs682129 -Node: Case-lambda686642 -Node: Higher-Order Functions691166 -Node: Procedure Properties693092 -Node: Procedures with Setters695776 -Ref: Procedures with Setters-Footnote-1698190 -Node: Inlinable Procedures698331 -Node: Macros700212 -Ref: Macros-Footnote-1701869 -Node: Defining Macros701989 -Node: Syntax Rules704780 -Ref: Syntax Rules-Footnote-1715273 -Node: Syntax Case715450 -Node: Syntax Transformer Helpers728010 -Node: Defmacros734264 -Node: Identifier Macros736680 -Node: Syntax Parameters739950 -Ref: Syntax Parameters-Footnote-1743433 -Node: Eval When743544 -Node: Macro Expansion746409 -Node: Hygiene and the Top-Level749155 -Node: Internal Macros753214 -Node: Utility Functions754697 -Node: Equality755456 -Node: Object Properties760623 -Node: Sorting763494 -Node: Copying767948 -Node: General Conversion768818 -Node: Hooks769903 -Node: Hook Example771452 -Node: Hook Reference773347 -Node: C Hooks776912 -Node: GC Hooks781193 -Node: REPL Hooks783464 -Node: Binding Constructs783603 -Node: Top Level784394 -Node: Local Bindings787849 -Node: Internal Definitions791926 -Node: Binding Reflection794620 -Node: Binding Multiple Values795152 -Node: Control Mechanisms795783 -Node: begin797021 -Node: Conditionals799803 -Node: and or804844 -Node: while do806075 -Node: Prompts811379 -Node: Prompt Primitives812256 -Node: Shift and Reset819251 -Node: Continuations822500 -Node: Multiple Values827752 -Node: Exceptions831712 -Node: Exception Objects833713 -Node: Raising and Handling Exceptions842221 -Node: Throw and Catch846040 -Node: Exceptions and C851912 -Node: Error Reporting854527 -Node: Dynamic Wind856516 -Node: Fluids and Dynamic States864294 -Node: Parameters873030 -Node: Handling Errors877907 -Node: Continuation Barriers884773 -Node: Input and Output885972 -Node: Ports887116 -Node: Binary I/O891031 -Node: Encoding895060 -Node: Textual I/O900755 -Node: Simple Output907948 -Node: Buffering909193 -Node: Random Access915004 -Node: Line/Delimited916985 -Node: Default Ports920908 -Node: Port Types924322 -Node: File Ports924778 -Node: Bytevector Ports933001 -Node: String Ports934088 -Node: Custom Ports936795 -Ref: Custom Ports-Footnote-1940967 -Node: Soft Ports941053 -Node: Void Ports942877 -Node: Venerable Port Interfaces943438 -Node: Using Ports from C948113 -Node: I/O Extensions950348 -Node: Non-Blocking I/O959237 -Node: BOM Handling965280 -Node: Regular Expressions969108 -Node: Regexp Functions970290 -Node: Match Structures981134 -Node: Backslash Escapes984339 -Node: LALR(1) Parsing988514 -Node: PEG Parsing989915 -Node: PEG Syntax Reference991383 -Node: PEG API Reference994047 -Node: PEG Tutorial1004703 -Node: PEG Internals1021004 -Node: Read/Load/Eval/Compile1025291 -Node: Scheme Syntax1026606 -Node: Expression Syntax1026928 -Node: Comments1030862 -Node: Block Comments1031794 -Node: Case Sensitivity1033450 -Node: Keyword Syntax1034251 -Node: Reader Extensions1034414 -Node: Scheme Read1035004 -Node: Scheme Write1038381 -Node: Fly Evaluation1041206 -Node: Compilation1046355 -Node: Loading1054379 -Node: Load Paths1058213 -Node: Character Encoding of Source Files1064775 -Node: Delayed Evaluation1068975 -Node: Local Evaluation1070217 -Node: Local Inclusion1072086 -Node: Sandboxed Evaluation1075207 -Node: REPL Servers1088133 -Node: Cooperative REPL Servers1090057 -Node: Memory Management1092002 -Node: Garbage Collection Functions1092601 -Ref: Garbage Collection Functions-Footnote-11095575 -Node: Memory Blocks1095793 -Ref: Memory Blocks-Footnote-11102409 -Ref: Memory Blocks-Footnote-21102529 -Node: Weak References1102833 -Node: Weak hash tables1104752 -Node: Weak vectors1106394 -Node: Guardians1107664 -Node: Modules1110470 -Node: General Information about Modules1112761 -Node: Using Guile Modules1114475 -Node: Creating Guile Modules1120382 -Ref: Creating Guile Modules-Footnote-11129290 -Node: Modules and the File System1129450 -Node: R6RS Version References1131207 -Node: R6RS Libraries1133914 -Node: Variables1139335 -Node: Module System Reflection1142250 -Node: Declarative Modules1146788 -Node: Accessing Modules from C1152662 -Node: provide and require1159553 -Node: Environments1160412 -Node: Foreign Function Interface1162477 -Node: Foreign Libraries1163566 -Ref: Foreign Libraries-Footnote-11168355 -Node: Foreign Functions1168639 -Node: C Extensions1172706 -Node: Modules and Extensions1176799 -Node: Foreign Pointers1180496 -Node: Foreign Types1181250 -Node: Foreign Variables1183392 -Node: Void Pointers and Byte Access1186530 -Node: Foreign Structs1192586 -Node: Dynamic FFI1194861 -Ref: Dynamic FFI-Footnote-11201328 -Node: Scheduling1201415 -Node: Threads1202126 -Node: Thread Local Variables1207662 -Node: Asyncs1210399 -Node: Atomics1216560 -Node: Mutexes and Condition Variables1219179 -Node: Blocking1231580 -Node: Futures1234522 -Node: Parallel Forms1238903 -Node: Options and Config1243354 -Node: Build Config1244633 -Node: Feature Tracking1248823 -Node: Feature Manipulation1249680 -Node: Common Feature Symbols1250573 -Node: Runtime Options1255329 -Node: Other Languages1257592 -Node: Using Other Languages1258555 -Node: Emacs Lisp1260306 -Node: Nil1261246 -Node: Dynamic Binding1265995 -Node: Other Elisp Features1266373 -Node: ECMAScript1266751 -Node: Internationalization1267639 -Ref: Internationalization-Footnote-11268606 -Node: i18n Introduction1268710 -Node: Text Collation1272429 -Node: Character Case Mapping1274767 -Node: Number Input and Output1277055 -Node: Accessing Locale Information1279820 -Node: Gettext Support1287910 -Ref: Gettext Support-Footnote-11293896 -Node: Debugging1294235 -Node: Evaluation Model1295072 -Node: Stack Capture1297309 -Node: Stacks1299963 -Node: Frames1301273 -Node: Source Properties1304181 -Node: Programmatic Error Handling1307939 -Node: Catching Exceptions1308706 -Node: Pre-Unwind Debugging1310224 -Node: Standard Error Handling1312768 -Node: Stack Overflow1315357 -Node: Debug Options1322806 -Node: Traps1324786 -Node: VM Hooks1326507 -Node: Trap Interface1330640 -Node: Low-Level Traps1333497 -Node: Tracing Traps1338212 -Node: Trap States1342088 -Node: High-Level Traps1343742 -Node: GDB Support1347673 -Node: Code Coverage1349007 -Node: Guile Modules1351889 -Node: SLIB1353421 -Node: SLIB installation1354496 -Node: JACAL1355822 -Node: POSIX1356405 -Node: Conventions1357554 -Node: Ports and File Descriptors1360939 -Node: File System1380207 -Node: User Information1398476 -Node: Time1402422 -Node: Runtime Environment1410065 -Node: Processes1414547 -Node: Signals1430328 -Node: Terminals and Ptys1439788 -Node: Pipes1441359 -Ref: Pipes-Footnote-11446177 -Node: Networking1446302 -Node: Network Address Conversion1446591 -Node: Network Databases1449267 -Node: Network Socket Address1464741 -Node: Network Sockets and Communication1469243 -Node: Internet Socket Examples1483543 -Node: System Identification1485443 -Node: Locales1486884 -Node: Encryption1488193 -Node: Web1489456 -Ref: Web-Footnote-11491390 -Node: Types and the Web1491474 -Node: URIs1496664 -Node: HTTP1504591 -Node: HTTP Headers1510980 -Node: Transfer Codings1527179 -Node: Requests1529724 -Node: Responses1536530 -Node: Web Client1542261 -Ref: http-request1543879 -Node: Web Server1548629 -Node: Web Examples1557505 -Node: getopt-long1564735 -Node: getopt-long Example1566383 -Node: Option Specification1568952 -Node: Command Line Format1572257 -Node: getopt-long Reference1575111 -Node: option-ref Reference1578960 -Node: SRFI Support1579695 -Node: About SRFI Usage1582883 -Node: SRFI-01584607 -Node: SRFI-11588166 -Node: SRFI-1 Constructors1589486 -Node: SRFI-1 Predicates1590988 -Node: SRFI-1 Selectors1593762 -Node: SRFI-1 Length Append etc1595627 -Node: SRFI-1 Fold and Map1598175 -Node: SRFI-1 Filtering and Partitioning1606585 -Node: SRFI-1 Searching1608267 -Node: SRFI-1 Deleting1612755 -Node: SRFI-1 Association Lists1615100 -Node: SRFI-1 Set Operations1617392 -Node: SRFI-21625699 -Node: SRFI-41628216 -Node: SRFI-4 Overview1629527 -Node: SRFI-4 API1632133 -Node: SRFI-4 and Bytevectors1646736 -Node: SRFI-4 Extensions1648010 -Node: SRFI-61649647 -Node: SRFI-81650171 -Node: SRFI-91650436 -Node: SRFI-101650809 -Node: SRFI-111654618 -Node: SRFI-131655517 -Node: SRFI-141655732 -Node: SRFI-161655982 -Node: SRFI-171656302 -Node: SRFI-181658025 -Node: SRFI-18 Threads1659154 -Node: SRFI-18 Mutexes1663511 -Node: SRFI-18 Condition variables1665427 -Node: SRFI-18 Time1667095 -Node: SRFI-18 Exceptions1668345 -Node: SRFI-191670973 -Node: SRFI-19 Introduction1671444 -Node: SRFI-19 Time1673252 -Node: SRFI-19 Date1677103 -Node: SRFI-19 Time/Date conversions1679943 -Node: SRFI-19 Date to string1682743 -Node: SRFI-19 String to date1685935 -Node: SRFI-231689408 -Node: SRFI-261689618 -Node: SRFI-271692950 -Node: SRFI-27 Default Random Source1693781 -Node: SRFI-27 Random Sources1694780 -Node: SRFI-27 Random Number Generators1696512 -Node: SRFI-281698973 -Node: SRFI-301699964 -Node: SRFI-311700274 -Node: SRFI-341701183 -Node: SRFI-351702545 -Node: SRFI-371708565 -Node: SRFI-381712336 -Node: SRFI-391716939 -Node: SRFI-411717822 -Node: SRFI-41 Stream Fundamentals1718624 -Node: SRFI-41 Stream Primitives1719746 -Node: SRFI-41 Stream Library1723876 -Node: SRFI-421743970 -Node: SRFI-431744217 -Node: SRFI-43 Constructors1744796 -Node: SRFI-43 Predicates1747886 -Node: SRFI-43 Selectors1748702 -Node: SRFI-43 Iteration1749053 -Node: SRFI-43 Searching1751288 -Node: SRFI-43 Mutators1755031 -Node: SRFI-43 Conversion1756655 -Node: SRFI-451757966 -Node: SRFI-461762720 -Node: SRFI-551763139 -Node: SRFI-601764158 -Node: SRFI-611768083 -Node: SRFI-621768591 -Node: SRFI-641768864 -Node: SRFI-671769129 -Node: SRFI-691769372 -Node: SRFI-69 Creating hash tables1770170 -Node: SRFI-69 Accessing table items1772924 -Node: SRFI-69 Table properties1774653 -Node: SRFI-69 Hash table algorithms1775767 -Node: SRFI-711776882 -Node: SRFI-871777417 -Node: SRFI-881777718 -Node: SRFI-981779157 -Node: SRFI-1051779944 -Node: SRFI-1111782019 -Node: SRFI-1711782625 -Node: SRFI-171 General Discussion1784641 -Node: SRFI-171 Applying Transducers1787701 -Node: SRFI-171 Reducers1789775 -Node: SRFI-171 Transducers1791692 -Node: SRFI-171 Helpers1797404 -Node: R6RS Support1799557 -Node: R6RS Incompatibilities1799965 -Node: R6RS Standard Libraries1804006 -Node: Library Usage1807199 -Node: rnrs base1807932 -Node: rnrs unicode1821080 -Node: rnrs bytevectors1824184 -Node: rnrs lists1824541 -Node: rnrs sorting1827659 -Node: rnrs control1828984 -Node: R6RS Records1830215 -Node: rnrs records syntactic1833816 -Node: rnrs records procedural1837913 -Node: rnrs records inspection1840636 -Node: rnrs exceptions1842436 -Node: rnrs conditions1844393 -Node: R6RS I/O Conditions1852023 -Node: R6RS Transcoders1854939 -Node: rnrs io ports1863381 -Node: R6RS File Ports1871757 -Node: rnrs io simple1877460 -Node: rnrs files1880468 -Node: rnrs programs1880956 -Node: rnrs arithmetic fixnums1881558 -Node: rnrs arithmetic flonums1887972 -Node: rnrs arithmetic bitwise1893264 -Node: rnrs syntax-case1896344 -Node: rnrs hashtables1899556 -Node: rnrs enums1905444 -Node: rnrs1909134 -Node: rnrs eval1909619 -Node: rnrs mutable-pairs1910494 -Node: rnrs mutable-strings1911127 -Node: rnrs r5rs1911783 -Node: R7RS Support1912996 -Node: R7RS Incompatibilities1913723 -Node: R7RS Standard Libraries1915435 -Node: Pattern Matching1918229 -Node: Readline Support1928931 -Node: Loading Readline Support1929693 -Node: Readline Options1931808 -Node: Readline Functions1933183 -Node: Pretty Printing1938374 -Ref: Pretty Printing-Footnote-11942419 -Node: Formatted Output1942573 -Ref: Formatted Output-Footnote-11972480 -Node: File Tree Walk1972551 -Node: Queues1985449 -Node: Streams1988364 -Node: Buffered Input1993470 -Node: Expect1995737 -Node: sxml-match2001862 -Ref: sxml-match-Footnote-12014134 -Node: The Scheme shell (scsh)2014387 -Node: Curried Definitions2015169 -Node: Statprof2016891 -Node: SXML2026290 -Node: SXML Overview2027579 -Node: Reading and Writing XML2027764 -Node: SSAX2034077 -Node: Transforming SXML2043174 -Node: SXML Tree Fold2046210 -Node: SXPath2049869 -Ref: sxpath-procedure-docs2063300 -Node: sxml ssax input-parse2064487 -Node: sxml apply-templates2066607 -Node: Texinfo Processing2067756 -Node: texinfo2068457 -Ref: texinfo call-with-file-and-dir2070005 -Ref: texinfo texi-command-specs2070349 -Ref: texinfo texi-command-depth2070383 -Ref: texinfo texi-fragment->stexi2070852 -Ref: texinfo texi->stexi2071070 -Ref: texinfo stexi->sxml2071267 -Node: texinfo docbook2071609 -Ref: texinfo docbook *sdocbook->stexi-rules*2072162 -Ref: texinfo docbook *sdocbook-block-commands*2072201 -Ref: texinfo docbook sdocbook-flatten2072242 -Ref: texinfo docbook filter-empty-elements2073640 -Ref: texinfo docbook replace-titles2073800 -Node: texinfo html2074228 -Ref: texinfo html add-ref-resolver!2074909 -Ref: texinfo html stexi->shtml2075309 -Ref: texinfo html urlify2075474 -Node: texinfo indexing2075500 -Ref: texinfo indexing stexi-extract-index2075942 -Node: texinfo string-utils2076567 -Ref: texinfo string-utils escape-special-chars2076938 -Ref: texinfo string-utils transform-string2077666 -Ref: texinfo string-utils expand-tabs2079510 -Ref: texinfo string-utils center-string2079748 -Ref: texinfo string-utils left-justify-string2080477 -Ref: texinfo string-utils right-justify-string2080791 -Ref: texinfo string-utils collapse-repeated-chars2081097 -Ref: texinfo string-utils make-text-wrapper2081596 -Ref: texinfo string-utils fill-string2083750 -Ref: texinfo string-utils string->wrapped-lines2084053 -Node: texinfo plain-text2084430 -Ref: texinfo plain-text stexi->plain-text2084799 -Node: texinfo serialize2085096 -Ref: texinfo serialize stexi->texi2085392 -Node: texinfo reflection2085474 -Ref: texinfo reflection module-stexi-documentation2085895 -Ref: texinfo reflection script-stexi-documentation2086137 -Ref: texinfo reflection object-stexi-documentation2086383 -Ref: texinfo reflection package-stexi-standard-copying2086441 -Ref: texinfo reflection package-stexi-standard-titlepage2086744 -Ref: texinfo reflection package-stexi-generic-menu2087327 -Ref: texinfo reflection package-stexi-standard-menu2087580 -Ref: texinfo reflection package-stexi-extended-menu2087764 -Ref: texinfo reflection package-stexi-standard-prologue2087954 -Ref: texinfo reflection package-stexi-documentation2088665 -Ref: texinfo reflection package-stexi-documentation-for-include2089667 -Node: GOOPS2090621 -Node: Copyright Notice2091873 -Node: Class Definition2092722 -Ref: Class Definition-Footnote-12095922 -Ref: Class Definition-Footnote-22095991 -Ref: Class Definition-Footnote-32096164 -Node: Instance Creation2096359 -Node: Slot Options2098836 -Node: Slot Description Example2107751 -Node: Methods and Generic Functions2111916 -Node: Accessors2117520 -Node: Extending Primitives2118503 -Node: Merging Generics2119712 -Ref: Merging Generics-Footnote-12122539 -Node: Next-method2122695 -Node: Generic Function and Method Examples2124450 -Ref: fig:newplus2127300 -Ref: Generic Function and Method Examples-Footnote-12129259 -Node: Handling Invocation Errors2129463 -Node: Inheritance2130946 -Ref: fig:hier2131936 -Node: Class Precedence List2133059 -Ref: Class Precedence List-Footnote-12136383 -Node: Sorting Methods2136507 -Node: Introspection2137502 -Node: Classes2138645 -Node: Instances2140573 -Node: Slots2141908 -Node: Generic Functions2145215 -Node: Accessing Slots2146959 -Node: GOOPS Error Handling2152897 -Node: GOOPS Object Miscellany2153964 -Node: The Metaobject Protocol2156685 -Node: Metaobjects and the Metaobject Protocol2158371 -Node: Metaclasses2163296 -Node: MOP Specification2165901 -Node: Instance Creation Protocol2167533 -Node: Class Definition Protocol2170941 -Node: Customizing Class Definition2180802 -Node: Method Definition2185795 -Node: Method Definition Internals2186509 -Node: Generic Function Internals2189263 -Node: Generic Function Invocation2191947 -Node: Redefining a Class2192946 -Node: Redefinable Classes2193609 -Node: Default Class Redefinition Behaviour2194875 -Node: Customizing Class Redefinition2197740 -Node: Changing the Class of an Instance2200870 -Node: Guile Implementation2203511 -Ref: Guile Implementation-Footnote-12204770 -Node: History2205019 -Node: The Emacs Thesis2205703 -Node: Early Days2207022 -Node: A Scheme of Many Maintainers2209681 -Node: A Timeline of Selected Guile Releases2212095 -Node: Status2216525 -Node: Data Representation2220218 -Node: A Simple Representation2221847 -Node: Faster Integers2223214 -Node: Cheaper Pairs2226816 -Node: Conservative GC2230141 -Node: The SCM Type in Guile2233882 -Node: Relationship Between SCM and scm_t_bits2235197 -Node: Immediate Objects2236459 -Node: Non-Immediate Objects2239277 -Node: Allocating Heap Objects2241402 -Node: Heap Object Type Information2243196 -Node: Accessing Heap Object Fields2243980 -Node: A Virtual Machine for Guile2246967 -Ref: A Virtual Machine for Guile-Footnote-12248650 -Node: Why a VM?2248831 -Node: VM Concepts2252360 -Node: Stack Layout2253836 -Node: Variables and the VM2257831 -Node: VM Programs2260181 -Node: Object File Format2268359 -Node: Instruction Set2273252 -Node: Call and Return Instructions2277735 -Node: Function Prologue Instructions2281459 -Node: Shuffling Instructions2285696 -Node: Trampoline Instructions2288033 -Node: Non-Local Control Flow Instructions2289512 -Node: Instrumentation Instructions2293201 -Node: Intrinsic Call Instructions2294388 -Node: Constant Instructions2306002 -Node: Memory Access Instructions2309761 -Node: Atomic Memory Access Instructions2311870 -Node: Tagging and Untagging Instructions2313295 -Node: Integer Arithmetic Instructions2314149 -Node: Floating-Point Arithmetic Instructions2316526 -Node: Comparison Instructions2317278 -Node: Branch Instructions2322771 -Node: Raw Memory Access Instructions2324772 -Node: Just-In-Time Native Code2326935 -Node: Compiling to the Virtual Machine2332440 -Node: Compiler Tower2333232 -Node: The Scheme Compiler2338242 -Node: Tree-IL2341724 -Node: Continuation-Passing Style2353259 -Node: An Introduction to CPS2353913 -Node: CPS in Guile2357090 -Node: Building CPS2370693 -Node: CPS Soup2373853 -Node: Compiling CPS2381892 -Node: Bytecode2384564 -Node: Writing New High-Level Languages2390000 -Node: Extending the Compiler2390743 -Node: GNU Free Documentation License2392167 -Node: Concept Index2417532 -Node: Procedure Index2472131 -Node: Variable Index2965620 -Node: Type Index3001170 -Node: R5RS Index3013121 +Node: Reporting Bugs29402 +Node: Hello Scheme!33639 +Node: About Data34841 +Node: Latent Typing35519 +Node: Values and Variables37491 +Node: Definition39484 +Node: About Procedures42124 +Node: Procedures as Values43069 +Node: Simple Invocation45810 +Node: Creating a Procedure47613 +Node: Lambda Alternatives50217 +Node: About Expressions52322 +Node: Evaluating53735 +Ref: Evaluating-Footnote-155943 +Node: Eval Literal56079 +Node: Eval Variable57379 +Node: Eval Procedure58132 +Node: Eval Special61286 +Node: Tail Calls63346 +Node: The REPL66245 +Node: Syntax Summary67305 +Node: About Closure69256 +Node: About Environments70470 +Node: Local Variables72338 +Node: Chaining73896 +Node: Lexical Scope76332 +Node: Scoping Example77830 +Node: Closure81823 +Node: Serial Number84164 +Node: Shared Variable85736 +Node: Callback Closure87354 +Node: OO Closure89641 +Node: Further Reading91934 +Node: Programming in Scheme92819 +Node: Guile Scheme94022 +Node: Invoking Guile94821 +Node: Command-line Options95343 +Node: Environment Variables104670 +Ref: Environment Variables-Footnote-1112679 +Node: Guile Scripting112785 +Node: The Top of a Script File113511 +Node: The Meta Switch115566 +Node: Command Line Handling119676 +Node: Scripting Examples122612 +Node: Using Guile Interactively128830 +Node: Init File130090 +Node: Readline130630 +Node: Value History131343 +Node: REPL Commands133437 +Node: Help Commands134790 +Node: Module Commands136140 +Node: Language Commands136984 +Node: Compile Commands137212 +Node: Profile Commands137797 +Node: Debug Commands138899 +Node: Inspect Commands141689 +Node: System Commands142016 +Node: Error Handling143899 +Node: Interactive Debugging145349 +Node: Using Guile in Emacs149785 +Node: Using Guile Tools151983 +Node: Installing Site Packages153029 +Node: Distributing Guile Code155672 +Node: Programming in C156943 +Node: Parallel Installations158858 +Ref: Parallel Installations-Footnote-1161764 +Node: Linking Programs With Guile161858 +Node: Guile Initialization Functions162921 +Node: A Sample Guile Main Program164624 +Node: Linking Guile with Libraries168812 +Node: A Sample Guile Extension170871 +Node: General Libguile Concepts173142 +Node: Dynamic Types174811 +Node: Garbage Collection180434 +Ref: Garbage Collection-Footnote-1185791 +Node: Control Flow186052 +Node: Asynchronous Signals192072 +Node: Multi-Threading193976 +Ref: Multi-Threading-Footnote-1202105 +Node: Defining New Foreign Object Types202310 +Node: Defining Foreign Object Types203317 +Node: Creating Foreign Objects204644 +Node: Type Checking of Foreign Objects208576 +Node: Foreign Object Memory Management209624 +Node: Foreign Objects and Scheme216817 +Node: Function Snarfing221966 +Node: Programming Overview226478 +Node: Extending Dia227973 +Node: Dia Objective228969 +Node: Dia Steps231031 +Node: Dia Objects232382 +Node: Dia Primitives237845 +Node: Dia Hook240438 +Node: Dia Structure241493 +Node: Dia Advanced243112 +Node: Scheme vs C247892 +Node: Testbed Example249944 +Ref: Testbed Example-Footnote-1251576 +Node: Programming Options251701 +Node: Available Functionality254165 +Node: Basic Constraints256938 +Node: Style Choices257159 +Node: Program Control257360 +Node: User Programming257535 +Ref: User Programming-Footnote-1260673 +Node: Autoconf Support260955 +Node: Autoconf Background261413 +Node: Autoconf Macros262433 +Node: Using Autoconf Macros269098 +Node: API Reference271710 +Node: API Overview273871 +Node: Deprecation276390 +Node: The SCM Type277522 +Node: Initialization279140 +Node: Snarfing Macros284344 +Node: Data Types287846 +Node: Booleans289605 +Node: Numbers292669 +Node: Numerical Tower294070 +Node: Integers296455 +Node: Reals and Rationals305991 +Node: Complex Numbers312189 +Node: Exactness313878 +Node: Number Syntax316597 +Node: Integer Operations318499 +Node: Comparison320959 +Node: Conversion322643 +Node: Complex324262 +Node: Arithmetic325877 +Node: Scientific336668 +Node: Bitwise Operations338532 +Node: Random344167 +Node: Characters348984 +Node: Character Sets360205 +Node: Character Set Predicates/Comparison361138 +Node: Iterating Over Character Sets362333 +Node: Creating Character Sets365727 +Node: Querying Character Sets369370 +Node: Character-Set Algebra371566 +Node: Standard Character Sets375117 +Node: Strings378562 +Node: String Syntax381841 +Node: String Predicates384463 +Node: String Constructors386903 +Node: List/String Conversion389541 +Node: String Selection390961 +Node: String Modification396338 +Ref: x-string-fill!397040 +Node: String Comparison398389 +Node: String Searching408986 +Node: Alphabetic Case Mapping414571 +Node: Reversing and Appending Strings417133 +Node: Mapping Folding and Unfolding419655 +Node: Miscellaneous String Operations423755 +Node: Representing Strings as Bytes427070 +Node: Conversion to/from C430283 +Node: String Internals441206 +Node: Symbols443526 +Node: Symbol Data446417 +Node: Symbol Keys448736 +Node: Symbol Variables451196 +Node: Symbol Primitives452247 +Node: Symbol Read Syntax459723 +Node: Symbol Uninterned461949 +Node: Keywords465504 +Node: Why Use Keywords?466150 +Node: Coding With Keywords468076 +Node: Keyword Read Syntax470222 +Node: Keyword Procedures471847 +Node: Pairs475978 +Node: Lists482077 +Ref: Lists-Footnote-1482953 +Node: List Syntax483154 +Ref: List Syntax-Footnote-1484162 +Node: List Predicates484269 +Node: List Constructors485264 +Node: List Selection487533 +Node: Append/Reverse488783 +Node: List Modification491113 +Node: List Searching494502 +Node: List Mapping496131 +Node: Vectors497549 +Node: Vector Syntax498885 +Node: Vector Creation499649 +Node: Vector Accessors501756 +Ref: x-scm_c_vector_ref502806 +Ref: x-scm_c_vector_set_x503661 +Ref: x-vector-fill!503785 +Ref: x-vector-copy504089 +Ref: x-vector-copy!504352 +Node: Vector Accessing from C506227 +Node: Uniform Numeric Vectors509647 +Node: Bit Vectors510345 +Node: Bytevectors515921 +Node: Bytevector Endianness517668 +Ref: Bytevector Endianness-Footnote-1518911 +Node: Bytevector Manipulation519159 +Ref: Bytevector Manipulation-Footnote-1521953 +Node: Bytevectors as Integers522147 +Node: Bytevectors and Integer Lists528510 +Node: Bytevectors as Floats530407 +Node: Bytevectors as Strings532521 +Node: Bytevectors as Arrays534474 +Node: Bytevectors as Uniform Vectors535203 +Node: Arrays535522 +Node: Array Syntax537628 +Node: Array Procedures540462 +Node: Shared Arrays549634 +Node: Arrays as arrays of arrays555788 +Node: Accessing Arrays from C562384 +Ref: x-scm_array_handle_release566132 +Node: VLists575385 +Node: Record Overview580576 +Node: SRFI-9 Records582409 +Node: Records589837 +Node: Structures596280 +Node: Vtables597109 +Node: Structure Basics599982 +Node: Vtable Contents603363 +Node: Meta-Vtables605691 +Node: Vtable Example609914 +Node: Dictionary Types613272 +Node: Association Lists615163 +Node: Alist Key Equality616497 +Node: Adding or Setting Alist Entries617389 +Node: Retrieving Alist Entries622069 +Node: Removing Alist Entries623985 +Node: Sloppy Alist Functions626825 +Node: Alist Example629101 +Node: VHashes630369 +Node: Hash Tables635727 +Node: Hash Table Examples636461 +Node: Hash Table Reference638778 +Node: Other Types648791 +Node: Procedures649468 +Node: Lambda650208 +Node: Primitive Procedures653290 +Node: Compiled Procedures654926 +Node: Optional Arguments661686 +Node: lambda* and define*662897 +Node: ice-9 optargs666537 +Node: Case-lambda671050 +Node: Higher-Order Functions675574 +Node: Procedure Properties677500 +Node: Procedures with Setters680184 +Ref: Procedures with Setters-Footnote-1682588 +Node: Inlinable Procedures682729 +Node: Macros684610 +Ref: Macros-Footnote-1686265 +Node: Defining Macros686385 +Node: Syntax Rules689174 +Ref: Syntax Rules-Footnote-1699653 +Node: Syntax Case699830 +Node: Syntax Transformer Helpers714161 +Node: Defmacros720667 +Node: Identifier Macros723081 +Node: Syntax Parameters726349 +Ref: Syntax Parameters-Footnote-1729830 +Node: Eval When729941 +Node: Macro Expansion732804 +Node: Hygiene and the Top-Level735548 +Node: Internal Macros739605 +Node: Utility Functions741086 +Node: Equality741843 +Node: Object Properties747008 +Node: Sorting749866 +Node: Copying754318 +Node: General Conversion755279 +Node: Hooks756362 +Node: Hook Example757909 +Node: Hook Reference759802 +Node: C Hooks763365 +Node: GC Hooks767644 +Node: REPL Hooks769913 +Node: Binding Constructs770050 +Node: Top Level770841 +Node: Local Bindings774296 +Node: Internal Definitions778373 +Node: Binding Reflection781067 +Node: Binding Multiple Values781599 +Node: Control Mechanisms782230 +Node: begin783468 +Node: Conditionals786250 +Node: and or791291 +Node: while do792522 +Node: Prompts797826 +Node: Prompt Primitives798703 +Node: Shift and Reset805698 +Node: Continuations808947 +Node: Multiple Values814199 +Node: Exceptions818159 +Node: Exception Objects820160 +Node: Raising and Handling Exceptions828668 +Node: Throw and Catch832487 +Node: Exceptions and C838359 +Node: Error Reporting840974 +Node: Dynamic Wind842963 +Node: Fluids and Dynamic States850741 +Node: Parameters859477 +Node: Handling Errors864354 +Node: Continuation Barriers871220 +Node: Input and Output872419 +Node: Ports873563 +Node: Binary I/O877633 +Node: Encoding881662 +Node: Textual I/O887357 +Node: Simple Output894550 +Node: Buffering895795 +Node: Random Access901606 +Node: Line/Delimited903587 +Node: Default Ports907814 +Node: Port Types911228 +Node: File Ports911684 +Node: Bytevector Ports919907 +Node: String Ports921533 +Node: Custom Ports924240 +Ref: Custom Ports-Footnote-1928412 +Node: Soft Ports928498 +Node: Void Ports930322 +Node: Venerable Port Interfaces930883 +Node: Using Ports from C935558 +Node: I/O Extensions937793 +Node: Non-Blocking I/O946682 +Node: BOM Handling952725 +Node: Regular Expressions956553 +Node: Regexp Functions957735 +Node: Match Structures968579 +Node: Backslash Escapes971784 +Node: LALR(1) Parsing975959 +Node: PEG Parsing977360 +Node: PEG Syntax Reference978828 +Node: PEG API Reference981492 +Node: PEG Tutorial992148 +Node: PEG Internals1008449 +Node: Read/Load/Eval/Compile1012736 +Node: Scheme Syntax1014122 +Node: Expression Syntax1014444 +Node: Comments1018378 +Node: Block Comments1019310 +Node: Case Sensitivity1020966 +Node: Keyword Syntax1021767 +Node: Reader Extensions1021930 +Node: Scheme Read1022520 +Node: Annotated Scheme Read1025847 +Node: Scheme Write1028182 +Node: Fly Evaluation1031017 +Node: Compilation1036166 +Node: Loading1043995 +Node: Load Paths1047829 +Node: Character Encoding of Source Files1054391 +Node: Delayed Evaluation1058591 +Node: Local Evaluation1059835 +Node: Local Inclusion1061704 +Node: Sandboxed Evaluation1064825 +Node: REPL Servers1077751 +Node: Cooperative REPL Servers1079675 +Node: Memory Management1081620 +Node: Garbage Collection Functions1082219 +Ref: Garbage Collection Functions-Footnote-11085193 +Node: Memory Blocks1085411 +Ref: Memory Blocks-Footnote-11092027 +Ref: Memory Blocks-Footnote-21092147 +Node: Weak References1092451 +Node: Weak hash tables1094370 +Node: Weak vectors1096012 +Node: Guardians1097282 +Node: Modules1100088 +Node: General Information about Modules1102379 +Node: Using Guile Modules1104093 +Node: Creating Guile Modules1110000 +Ref: Creating Guile Modules-Footnote-11118908 +Node: Modules and the File System1119068 +Node: R6RS Version References1120825 +Node: R6RS Libraries1123532 +Node: Variables1128953 +Node: Module System Reflection1131868 +Node: Declarative Modules1136406 +Node: Accessing Modules from C1142280 +Node: provide and require1149171 +Node: Environments1150030 +Node: Foreign Function Interface1152095 +Node: Foreign Libraries1153084 +Node: Foreign Extensions1162238 +Node: Foreign Pointers1166469 +Node: Foreign Types1169847 +Node: Foreign Functions1172274 +Node: Void Pointers and Byte Access1174981 +Node: Foreign Structs1181245 +Node: More Foreign Functions1183622 +Ref: More Foreign Functions-Footnote-11188479 +Node: Foreign Objects1188566 +Node: Smobs1193703 +Node: Scheduling1203116 +Node: Threads1203806 +Node: Thread Local Variables1209344 +Node: Asyncs1212081 +Node: Atomics1218242 +Node: Mutexes and Condition Variables1220861 +Node: Blocking1233262 +Node: Futures1236204 +Node: Parallel Forms1240585 +Node: Options and Config1245036 +Node: Build Config1246315 +Node: Feature Tracking1250505 +Node: Feature Manipulation1251362 +Node: Common Feature Symbols1252255 +Node: Runtime Options1257011 +Node: Other Languages1259274 +Node: Using Other Languages1260237 +Node: Emacs Lisp1261988 +Node: Nil1262928 +Node: Dynamic Binding1267677 +Node: Other Elisp Features1268055 +Node: ECMAScript1268433 +Node: Internationalization1269321 +Ref: Internationalization-Footnote-11270288 +Node: i18n Introduction1270392 +Node: Text Collation1274111 +Node: Character Case Mapping1276449 +Node: Number Input and Output1278737 +Node: Accessing Locale Information1281502 +Node: Gettext Support1289592 +Ref: Gettext Support-Footnote-11295578 +Node: Debugging1295917 +Node: Evaluation Model1296754 +Node: Stack Capture1298991 +Node: Stacks1301645 +Node: Frames1302955 +Node: Source Properties1305863 +Node: Programmatic Error Handling1309468 +Node: Catching Exceptions1310235 +Node: Pre-Unwind Debugging1311753 +Node: Standard Error Handling1314297 +Node: Stack Overflow1316886 +Node: Debug Options1324335 +Node: Traps1326315 +Node: VM Hooks1328036 +Node: Trap Interface1332169 +Node: Low-Level Traps1335026 +Node: Tracing Traps1339741 +Node: Trap States1343617 +Node: High-Level Traps1345271 +Node: GDB Support1349202 +Node: Code Coverage1350536 +Node: Guile Modules1353418 +Node: SLIB1354950 +Node: SLIB installation1356025 +Node: JACAL1357351 +Node: POSIX1357934 +Node: Conventions1359083 +Node: Ports and File Descriptors1362468 +Node: File System1381736 +Node: User Information1400857 +Node: Time1404803 +Node: Runtime Environment1412446 +Node: Processes1416928 +Node: Signals1432709 +Node: Terminals and Ptys1442169 +Node: Pipes1443740 +Ref: Pipes-Footnote-11448558 +Node: Networking1448683 +Node: Network Address Conversion1448972 +Node: Network Databases1451648 +Node: Network Socket Address1467122 +Node: Network Sockets and Communication1471624 +Node: Internet Socket Examples1485924 +Node: System Identification1487824 +Node: Locales1489265 +Node: Encryption1490574 +Node: Web1491837 +Ref: Web-Footnote-11493771 +Node: Types and the Web1493855 +Node: URIs1499045 +Node: HTTP1506972 +Node: HTTP Headers1513361 +Node: Transfer Codings1529560 +Node: Requests1532105 +Node: Responses1538911 +Node: Web Client1544642 +Ref: http-request1546260 +Node: Web Server1551010 +Node: Web Examples1559886 +Node: getopt-long1567116 +Node: getopt-long Example1568764 +Node: Option Specification1571333 +Node: Command Line Format1574638 +Node: getopt-long Reference1577492 +Node: option-ref Reference1581341 +Node: SRFI Support1582076 +Node: About SRFI Usage1585264 +Node: SRFI-01586988 +Node: SRFI-11590547 +Node: SRFI-1 Constructors1591867 +Node: SRFI-1 Predicates1593369 +Node: SRFI-1 Selectors1596143 +Node: SRFI-1 Length Append etc1598008 +Node: SRFI-1 Fold and Map1600556 +Node: SRFI-1 Filtering and Partitioning1608966 +Node: SRFI-1 Searching1610648 +Node: SRFI-1 Deleting1615136 +Node: SRFI-1 Association Lists1617481 +Node: SRFI-1 Set Operations1619773 +Node: SRFI-21628080 +Node: SRFI-41630597 +Node: SRFI-4 Overview1631908 +Node: SRFI-4 API1634514 +Node: SRFI-4 and Bytevectors1649117 +Node: SRFI-4 Extensions1650391 +Node: SRFI-61654466 +Node: SRFI-81654990 +Node: SRFI-91655255 +Node: SRFI-101655628 +Node: SRFI-111659437 +Node: SRFI-131660336 +Node: SRFI-141660551 +Node: SRFI-161660801 +Node: SRFI-171661121 +Node: SRFI-181662844 +Node: SRFI-18 Threads1663973 +Node: SRFI-18 Mutexes1668330 +Node: SRFI-18 Condition variables1670246 +Node: SRFI-18 Time1671914 +Node: SRFI-18 Exceptions1673164 +Node: SRFI-191675792 +Node: SRFI-19 Introduction1676263 +Node: SRFI-19 Time1678071 +Node: SRFI-19 Date1681922 +Node: SRFI-19 Time/Date conversions1684762 +Node: SRFI-19 Date to string1687562 +Node: SRFI-19 String to date1690754 +Node: SRFI-231694227 +Node: SRFI-261694437 +Node: SRFI-271697769 +Node: SRFI-27 Default Random Source1698600 +Node: SRFI-27 Random Sources1699599 +Node: SRFI-27 Random Number Generators1701331 +Node: SRFI-281703792 +Node: SRFI-301704783 +Node: SRFI-311705093 +Node: SRFI-341706002 +Node: SRFI-351707364 +Node: SRFI-371713384 +Node: SRFI-381717155 +Node: SRFI-391721758 +Node: SRFI-411722641 +Node: SRFI-41 Stream Fundamentals1723443 +Node: SRFI-41 Stream Primitives1724565 +Node: SRFI-41 Stream Library1728695 +Node: SRFI-421748789 +Node: SRFI-431749036 +Node: SRFI-43 Constructors1749615 +Node: SRFI-43 Predicates1752705 +Node: SRFI-43 Selectors1753521 +Node: SRFI-43 Iteration1753872 +Node: SRFI-43 Searching1756107 +Node: SRFI-43 Mutators1759850 +Node: SRFI-43 Conversion1761474 +Node: SRFI-451762785 +Node: SRFI-461767539 +Node: SRFI-551767958 +Node: SRFI-601768977 +Node: SRFI-611772902 +Node: SRFI-621773410 +Node: SRFI-641773683 +Node: SRFI-671773948 +Node: SRFI-691774191 +Node: SRFI-69 Creating hash tables1774989 +Node: SRFI-69 Accessing table items1777743 +Node: SRFI-69 Table properties1779472 +Node: SRFI-69 Hash table algorithms1780586 +Node: SRFI-711781701 +Node: SRFI-871782236 +Node: SRFI-881782537 +Node: SRFI-981783976 +Node: SRFI-1051784763 +Node: SRFI-1111786838 +Node: SRFI-1711787444 +Node: SRFI-171 General Discussion1789459 +Node: SRFI-171 Applying Transducers1792520 +Node: SRFI-171 Reducers1794597 +Node: SRFI-171 Transducers1796514 +Node: SRFI-171 Helpers1802239 +Node: R6RS Support1804396 +Node: R6RS Incompatibilities1804804 +Node: R6RS Standard Libraries1808845 +Node: Library Usage1812038 +Node: rnrs base1812771 +Node: rnrs unicode1825919 +Node: rnrs bytevectors1829023 +Node: rnrs lists1829380 +Node: rnrs sorting1832498 +Node: rnrs control1833823 +Node: R6RS Records1835054 +Node: rnrs records syntactic1838655 +Node: rnrs records procedural1842752 +Node: rnrs records inspection1845475 +Node: rnrs exceptions1847275 +Node: rnrs conditions1849232 +Node: R6RS I/O Conditions1856862 +Node: R6RS Transcoders1859778 +Node: rnrs io ports1868220 +Node: R6RS File Ports1876488 +Node: rnrs io simple1882191 +Node: rnrs files1885199 +Node: rnrs programs1885687 +Node: rnrs arithmetic fixnums1886289 +Node: rnrs arithmetic flonums1892703 +Node: rnrs arithmetic bitwise1897995 +Node: rnrs syntax-case1901075 +Node: rnrs hashtables1904287 +Node: rnrs enums1910175 +Node: rnrs1913865 +Node: rnrs eval1914350 +Node: rnrs mutable-pairs1915225 +Node: rnrs mutable-strings1915858 +Node: rnrs r5rs1916514 +Node: R7RS Support1917727 +Node: R7RS Incompatibilities1918454 +Node: R7RS Standard Libraries1920166 +Node: Pattern Matching1922960 +Node: Readline Support1933662 +Node: Loading Readline Support1934424 +Node: Readline Options1936539 +Node: Readline Functions1937914 +Node: Pretty Printing1943105 +Ref: Pretty Printing-Footnote-11947150 +Node: Formatted Output1947304 +Ref: Formatted Output-Footnote-11977211 +Node: File Tree Walk1977282 +Node: Queues1990180 +Node: Streams1993095 +Node: Buffered Input1998201 +Node: Expect2000468 +Node: sxml-match2006593 +Ref: sxml-match-Footnote-12018865 +Node: The Scheme shell (scsh)2019118 +Node: Curried Definitions2019900 +Node: Statprof2021622 +Node: SXML2031021 +Node: SXML Overview2032310 +Node: Reading and Writing XML2032495 +Node: SSAX2038808 +Node: Transforming SXML2047905 +Node: SXML Tree Fold2050941 +Node: SXPath2054600 +Ref: sxpath-procedure-docs2068031 +Node: sxml ssax input-parse2069218 +Node: sxml apply-templates2071338 +Node: Texinfo Processing2072487 +Node: texinfo2073188 +Ref: texinfo call-with-file-and-dir2074736 +Ref: texinfo texi-command-specs2075080 +Ref: texinfo texi-command-depth2075114 +Ref: texinfo texi-fragment->stexi2075583 +Ref: texinfo texi->stexi2075801 +Ref: texinfo stexi->sxml2075998 +Node: texinfo docbook2076340 +Ref: texinfo docbook *sdocbook->stexi-rules*2076893 +Ref: texinfo docbook *sdocbook-block-commands*2076932 +Ref: texinfo docbook sdocbook-flatten2076973 +Ref: texinfo docbook filter-empty-elements2078371 +Ref: texinfo docbook replace-titles2078531 +Node: texinfo html2078959 +Ref: texinfo html add-ref-resolver!2079640 +Ref: texinfo html stexi->shtml2080040 +Ref: texinfo html urlify2080205 +Node: texinfo indexing2080231 +Ref: texinfo indexing stexi-extract-index2080673 +Node: texinfo string-utils2081298 +Ref: texinfo string-utils escape-special-chars2081669 +Ref: texinfo string-utils transform-string2082397 +Ref: texinfo string-utils expand-tabs2084241 +Ref: texinfo string-utils center-string2084479 +Ref: texinfo string-utils left-justify-string2085208 +Ref: texinfo string-utils right-justify-string2085522 +Ref: texinfo string-utils collapse-repeated-chars2085828 +Ref: texinfo string-utils make-text-wrapper2086327 +Ref: texinfo string-utils fill-string2088481 +Ref: texinfo string-utils string->wrapped-lines2088784 +Node: texinfo plain-text2089161 +Ref: texinfo plain-text stexi->plain-text2089530 +Node: texinfo serialize2089827 +Ref: texinfo serialize stexi->texi2090123 +Node: texinfo reflection2090205 +Ref: texinfo reflection module-stexi-documentation2090626 +Ref: texinfo reflection script-stexi-documentation2090868 +Ref: texinfo reflection object-stexi-documentation2091114 +Ref: texinfo reflection package-stexi-standard-copying2091172 +Ref: texinfo reflection package-stexi-standard-titlepage2091475 +Ref: texinfo reflection package-stexi-generic-menu2092058 +Ref: texinfo reflection package-stexi-standard-menu2092311 +Ref: texinfo reflection package-stexi-extended-menu2092495 +Ref: texinfo reflection package-stexi-standard-prologue2092685 +Ref: texinfo reflection package-stexi-documentation2093396 +Ref: texinfo reflection package-stexi-documentation-for-include2094398 +Node: GOOPS2095352 +Node: Copyright Notice2096604 +Node: Class Definition2097453 +Ref: Class Definition-Footnote-12100653 +Ref: Class Definition-Footnote-22100722 +Ref: Class Definition-Footnote-32100895 +Node: Instance Creation2101090 +Node: Slot Options2103567 +Node: Slot Description Example2112482 +Node: Methods and Generic Functions2116647 +Node: Accessors2122251 +Node: Extending Primitives2123234 +Node: Merging Generics2124443 +Ref: Merging Generics-Footnote-12127270 +Node: Next-method2127426 +Node: Generic Function and Method Examples2129181 +Ref: fig:newplus2132031 +Ref: Generic Function and Method Examples-Footnote-12133990 +Node: Handling Invocation Errors2134194 +Node: Inheritance2135677 +Ref: fig:hier2136667 +Node: Class Precedence List2137790 +Ref: Class Precedence List-Footnote-12141114 +Node: Sorting Methods2141238 +Node: Introspection2142233 +Node: Classes2143376 +Node: Instances2145304 +Node: Slots2146639 +Node: Generic Functions2149946 +Node: Accessing Slots2151690 +Node: GOOPS Error Handling2157628 +Node: GOOPS Object Miscellany2158695 +Node: The Metaobject Protocol2161416 +Node: Metaobjects and the Metaobject Protocol2163102 +Node: Metaclasses2168027 +Node: MOP Specification2170632 +Node: Instance Creation Protocol2172264 +Node: Class Definition Protocol2175672 +Node: Customizing Class Definition2185533 +Node: Method Definition2190526 +Node: Method Definition Internals2191240 +Node: Generic Function Internals2193994 +Node: Generic Function Invocation2196678 +Node: Redefining a Class2197677 +Node: Redefinable Classes2198340 +Node: Default Class Redefinition Behaviour2199606 +Node: Customizing Class Redefinition2202471 +Node: Changing the Class of an Instance2205601 +Node: Guile Implementation2208242 +Ref: Guile Implementation-Footnote-12209501 +Node: History2209750 +Node: The Emacs Thesis2210434 +Node: Early Days2211753 +Node: A Scheme of Many Maintainers2214412 +Node: A Timeline of Selected Guile Releases2216826 +Node: Status2221256 +Node: Data Representation2224949 +Node: A Simple Representation2226578 +Node: Faster Integers2227945 +Node: Cheaper Pairs2231547 +Node: Conservative GC2234872 +Node: The SCM Type in Guile2238613 +Node: Relationship Between SCM and scm_t_bits2239928 +Node: Immediate Objects2241190 +Node: Non-Immediate Objects2244008 +Node: Allocating Heap Objects2246133 +Node: Heap Object Type Information2247927 +Node: Accessing Heap Object Fields2248711 +Node: A Virtual Machine for Guile2251698 +Ref: A Virtual Machine for Guile-Footnote-12253381 +Node: Why a VM?2253562 +Node: VM Concepts2257091 +Node: Stack Layout2258567 +Node: Variables and the VM2262562 +Node: VM Programs2264912 +Node: Object File Format2273090 +Node: Instruction Set2277983 +Node: Call and Return Instructions2282876 +Node: Function Prologue Instructions2286600 +Node: Shuffling Instructions2290837 +Node: Trampoline Instructions2293174 +Node: Non-Local Control Flow Instructions2294653 +Node: Instrumentation Instructions2298342 +Node: Intrinsic Call Instructions2299529 +Node: Constant Instructions2311143 +Node: Memory Access Instructions2315023 +Node: Atomic Memory Access Instructions2317132 +Node: Tagging and Untagging Instructions2318557 +Node: Integer Arithmetic Instructions2319411 +Node: Floating-Point Arithmetic Instructions2321788 +Node: Comparison Instructions2322540 +Node: Branch Instructions2328221 +Node: Raw Memory Access Instructions2330787 +Node: Just-In-Time Native Code2332950 +Node: Compiling to the Virtual Machine2338455 +Node: Compiler Tower2339247 +Node: The Scheme Compiler2344257 +Node: Tree-IL2347739 +Node: Continuation-Passing Style2359274 +Node: An Introduction to CPS2359928 +Node: CPS in Guile2363105 +Node: Building CPS2377353 +Node: CPS Soup2380568 +Node: Compiling CPS2388607 +Node: Bytecode2391279 +Node: Writing New High-Level Languages2396715 +Node: Extending the Compiler2397458 +Node: GNU Free Documentation License2398882 +Node: Concept Index2424247 +Node: Procedure Index2479284 +Node: Variable Index2974852 +Node: Type Index3010685 +Node: R5RS Index3022709  End Tag Table