~ chicken-core (chicken-5) a45bafb3bb60442daea4406bccbd312e5eeee693


commit a45bafb3bb60442daea4406bccbd312e5eeee693
Author:     Peter Bex <peter@more-magic.net>
AuthorDate: Thu May 23 20:53:26 2019 +0200
Commit:     Peter Bex <peter@more-magic.net>
CommitDate: Thu May 23 20:53:26 2019 +0200

    Merge manual with the wiki's latest changes

diff --git a/manual/Debugging b/manual/Debugging
index 1a4231b3..ff267b8d 100644
--- a/manual/Debugging
+++ b/manual/Debugging
@@ -16,7 +16,7 @@ it. You can also run a program explicitly by pressing the {{F1}} key and
 selecting an executable to run. If the executable has been compiled with
 debugging information, it will connect to the debugger and the source code
 of the program will be shown in the debugger window, if the original source
-files of the program are available in the search path (see bwlo for more
+files of the program are available in the search path (see below for more
 details on this.)
 
 To enable debugging in compiled programs a number of requirements must be met:
diff --git a/manual/Egg specification format b/manual/Egg specification format
index 24b45038..234ff674 100644
--- a/manual/Egg specification format	
+++ b/manual/Egg specification format	
@@ -142,14 +142,14 @@ intended for cross compilation.
 
 ==== component-options
 
-[egg property] (component-options OPTIONSPEC ...)
+ [egg property] (component-options OPTIONSPEC ...)
 
 Specifies global options for all programs and extensions compiled for this egg.
 {{OPTIONSPEC}} may be {{csc-options}}, {{link-options}} or {{linkage}} specifications.
 
 ==== cond-expand
 
-[egg property] (cond-expand CLAUSE ...)
+ [egg property] (cond-expand CLAUSE ...)
 
 Conditionally expand egg specification forms, depending on system 
 features. Each {{CLAUSE}} should be of the form 
@@ -165,7 +165,7 @@ forms for constraining mode and linkage.
 
 ==== error
 
-[egg property] (error STRING ARG ...)
+ [egg property] (error STRING ARG ...)
 
 Signal an error and abort processing. Mostly useful inside {{cond-expand}} forms.
 
@@ -210,19 +210,6 @@ Specifies one or more Scheme include files.
 
 Specifies an executable program.
 
-==== c-object
-
- [egg property] (c-object NAME PROP ...)
-
-Specifies a compiled C/C++ object file. Usually this component type
-is required if you want to link a separately compiled C/C++ module
-with your extension or program. C-objects are compiled like Scheme
-source files with the {{csc}} tool to ensure the same C compiler
-options and toolchain is used as for regular Scheme files compiled
-to C. If you want to pass compiler-specific options to the build
-of the C object, use the {{csc-options}} property and precede
-C compiler options with {{-C}}.
-
 === Component properties
 
 ==== host
@@ -295,6 +282,7 @@ are set in the execution environment of the script:
 * {{CHICKEN_CSC}}: path to {{csc}}
 * {{CHICKEN_CSI}}: path to {{csi}}
 
+
 ==== csc-options
 
  [egg property] (csc-options OPTION ...)
@@ -322,6 +310,9 @@ compilation of the extension, so multiple options should be specified
 as {{(link-options "OPT1" "OPT2" ...)}} instead of {{(link-options "OPT1 OPT2")}}
 (the latter would be a single option containing a whitespace character).
 
+Note that in order to pass linker options to the underlying C-compiler, these must
+be prefixed with {{-L}}, eg. {{(link-options "-L" "-lpng")}}.
+
 ==== source
 
  [egg property] (source NAME)
@@ -358,13 +349,6 @@ denote filenames of which the program or extension depends.
 A program or extension implicitly depends on its source file and
 and on the egg-specification file.
 
-==== objects
-
- [egg property] (objects NAME ...)
-
-Specifies that the components of type {{c-object}} should be linked
-to this component and that the object components are dependencies.
-
 ==== destination
 
  [egg property] (destination NAME)
@@ -400,19 +384,6 @@ Specifies modules that the component (usually an extension) contains.
 If this property is not given, then it is assumed that the extension has a single
 module of the same name as the component.
 
-==== cond-expand
-
- [egg property] (cond-expand CLAUSE ...)
-
-Similar to the toplevel {{cond-expand}} clause and may appear inside
-component specifications.
-
-==== error
-
- [egg property] (error STRING ARG ...)
-
-Similar to the toplevel {{error}} form, may appear inside component specifications.
-
 ---
 
 Previous: [[Extension tools]]
diff --git a/manual/Embedding b/manual/Embedding
index a4a5f319..936b7903 100644
--- a/manual/Embedding
+++ b/manual/Embedding
@@ -56,7 +56,7 @@ compiled Scheme program. If the runtime system was not initialized before,
 then {{CHICKEN_initialize}} is called with default sizes.
 {{toplevel}} is the toplevel entry-point procedure, you usually pass {{C_toplevel}} here.
 The result value is the continuation that can be used to re-invoke the Scheme code from the
-point after it called [[Module (chicken gc)#return-to-host|{{return-to-host}}]].
+point after it called [[Module (chicken platform)#return-to-host|{{return-to-host}}]].
 
 If you just need a Scheme interpreter, you can also pass {{CHICKEN_default_toplevel}} as
 the toplevel procedure, which just uses the default library units.
diff --git a/manual/Extension tools b/manual/Extension tools
index dc0fdcd6..c682a03d 100644
--- a/manual/Extension tools	
+++ b/manual/Extension tools	
@@ -127,7 +127,7 @@ and for providing a temporary location for building the eggs before
 they are installed.
 
 By default the cache is located in the directory
-{{.chicken-install.cache}} is the user's home directory ({{$HOME}} on
+{{.chicken-install/cache}} in the user's home directory ({{$HOME}} on
 UNIX, or {{%USERPROFILE%}} on Windows. If the respective environment
 variable is not set, then {{/tmp}} or {{/Temp}} is used.
 
diff --git a/manual/Extensions b/manual/Extensions
index 9a2e9aff..40c9b30c 100644
--- a/manual/Extensions
+++ b/manual/Extensions
@@ -233,7 +233,7 @@ The egg file:
 
 ((components (extension my-lib))
  (version 1.0)
- (licence "BSD")
+ (license "BSD")
  (author "Me again")
  (synopsis "My own cool libraries"))
 </enscript>
diff --git a/manual/Getting started b/manual/Getting started
index 4a1dcc1f..85569770 100644
--- a/manual/Getting started	
+++ b/manual/Getting started	
@@ -84,7 +84,7 @@ CHICKEN includes
 * a compatible compiler whose target is C, thus making porting to new
   machines and architectures relatively straightforward
 * the C support allows Scheme code to include `embedded' C code,
-  thus making it easyto invoke host OS or library
+  thus making it easy to invoke host OS or library
   functions
 * a framework for language extensions, library modules that broaden
   the functionality of the system
@@ -295,7 +295,8 @@ following little program:
 <enscript highlight=scheme>
 ;; irregex, the regular expression library, is one of the
 ;; libraries included with CHICKEN.
-(import (chicken irregex))
+(import (chicken irregex)
+        (chicken io))
 
 (define (process-line line re rplc) 
   (irregex-replace/all re line rplc))
diff --git a/manual/Module (chicken base) b/manual/Module (chicken base)
index 4d8396c9..3a8fab1e 100644
--- a/manual/Module (chicken base)	
+++ b/manual/Module (chicken base)	
@@ -267,6 +267,13 @@ exception-handler. This conforms to
 name of the procedure) where the error occurred.
 
 
+==== assert
+
+<macro>(assert EXP [OBJ ...])</macro>
+
+Evaluates {{EXP}}, if it returns #f, applies {{error}} on {{OBJ ...}}.
+When compiling in unsafe mode, assertions of this kind are disabled.
+
 
 ==== get-call-chain
 
diff --git a/manual/Module (chicken condition) b/manual/Module (chicken condition)
index f9858eeb..522b51f5 100644
--- a/manual/Module (chicken condition)	
+++ b/manual/Module (chicken condition)	
@@ -87,8 +87,8 @@ Signaled on syntax errors.
 exception-handler and the name of the procedure where the error occurred (if
 available).
 
-* When the {{posix}} unit is available and used, then a user-interrupt
-({{signal/int}}) signals an exception of the kind {{user-interrupt}}.
+* Within the interpreter (csi), a user-interrupt ({{signal/int}}) signals an
+exception of the kind {{user-interrupt}}.
 
 * The procedure {{condition-property-accessor}} accepts an optional third
 argument. If the condition does not have a value for the desired property and
diff --git a/manual/Module (chicken continuation) b/manual/Module (chicken continuation)
index 7018d3c7..4233a88d 100644
--- a/manual/Module (chicken continuation)	
+++ b/manual/Module (chicken continuation)	
@@ -7,9 +7,8 @@ This module provides a more powerful interface for continuations than that
 provided by {{call/cc}}.
 
 More information about this continuation API can be found in the paper
-[[http://repository.readscheme.org/ftp/papers/sw2001/feeley.pdf]] ''A Better
-API for first class Continuations'' by Marc Feeley.
-
+[[http://www.iro.umontreal.ca/~feeley/papers/FeeleySW01.pdf|A Better
+API for First-Class Continuations]] by Marc Feeley.
 
 === Continuations API
 
diff --git a/manual/Module (chicken foreign) b/manual/Module (chicken foreign)
index 17a68e53..87551e40 100644
--- a/manual/Module (chicken foreign)	
+++ b/manual/Module (chicken foreign)	
@@ -11,7 +11,7 @@ Note that this interface is source-based, since CHICKEN translates
 Scheme code to C. It is not binary, as in many other Scheme implementations.
 
 Several special forms of this interface refer to ''foreign type specifiers'', 
-consult the [[relevant chapter|Foreign type specifiers]] of this manual for
+consult the [[Foreign type specifiers|relevant chapter]] of this manual for
 more information.
 
 
diff --git a/manual/Module (chicken random) b/manual/Module (chicken random)
index 24f83028..e86fe481 100644
--- a/manual/Module (chicken random)	
+++ b/manual/Module (chicken random)	
@@ -11,7 +11,7 @@ On Linux, the {{getrandom(2)}} system call is used instead, if available.
 On OpenBSD it is {{arc4random_buf(3)}}, on Windows {{RtlGenRandom}}.
 
 The pseudo random number generator is an implementation of the
-[[WELL512|https://en.wikipedia.org/wiki/Well_equidistributed_long-period_linear]] algorithm.
+[[https://en.wikipedia.org/wiki/Well_equidistributed_long-period_linear]] algorithm.
 
 ==== set-pseudo-random-seed!
 
diff --git a/manual/Module scheme b/manual/Module scheme
index 907736c6..712c21ee 100644
--- a/manual/Module scheme	
+++ b/manual/Module scheme	
@@ -1956,7 +1956,8 @@ See "[[#implementation-restrictions|Implementation restrictions]]".
 
 Radix must be an exact integer.  The R5RS standard only requires
 implementations to support 2, 8, 10, or 16, but CHICKEN allows any
-radix between 2 and 36, inclusive.  If omitted, radix defaults to
+radix between 2 and 36, inclusive (note: a bug in CHICKEN 5 currently 
+limits the upper bound to 16).  If omitted, radix defaults to
 10. The procedure number->string takes a number and a radix and
 returns as a string an external representation of the given number in
 the given radix such that
diff --git a/manual/Types b/manual/Types
index 587cdaa5..1d9eb7b9 100644
--- a/manual/Types
+++ b/manual/Types
@@ -115,13 +115,16 @@ or {{:}} should follow the syntax given below:
 <table>
 <tr><th>BASICTYPE</th><th>meaning</th></tr>
 <tr><td>{{*}}</td><td>any value</td></tr>
+<tr><td>{{bignum}}</td><td>arbitrary precision integer</td></tr>
 <tr><td>{{blob}}</td><td>byte vector</td></tr>
 <tr><td>{{boolean}}</td><td>true or false</td></tr>
 <tr><td>{{char}}</td><td>character</td></tr>
+<tr><td>{{cplxnum}}</td><td>complex number</td></tr>
 <tr><td>{{eof}}</td><td>end-of-file object</td></tr>
 <tr><td>{{false}}</td><td>boolean false</td></tr>
 <tr><td>{{fixnum}}</td><td>word-sized integer</td></tr>
 <tr><td>{{float}}</td><td>floating-point number</td></tr>
+<tr><td>{{integer}}</td><td>exact integer (either fixnum or bignum)</td></tr>
 <tr><td>{{list}}</td><td>null or pair</td></tr>
 <tr><td>{{locative}}</td><td>locative object</td></tr>
 <tr><td>{{null}}</td><td>empty list</td></tr>
@@ -131,6 +134,7 @@ or {{:}} should follow the syntax given below:
 <tr><td>{{pointer}}</td><td>native pointer</td></tr>
 <tr><td>{{input-port}} {{output-port}}</td><td>input- or output-port</td></tr>
 <tr><td>{{procedure}}</td><td>unspecific procedure</td></tr>
+<tr><td>{{ratnum}}</td><td>rational number</td></tr>
 <tr><td>{{string}}</td><td>string</td></tr>
 <tr><td>{{symbol}}</td><td>symbol</td></tr>
 <tr><td>{{true}}</td><td>boolean true</td></tr>
Trap