commit c2ab661c0234a6b577195927ad33ac98067818b0
parent 0204f40c6fc17b4256f2704525ee44018d81922f
Author: Andres Navarro <canavarro82@gmail.com>
Date: Sat, 25 Feb 2012 21:37:19 -0300
Added error section to the manual.
Diffstat:
14 files changed, 326 insertions(+), 105 deletions(-)
diff --git a/TODO b/TODO
@@ -1,8 +1,5 @@
* Release 0.3
** Documentation:
-*** update the manual with the current features
-**** Add missing sections
-- error
** Test
*** Windows
- build
@@ -10,13 +7,14 @@
*** Linux
- build
- test cases
+*** MacOS
+ - build
+ - test cases
** Fix
*** Windows
- delete-file problem in Windows (do GC and retry)
** Makefile
-- Add a couple of flags to turn debug on/off
-** Webpage
-- Have Maria Sol draw a simple logo
+ - Add a couple of flags to turn debug on/off
* Release 0.4+
** refactor:
*** clean stand alone interpreter
@@ -72,6 +70,8 @@
*** eager comprehensions (at least for check.k) see SRFIs 42 and 78 (srfi)
*** restarts (r7rs/common lisp)
*** check.k as a module
+** webpage
+- Have Maria Sol draw a simple logo
** other
*** add restart support to the repl/interpreter (r7rs)
*** complex numbers (Kernel report)
diff --git a/doc/html/Alphabetical-Index.html b/doc/html/Alphabetical-Index.html
@@ -41,10 +41,10 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Control.html#index-g_t_0024cond-32"><code>$cond</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Environments.html#index-g_t_0024define_0021-110"><code>$define!</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Promises.html#index-g_t_0024delay-160"><code>$delay</code></a>: <a href="Promises.html#Promises">Promises</a></li>
-<li><a href="Libraries.html#index-g_t_0024get_002dregistered_002dlibrary-395"><code>$get-registered-library</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024get_002dregistered_002dlibrary-401"><code>$get-registered-library</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Control.html#index-g_t_0024if-30"><code>$if</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Environments.html#index-g_t_0024import_0021-125"><code>$import!</code></a>: <a href="Environments.html#Environments">Environments</a></li>
-<li><a href="Libraries.html#index-g_t_0024import_002dlibrary_0021-399"><code>$import-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024import_002dlibrary_0021-405"><code>$import-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Combiners.html#index-g_t_0024lambda-134"><code>$lambda</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Promises.html#index-g_t_0024lazy-158"><code>$lazy</code></a>: <a href="Promises.html#Promises">Promises</a></li>
<li><a href="Environments.html#index-g_t_0024let-111"><code>$let</code></a>: <a href="Environments.html#Environments">Environments</a></li>
@@ -56,14 +56,14 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Environments.html#index-g_t_0024letrec_002a-117"><code>$letrec*</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Booleans.html#index-g_t_0024or_003f-19"><code>$or?</code></a>: <a href="Booleans.html#Booleans">Booleans</a></li>
<li><a href="Environments.html#index-g_t_0024provide_0021-124"><code>$provide!</code></a>: <a href="Environments.html#Environments">Environments</a></li>
-<li><a href="Libraries.html#index-g_t_0024provide_002dlibrary_0021-398"><code>$provide-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
-<li><a href="Libraries.html#index-g_t_0024register_002dlibrary_0021-396"><code>$register-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
-<li><a href="Libraries.html#index-g_t_0024registered_002dlibrary_003f-394"><code>$registered-library?</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024provide_002dlibrary_0021-404"><code>$provide-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024register_002dlibrary_0021-402"><code>$register-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024registered_002dlibrary_003f-400"><code>$registered-library?</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Environments.html#index-g_t_0024remote_002deval-120"><code>$remote-eval</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Control.html#index-g_t_0024sequence-31"><code>$sequence</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Environments.html#index-g_t_0024set_0021-123"><code>$set!</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Control.html#index-g_t_0024unless-38"><code>$unless</code></a>: <a href="Control.html#Control">Control</a></li>
-<li><a href="Libraries.html#index-g_t_0024unregister_002dlibrary_0021-397"><code>$unregister-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-g_t_0024unregister_002dlibrary_0021-403"><code>$unregister-library!</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Combiners.html#index-g_t_0024vau-131"><code>$vau</code></a>: <a href="Combiners.html#Combiners">Combiners</a></li>
<li><a href="Control.html#index-g_t_0024when-37"><code>$when</code></a>: <a href="Control.html#Control">Control</a></li>
<li><a href="Numbers.html#index-g_t_002a-184"><code>*</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
@@ -187,8 +187,8 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-copy_002des_002dimmutable_0021-50"><code>copy-es-immutable!</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-cos-225"><code>cos</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Pairs-and-lists.html#index-countable_002dlist_003f-98"><code>countable-list?</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="System.html#index-defined_002denvironment_002dvariable_003f-409"><code>defined-environment-variable?</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="System.html#index-delete_002dfile-405"><code>delete-file</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-defined_002denvironment_002dvariable_003f-415"><code>defined-environment-variable?</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-delete_002dfile-411"><code>delete-file</code></a>: <a href="System.html#System">System</a></li>
<li><a href="Numbers.html#index-denominator-213"><code>denominator</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Format-of-Descriptions.html#index-description-format-7">description format</a>: <a href="Format-of-Descriptions.html#Format-of-Descriptions">Format of Descriptions</a></li>
<li><a href="Characters.html#index-digit_002d_003echar-292"><code>digit->char</code></a>: <a href="Characters.html#Characters">Characters</a></li>
@@ -207,8 +207,13 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Equivalence.html#index-eq_003f-21"><code>eq?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
<li><a href="Equivalence.html#index-equal_003f-22"><code>equal?</code></a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
<li><a href="Equivalence.html#index-equivalence-20">equivalence</a>: <a href="Equivalence.html#Equivalence">Equivalence</a></li>
+<li><a href="Errors.html#index-error-391"><code>error</code></a>: <a href="Errors.html#Errors">Errors</a></li>
<li><a href="Error-Messages.html#index-error-message-notation-6">error message notation</a>: <a href="Error-Messages.html#Error-Messages">Error Messages</a></li>
<li><a href="Continuations.html#index-error_002dcontinuation-148"><code>error-continuation</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
+<li><a href="Errors.html#index-error_002dobject_002dirritants-394"><code>error-object-irritants</code></a>: <a href="Errors.html#Errors">Errors</a></li>
+<li><a href="Errors.html#index-error_002dobject_002dmessage-393"><code>error-object-message</code></a>: <a href="Errors.html#Errors">Errors</a></li>
+<li><a href="Errors.html#index-error_002dobject_003f-390"><code>error-object?</code></a>: <a href="Errors.html#Errors">Errors</a></li>
+<li><a href="Errors.html#index-Errors-389">Errors</a>: <a href="Errors.html#Errors">Errors</a></li>
<li><a href="Environments.html#index-eval-108"><code>eval</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Environments.html#index-eval_002dstring-122"><code>eval-string</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Evaluation-Notation.html#index-evaluation-notation-3">evaluation notation</a>: <a href="Evaluation-Notation.html#Evaluation-Notation">Evaluation Notation</a></li>
@@ -219,7 +224,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Numbers.html#index-exp-222"><code>exp</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-expt-221"><code>expt</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Continuations.html#index-extend_002dcontinuation-144"><code>extend-continuation</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
-<li><a href="System.html#index-file_002dexists-404"><code>file-exists</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-file_002dexists-410"><code>file-exists</code></a>: <a href="System.html#System">System</a></li>
<li><a href="Ports.html#index-file_002dport_003f-299"><code>file-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-filter-94"><code>filter</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Ports.html#index-find_002drequired_002dfilename-347"><code>find-required-filename</code></a>: <a href="Ports.html#Ports">Ports</a></li>
@@ -235,15 +240,15 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Environments.html#index-get_002dcurrent_002denvironment-113"><code>get-current-environment</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Ports.html#index-get_002dcurrent_002derror_002dport-308"><code>get-current-error-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Ports.html#index-get_002dcurrent_002dinput_002dport-306"><code>get-current-input-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="System.html#index-get_002dcurrent_002djiffies-402"><code>get-current-jiffies</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002dcurrent_002djiffies-408"><code>get-current-jiffies</code></a>: <a href="System.html#System">System</a></li>
<li><a href="Ports.html#index-get_002dcurrent_002doutput_002dport-307"><code>get-current-output-port</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="System.html#index-get_002dcurrent_002dsecond-401"><code>get-current-second</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="System.html#index-get_002denvironment_002dvariable-410"><code>get-environment-variable</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="System.html#index-get_002denvironment_002dvariables-411"><code>get-environment-variables</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="System.html#index-get_002dinterpreter_002darguments-408"><code>get-interpreter-arguments</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="System.html#index-get_002djiffies_002dper_002dsecond-403"><code>get-jiffies-per-second</code></a>: <a href="System.html#System">System</a></li>
-<li><a href="Libraries.html#index-get_002dlibrary_002denvironment-393"><code>get-library-environment</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
-<li><a href="Libraries.html#index-get_002dlibrary_002dexport_002dlist-392"><code>get-library-export-list</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="System.html#index-get_002dcurrent_002dsecond-407"><code>get-current-second</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002denvironment_002dvariable-416"><code>get-environment-variable</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002denvironment_002dvariables-417"><code>get-environment-variables</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002dinterpreter_002darguments-414"><code>get-interpreter-arguments</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002djiffies_002dper_002dsecond-409"><code>get-jiffies-per-second</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="Libraries.html#index-get_002dlibrary_002denvironment-399"><code>get-library-environment</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-get_002dlibrary_002dexport_002dlist-398"><code>get-library-export-list</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Pairs-and-lists.html#index-get_002dlist_002dmetrics-86"><code>get-list-metrics</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Ports.html#index-get_002dmodule-348"><code>get-module</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Ports.html#index-get_002doutput_002dbytevector-323"><code>get-output-bytevector</code></a>: <a href="Ports.html#Ports">Ports</a></li>
@@ -252,7 +257,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Numbers.html#index-get_002dreal_002dexact_002dprimary-205"><code>get-real-exact-primary</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-get_002dreal_002dinternal_002dbounds-202"><code>get-real-internal-bounds</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-get_002dreal_002dinternal_002dprimary-204"><code>get-real-internal-primary</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
-<li><a href="System.html#index-get_002dscript_002darguments-407"><code>get-script-arguments</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-get_002dscript_002darguments-413"><code>get-script-arguments</code></a>: <a href="System.html#System">System</a></li>
<li><a href="Numbers.html#index-get_002dstring_002darithmetic-210"><code>get-string-arithmetic</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Continuations.html#index-guard_002dcontinuation-145"><code>guard-continuation</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
<li><a href="Continuations.html#index-guard_002ddynamic_002dextent-151"><code>guard-dynamic-extent</code></a>: <a href="Continuations.html#Continuations">Continuations</a></li>
@@ -275,8 +280,8 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Keyed-Variables.html#index-keyed-variables-161">keyed variables</a>: <a href="Keyed-Variables.html#Keyed-Variables">Keyed Variables</a></li>
<li><a href="Numbers.html#index-lcm-200"><code>lcm</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Pairs-and-lists.html#index-length-90"><code>length</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
-<li><a href="Libraries.html#index-libraries-389">libraries</a>: <a href="Libraries.html#Libraries">Libraries</a></li>
-<li><a href="Libraries.html#index-library_003f-390"><code>library?</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-libraries-395">libraries</a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-library_003f-396"><code>library?</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Pairs-and-lists.html#index-list-51"><code>list</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Pairs-and-lists.html#index-list_002a-52"><code>list*</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Bytevectors.html#index-list_002d_003ebytevector-380"><code>list->bytevector</code></a>: <a href="Bytevectors.html#Bytevectors">Bytevectors</a></li>
@@ -296,7 +301,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Environments.html#index-make_002dkernel_002dstandard_002denvironment-114"><code>make-kernel-standard-environment</code></a>: <a href="Environments.html#Environments">Environments</a></li>
<li><a href="Keyed-Variables.html#index-make_002dkeyed_002ddynamic_002dvariable-163"><code>make-keyed-dynamic-variable</code></a>: <a href="Keyed-Variables.html#Keyed-Variables">Keyed Variables</a></li>
<li><a href="Keyed-Variables.html#index-make_002dkeyed_002dstatic_002dvariable-165"><code>make-keyed-static-variable</code></a>: <a href="Keyed-Variables.html#Keyed-Variables">Keyed Variables</a></li>
-<li><a href="Libraries.html#index-make_002dlibrary-391"><code>make-library</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
+<li><a href="Libraries.html#index-make_002dlibrary-397"><code>make-library</code></a>: <a href="Libraries.html#Libraries">Libraries</a></li>
<li><a href="Pairs-and-lists.html#index-make_002dlist-83"><code>make-list</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Strings.html#index-make_002dstring-246"><code>make-string</code></a>: <a href="Strings.html#Strings">Strings</a></li>
<li><a href="Vectors.html#index-make_002dvector-353"><code>make-vector</code></a>: <a href="Vectors.html#Vectors">Vectors</a></li>
@@ -348,6 +353,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Printing-Notation.html#index-printing-notation-5">printing notation</a>: <a href="Printing-Notation.html#Printing-Notation">Printing Notation</a></li>
<li><a href="Promises.html#index-promise_003f-156"><code>promise?</code></a>: <a href="Promises.html#Promises">Promises</a></li>
<li><a href="Promises.html#index-promises-155">promises</a>: <a href="Promises.html#Promises">Promises</a></li>
+<li><a href="Errors.html#index-raise-392"><code>raise</code></a>: <a href="Errors.html#Errors">Errors</a></li>
<li><a href="Numbers.html#index-rational_003f-171"><code>rational?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Numbers.html#index-rationalize-218"><code>rationalize</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Ports.html#index-read-324"><code>read</code></a>: <a href="Ports.html#Ports">Ports</a></li>
@@ -360,7 +366,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Pairs-and-lists.html#index-reduce-99"><code>reduce</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Ports.html#index-register_002drequirement_0021-345"><code>register-requirement!</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Ports.html#index-registered_002drequirement_003f-344"><code>registered-requirement?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
-<li><a href="System.html#index-rename_002dfile-406"><code>rename-file</code></a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-rename_002dfile-412"><code>rename-file</code></a>: <a href="System.html#System">System</a></li>
<li><a href="Ports.html#index-require-343"><code>require</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Pairs-and-lists.html#index-reverse-85"><code>reverse</code></a>: <a href="Pairs-and-lists.html#Pairs-and-lists">Pairs and lists</a></li>
<li><a href="Numbers.html#index-robust_003f-176"><code>robust?</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
@@ -408,7 +414,7 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Symbols.html#index-symbol_002d_003estring-25"><code>symbol->string</code></a>: <a href="Symbols.html#Symbols">Symbols</a></li>
<li><a href="Symbols.html#index-symbol_003f-24"><code>symbol?</code></a>: <a href="Symbols.html#Symbols">Symbols</a></li>
<li><a href="Symbols.html#index-symbols-23">symbols</a>: <a href="Symbols.html#Symbols">Symbols</a></li>
-<li><a href="System.html#index-system-400">system</a>: <a href="System.html#System">System</a></li>
+<li><a href="System.html#index-system-406">system</a>: <a href="System.html#System">System</a></li>
<li><a href="Numbers.html#index-tan-226"><code>tan</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
<li><a href="Ports.html#index-textual_002dport_003f-297"><code>textual-port?</code></a>: <a href="Ports.html#Ports">Ports</a></li>
<li><a href="Numbers.html#index-truncate-216"><code>truncate</code></a>: <a href="Numbers.html#Numbers">Numbers</a></li>
@@ -471,8 +477,9 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a href="Alphabetical-Index.html#toc_Ports">17 Ports</a></li>
<li><a href="Alphabetical-Index.html#toc_Vectors">18 Vectors</a></li>
<li><a href="Alphabetical-Index.html#toc_Bytevectors">19 Bytevectors</a></li>
-<li><a href="Alphabetical-Index.html#toc_Libraries">20 Libraries</a></li>
-<li><a href="Alphabetical-Index.html#toc_System">21 System</a></li>
+<li><a href="Alphabetical-Index.html#toc_Errors">20 Errors</a></li>
+<li><a href="Alphabetical-Index.html#toc_Libraries">21 Libraries</a></li>
+<li><a href="Alphabetical-Index.html#toc_System">22 System</a></li>
<li><a href="Alphabetical-Index.html#toc_Alphabetical-Index">Index</a></li>
</ul>
</div>
@@ -527,8 +534,9 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<li><a name="toc_Ports" href="Ports.html#Ports">17 Ports</a>
<li><a name="toc_Vectors" href="Vectors.html#Vectors">18 Vectors</a>
<li><a name="toc_Bytevectors" href="Bytevectors.html#Bytevectors">19 Bytevectors</a>
-<li><a name="toc_Libraries" href="Libraries.html#Libraries">20 Libraries</a>
-<li><a name="toc_System" href="System.html#System">21 System</a>
+<li><a name="toc_Errors" href="Errors.html#Errors">20 Errors</a>
+<li><a name="toc_Libraries" href="Libraries.html#Libraries">21 Libraries</a>
+<li><a name="toc_System" href="System.html#System">22 System</a>
<li><a name="toc_Alphabetical-Index" href="Alphabetical-Index.html#Alphabetical-Index">Index</a>
</li></ul>
</div>
diff --git a/doc/html/Bytevectors.html b/doc/html/Bytevectors.html
@@ -6,7 +6,7 @@
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="prev" href="Vectors.html#Vectors" title="Vectors">
-<link rel="next" href="Libraries.html#Libraries" title="Libraries">
+<link rel="next" href="Errors.html#Errors" title="Errors">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
@@ -25,7 +25,7 @@
<div class="node">
<a name="Bytevectors"></a>
<p>
-Next: <a rel="next" accesskey="n" href="Libraries.html#Libraries">Libraries</a>,
+Next: <a rel="next" accesskey="n" href="Errors.html#Errors">Errors</a>,
Previous: <a rel="previous" accesskey="p" href="Vectors.html#Vectors">Vectors</a>,
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
diff --git a/doc/html/Errors.html b/doc/html/Errors.html
@@ -0,0 +1,95 @@
+<html lang="en">
+<head>
+<title>Errors - klisp Reference Manual</title>
+<meta http-equiv="Content-Type" content="text/html">
+<meta name="description" content="klisp Reference Manual">
+<meta name="generator" content="makeinfo 4.13">
+<link title="Top" rel="start" href="index.html#Top">
+<link rel="prev" href="Bytevectors.html#Bytevectors" title="Bytevectors">
+<link rel="next" href="Libraries.html#Libraries" title="Libraries">
+<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
+<meta http-equiv="Content-Style-Type" content="text/css">
+<style type="text/css"><!--
+ pre.display { font-family:inherit }
+ pre.format { font-family:inherit }
+ pre.smalldisplay { font-family:inherit; font-size:smaller }
+ pre.smallformat { font-family:inherit; font-size:smaller }
+ pre.smallexample { font-size:smaller }
+ pre.smalllisp { font-size:smaller }
+ span.sc { font-variant:small-caps }
+ span.roman { font-family:serif; font-weight:normal; }
+ span.sansserif { font-family:sans-serif; font-weight:normal; }
+--></style>
+</head>
+<body>
+<div class="node">
+<a name="Errors"></a>
+<p>
+Next: <a rel="next" accesskey="n" href="Libraries.html#Libraries">Libraries</a>,
+Previous: <a rel="previous" accesskey="p" href="Bytevectors.html#Bytevectors">Bytevectors</a>,
+Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
+<hr>
+</div>
+
+<!-- node-name, next, previous, up -->
+<h2 class="chapter">20 Errors</h2>
+
+<p><a name="index-Errors-389"></a>
+An error object contains information that can be used to describe an
+error that occured in the klisp system. The interpreter will pass an
+error object to an error continuation whenever it needs to signal that
+an error occured while executing a program or evaluating an
+expression.
+
+ <p>An error object contains a message describing the situation and a
+(possibly empty) list of objects, called its irritants, that provide
+some context or additional info depending on the error condition. The
+error type is encapsulated.
+
+ <p>Notice that unlike in most other languages, the error object in klisp
+isn't used to classify the error in error handlers, the error
+continuation being passed the error object is used for that. The
+error object is used only to convey additional info, not the type of
+error.
+
+ <p>SOURCE NOTE: The type of object passed to the error continuation is
+not specified in the Kernel Report. This type was inspired by r7rs
+scheme.
+
+<div class="defun">
+— Applicative: <b>error-object?</b> (<var>error-object? . objs</var>)<var><a name="index-error_002dobject_003f-390"></a></var><br>
+<blockquote><p>The primitive type predicate for type error. <code>error-object?</code>
+returns true iff all the objects in <code>objects</code> are of type
+error.
+</p></blockquote></div>
+
+<div class="defun">
+— Applicative: <b>error</b> (<var>error msg . objs</var>)<var><a name="index-error-391"></a></var><br>
+<blockquote><p>Create an error object with message <code>msg</code> and irritants the list
+of objects <code>objs</code> and then send that error object to the error
+continuation. This is the recommended way to signal an error in
+klisp.
+</p></blockquote></div>
+
+<div class="defun">
+— Applicative: <b>raise</b> (<var>raise obj</var>)<var><a name="index-raise-392"></a></var><br>
+<blockquote><p>Send <code>obj</code> to the error continuation. <code>obj</code> needs not be an
+error object, any kind of object can be sent to the error continuation
+(but that's not recommended!).
+</p></blockquote></div>
+
+<div class="defun">
+— Applicative: <b>error-object-message</b> (<var>error-object-message error</var>)<var><a name="index-error_002dobject_002dmessage-393"></a></var><br>
+<blockquote><p>Applicative <code>error-object-message</code> extracts the message of
+<code>error</code>.
+</p></blockquote></div>
+
+<div class="defun">
+— Applicative: <b>error-object-irritants</b> (<var>error-object-irritants error</var>)<var><a name="index-error_002dobject_002dirritants-394"></a></var><br>
+<blockquote><p>Applicative <code>error-object-irritants</code> extracts the irritants of
+<code>error</code>.
+</p></blockquote></div>
+
+<!-- *-texinfo-*- -->
+ </body></html>
+
diff --git a/doc/html/Libraries.html b/doc/html/Libraries.html
@@ -5,7 +5,7 @@
<meta name="description" content="klisp Reference Manual">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
-<link rel="prev" href="Bytevectors.html#Bytevectors" title="Bytevectors">
+<link rel="prev" href="Errors.html#Errors" title="Errors">
<link rel="next" href="System.html#System" title="System">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<meta http-equiv="Content-Style-Type" content="text/css">
@@ -26,15 +26,15 @@
<a name="Libraries"></a>
<p>
Next: <a rel="next" accesskey="n" href="System.html#System">System</a>,
-Previous: <a rel="previous" accesskey="p" href="Bytevectors.html#Bytevectors">Bytevectors</a>,
+Previous: <a rel="previous" accesskey="p" href="Errors.html#Errors">Errors</a>,
Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
<hr>
</div>
<!-- node-name, next, previous, up -->
-<h2 class="chapter">20 Libraries</h2>
+<h2 class="chapter">21 Libraries</h2>
-<p><a name="index-libraries-389"></a>
+<p><a name="index-libraries-395"></a>
Libraries provide a way to organize klisp code with a clean & clear
interface to the rest of the program. They are first class objects
(as all manipulable entities in Kernel, and according to the
@@ -78,7 +78,7 @@ doing things (first class status, exposing of the library register,
etc).
<div class="defun">
-— Applicative: <b>library?</b> (<var>library? . objects</var>)<var><a name="index-library_003f-390"></a></var><br>
+— Applicative: <b>library?</b> (<var>library? . objects</var>)<var><a name="index-library_003f-396"></a></var><br>
<blockquote><p>The primitive type predicate for type library.
<code>library?</code> returns true iff all the objects in <code>objects</code>
are of type library.
@@ -89,7 +89,7 @@ API (i.e. <code>$provide-library!</code> & <code>$import-library!</code>).
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>make-library</b> (<var>make-library bindings</var>)<var><a name="index-make_002dlibrary-391"></a></var><br>
+— Applicative: <b>make-library</b> (<var>make-library bindings</var>)<var><a name="index-make_002dlibrary-397"></a></var><br>
<blockquote><p><code>bindings</code> should be an acyclic list of <code>(symbol . value)</code>
pairs. Each symbol may only occur once in the list.
@@ -102,8 +102,8 @@ their libraries.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-library-export-list</b> (<var>get-library-export-list library</var>)<var><a name="index-get_002dlibrary_002dexport_002dlist-392"></a></var><br>
-— Applicative: <b>get-library-environment</b> (<var>get-library-environment library</var>)<var><a name="index-get_002dlibrary_002denvironment-393"></a></var><br>
+— Applicative: <b>get-library-export-list</b> (<var>get-library-export-list library</var>)<var><a name="index-get_002dlibrary_002dexport_002dlist-398"></a></var><br>
+— Applicative: <b>get-library-environment</b> (<var>get-library-environment library</var>)<var><a name="index-get_002dlibrary_002denvironment-399"></a></var><br>
<blockquote><p><code>get-library-export-list</code> returns the list of symbols exported
from the passed library. <code>get-library-environment</code> returns a
fresh empty environment whose parent has all exported symbols of the
@@ -115,10 +115,10 @@ bindings out of libraries (and into the current environment).
</p></blockquote></div>
<div class="defun">
-— Operative: <b>$registered-library?</b> (<var>$registered-library? name</var>)<var><a name="index-g_t_0024registered_002dlibrary_003f-394"></a></var><br>
-— Operative: <b>$get-registered-library</b> (<var>$get-registered-library name</var>)<var><a name="index-g_t_0024get_002dregistered_002dlibrary-395"></a></var><br>
-— Operative: <b>$register-library!</b> (<var>$register-library! name library</var>)<var><a name="index-g_t_0024register_002dlibrary_0021-396"></a></var><br>
-— Operative: <b>$unregister-library!</b> (<var>$unregister-library! name</var>)<var><a name="index-g_t_0024unregister_002dlibrary_0021-397"></a></var><br>
+— Operative: <b>$registered-library?</b> (<var>$registered-library? name</var>)<var><a name="index-g_t_0024registered_002dlibrary_003f-400"></a></var><br>
+— Operative: <b>$get-registered-library</b> (<var>$get-registered-library name</var>)<var><a name="index-g_t_0024get_002dregistered_002dlibrary-401"></a></var><br>
+— Operative: <b>$register-library!</b> (<var>$register-library! name library</var>)<var><a name="index-g_t_0024register_002dlibrary_0021-402"></a></var><br>
+— Operative: <b>$unregister-library!</b> (<var>$unregister-library! name</var>)<var><a name="index-g_t_0024unregister_002dlibrary_0021-403"></a></var><br>
<blockquote><p><code>name</code> should a an acyclic list of symbols and exact non-negative
integers. Two registered libraries can't have the same name (in the
sense of <code>equal?</code>).
@@ -142,8 +142,8 @@ of libraries are encouraged to use <code>$provide-library!</code> to create
</p></blockquote></div>
<div class="defun">
-— Operative: <b>$provide-library!</b> (<var>$provide-library! name exports . body</var>)<var><a name="index-g_t_0024provide_002dlibrary_0021-398"></a></var><br>
-— Operative: <b>$import-library!</b> (<var>$import-library! . imports</var>)<var><a name="index-g_t_0024import_002dlibrary_0021-399"></a></var><br>
+— Operative: <b>$provide-library!</b> (<var>$provide-library! name exports . body</var>)<var><a name="index-g_t_0024provide_002dlibrary_0021-404"></a></var><br>
+— Operative: <b>$import-library!</b> (<var>$import-library! . imports</var>)<var><a name="index-g_t_0024import_002dlibrary_0021-405"></a></var><br>
<blockquote><p><code>name</code> should be as for <code>register-library!</code> and not already
registered. <code>exports</code> should be a list of <code>(#:export
<export-spec> ...)</code>. Where <code><export spec></code> is either:
diff --git a/doc/html/System.html b/doc/html/System.html
@@ -32,16 +32,16 @@ Up: <a rel="up" accesskey="u" href="index.html#Top">Top</a>
</div>
<!-- node-name, next, previous, up -->
-<h2 class="chapter">21 System</h2>
+<h2 class="chapter">22 System</h2>
-<p><a name="index-system-400"></a>
+<p><a name="index-system-406"></a>
Module System contains some useful features for interacting with the
host environment.
<p>SOURCE NOTE: most of these come from r7rs.
<div class="defun">
-— Applicative: <b>get-current-second</b> (<var>get-current-second</var>)<var><a name="index-get_002dcurrent_002dsecond-401"></a></var><br>
+— Applicative: <b>get-current-second</b> (<var>get-current-second</var>)<var><a name="index-get_002dcurrent_002dsecond-407"></a></var><br>
<blockquote><p>Applicative <code>get-current-second</code> returns the number of seconds
elapsed since the UNIX/POSIX epoch (that is midnight January 1st,
1970, UTC).
@@ -51,7 +51,7 @@ here.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-current-jiffies</b> (<var>get-current-jiffies</var>)<var><a name="index-get_002dcurrent_002djiffies-402"></a></var><br>
+— Applicative: <b>get-current-jiffies</b> (<var>get-current-jiffies</var>)<var><a name="index-get_002dcurrent_002djiffies-408"></a></var><br>
<blockquote><p>Applicative <code>get-current-jiffies</code> returns the number of jiffies
(fractions of a second) elapsed since an arbitrary epoch that may
change in each run of the klisp interpreter. Applicative
@@ -60,19 +60,19 @@ of a second a jiffy represents.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-jiffies-per-second</b> (<var>get-jiffies-per-second</var>)<var><a name="index-get_002djiffies_002dper_002dsecond-403"></a></var><br>
+— Applicative: <b>get-jiffies-per-second</b> (<var>get-jiffies-per-second</var>)<var><a name="index-get_002djiffies_002dper_002dsecond-409"></a></var><br>
<blockquote><p>Applicative <code>get-jiffies-per-second</code> returns a constant
representing the number of jiffies that correspond to one second.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>file-exists</b> (<var>file-exists string</var>)<var><a name="index-file_002dexists-404"></a></var><br>
+— Applicative: <b>file-exists</b> (<var>file-exists string</var>)<var><a name="index-file_002dexists-410"></a></var><br>
<blockquote><p>Predicate <code>file-exists?</code> checks to see if a file named
<code>string</code> exists.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>delete-file</b> (<var>delete-file string</var>)<var><a name="index-delete_002dfile-405"></a></var><br>
+— Applicative: <b>delete-file</b> (<var>delete-file string</var>)<var><a name="index-delete_002dfile-411"></a></var><br>
<blockquote><p><code>string</code> should be the name/path for an existing file.
<p>Applicative <code>delete-file</code> deletes the file named <code>string</code>.
@@ -81,7 +81,7 @@ result returned by <code>delete-file</code> is inert.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>rename-file</b> (<var>rename-file string1 string2</var>)<var><a name="index-rename_002dfile-406"></a></var><br>
+— Applicative: <b>rename-file</b> (<var>rename-file string1 string2</var>)<var><a name="index-rename_002dfile-412"></a></var><br>
<blockquote><p><code>string1</code> should be the name/path for an existing file,
<code>string2</code> should be the name/path for a non existing file.
@@ -95,8 +95,8 @@ quite similar to <code>delete-file</code>.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-script-arguments</b> (<var>get-script-arguments</var>)<var><a name="index-get_002dscript_002darguments-407"></a></var><br>
-— Applicative: <b>get-interpreter-arguments</b> (<var>get-interpreter-arguments</var>)<var><a name="index-get_002dinterpreter_002darguments-408"></a></var><br>
+— Applicative: <b>get-script-arguments</b> (<var>get-script-arguments</var>)<var><a name="index-get_002dscript_002darguments-413"></a></var><br>
+— Applicative: <b>get-interpreter-arguments</b> (<var>get-interpreter-arguments</var>)<var><a name="index-get_002dinterpreter_002darguments-414"></a></var><br>
<blockquote><p>These applicatives return respectively the script and interpreter
arguments. The script arguments are a list of the arguments passed to
the klisp interpreter starting from (and including) the script name.
@@ -107,20 +107,20 @@ name and arguments.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>defined-environment-variable?</b> (<var>defined-environment-variable? string</var>)<var><a name="index-defined_002denvironment_002dvariable_003f-409"></a></var><br>
+— Applicative: <b>defined-environment-variable?</b> (<var>defined-environment-variable? string</var>)<var><a name="index-defined_002denvironment_002dvariable_003f-415"></a></var><br>
<blockquote><p>Predicate <code>defined-environment-variable?</code> returns true iff
<code>string</code> represents a defined envrionment variable.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-environment-variable</b> (<var>get-environment-variable string</var>)<var><a name="index-get_002denvironment_002dvariable-410"></a></var><br>
+— Applicative: <b>get-environment-variable</b> (<var>get-environment-variable string</var>)<var><a name="index-get_002denvironment_002dvariable-416"></a></var><br>
<blockquote><p>Applicative <code>get-environment-variable</code> returns the value of the
environment variable represented by <code>string</code>. If <code>string</code>
doesn't represent a defined environment variable an error is signaled.
</p></blockquote></div>
<div class="defun">
-— Applicative: <b>get-environment-variables</b> (<var>get-environment-variables</var>)<var><a name="index-get_002denvironment_002dvariables-411"></a></var><br>
+— Applicative: <b>get-environment-variables</b> (<var>get-environment-variables</var>)<var><a name="index-get_002denvironment_002dvariables-417"></a></var><br>
<blockquote><!-- TODO xref to alist -->
<p>Applicative <code>get-environment-variable</code> returns an alist
representing the defined environment variables and their values. The
diff --git a/doc/html/index.html b/doc/html/index.html
@@ -55,6 +55,7 @@ Up: <a rel="up" accesskey="u" href="../index.html#dir">(dir)</a>
<li><a href="Ports.html#Ports">Ports</a>: Ports module features.
<li><a href="Vectors.html#Vectors">Vectors</a>: Vectors module features.
<li><a href="Bytevectors.html#Bytevectors">Bytevectors</a>: Bytevectors module features.
+<li><a href="Errors.html#Errors">Errors</a>: Errors module features.
<li><a href="Libraries.html#Libraries">Libraries</a>: Libraries module features.
<li><a href="System.html#System">System</a>: System module features.
<!-- TODO add error objs to both klisp and the manual -->
diff --git a/doc/klisp.info b/doc/klisp.info
@@ -58,6 +58,7 @@ the header "Permission to copy this report", that reads:
* Ports:: Ports module features.
* Vectors:: Vectors module features.
* Bytevectors:: Bytevectors module features.
+* Errors:: Errors module features.
* Libraries:: Libraries module features.
* System:: System module features.
* Alphabetical Index:: Index including concepts, functions, variables,
@@ -3154,7 +3155,7 @@ taken from r7rs scheme.
new immutable vector with the same length and objects as `vector'.
-File: klisp.info, Node: Bytevectors, Next: Libraries, Prev: Vectors, Up: Top
+File: klisp.info, Node: Bytevectors, Next: Errors, Prev: Vectors, Up: Top
19 Bytevectors
**************
@@ -3277,9 +3278,56 @@ are taken from r7rs scheme.
as `bytevector'.
-File: klisp.info, Node: Libraries, Next: System, Prev: Bytevectors, Up: Top
+File: klisp.info, Node: Errors, Next: Libraries, Prev: Bytevectors, Up: Top
-20 Libraries
+20 Errors
+*********
+
+An error object contains information that can be used to describe an
+error that occured in the klisp system. The interpreter will pass an
+error object to an error continuation whenever it needs to signal that
+an error occured while executing a program or evaluating an expression.
+
+ An error object contains a message describing the situation and a
+(possibly empty) list of objects, called its irritants, that provide
+some context or additional info depending on the error condition. The
+error type is encapsulated.
+
+ Notice that unlike in most other languages, the error object in klisp
+isn't used to classify the error in error handlers, the error
+continuation being passed the error object is used for that. The error
+object is used only to convey additional info, not the type of error.
+
+ SOURCE NOTE: The type of object passed to the error continuation is
+not specified in the Kernel Report. This type was inspired by r7rs
+scheme.
+
+ -- Applicative: error-object? (error-object? . objs)
+ The primitive type predicate for type error. `error-object?'
+ returns true iff all the objects in `objects' are of type error.
+
+ -- Applicative: error (error msg . objs)
+ Create an error object with message `msg' and irritants the list
+ of objects `objs' and then send that error object to the error
+ continuation. This is the recommended way to signal an error in
+ klisp.
+
+ -- Applicative: raise (raise obj)
+ Send `obj' to the error continuation. `obj' needs not be an error
+ object, any kind of object can be sent to the error continuation
+ (but that's not recommended!).
+
+ -- Applicative: error-object-message (error-object-message error)
+ Applicative `error-object-message' extracts the message of `error'.
+
+ -- Applicative: error-object-irritants (error-object-irritants error)
+ Applicative `error-object-irritants' extracts the irritants of
+ `error'.
+
+
+File: klisp.info, Node: Libraries, Next: System, Prev: Errors, Up: Top
+
+21 Libraries
************
Libraries provide a way to organize klisp code with a clean & clear
@@ -3456,7 +3504,7 @@ things (first class status, exposing of the library register, etc).
File: klisp.info, Node: System, Next: Alphabetical Index, Prev: Libraries, Up: Top
-21 System
+22 System
*********
Module System contains some useful features for interacting with the
@@ -3716,8 +3764,13 @@ Index
* eq?: Equivalence. (line 12)
* equal?: Equivalence. (line 16)
* equivalence: Equivalence. (line 6)
+* error: Errors. (line 30)
* error message notation: Error Messages. (line 6)
* error-continuation: Continuations. (line 110)
+* error-object-irritants: Errors. (line 44)
+* error-object-message: Errors. (line 41)
+* error-object?: Errors. (line 26)
+* Errors: Errors. (line 6)
* eval: Environments. (line 32)
* eval-string: Environments. (line 183)
* evaluation notation: Evaluation Notation. (line 6)
@@ -3860,6 +3913,7 @@ Index
* printing notation: Printing Notation. (line 6)
* promise?: Promises. (line 31)
* promises: Promises. (line 6)
+* raise: Errors. (line 36)
* rational?: Numbers. (line 81)
* rationalize: Numbers. (line 355)
* read: Ports. (line 204)
@@ -3963,40 +4017,41 @@ Index
Tag Table:
Node: Top703
-Node: License2880
-Node: Introduction4562
-Node: Caveats7495
-Node: Kernel History8281
-Node: Conventions9726
-Node: Some Terms10397
-Node: Evaluation Notation11068
-Node: Printing Notation12089
-Node: Error Messages12565
-Node: Format of Descriptions13213
-Node: A Sample Applicative Description13777
-Node: Acknowledgements15540
-Node: Interpreter15926
-Ref: Command Line Options18226
-Ref: Interpreter Exit Status19160
-Node: Booleans20388
-Node: Equivalence23065
-Node: Symbols23858
-Node: Control25488
-Node: Pairs and lists29579
-Node: Environments48459
-Node: Combiners59132
-Node: Continuations65786
-Node: Encapsulations74329
-Node: Promises75782
-Node: Keyed Variables79937
-Node: Numbers82708
-Node: Strings105162
-Node: Characters112435
-Node: Ports117081
-Node: Vectors140780
-Node: Bytevectors146534
-Node: Libraries152356
-Node: System161121
-Node: Alphabetical Index164619
+Node: License2932
+Node: Introduction4614
+Node: Caveats7547
+Node: Kernel History8333
+Node: Conventions9778
+Node: Some Terms10449
+Node: Evaluation Notation11120
+Node: Printing Notation12141
+Node: Error Messages12617
+Node: Format of Descriptions13265
+Node: A Sample Applicative Description13829
+Node: Acknowledgements15592
+Node: Interpreter15978
+Ref: Command Line Options18278
+Ref: Interpreter Exit Status19212
+Node: Booleans20440
+Node: Equivalence23117
+Node: Symbols23910
+Node: Control25540
+Node: Pairs and lists29631
+Node: Environments48511
+Node: Combiners59184
+Node: Continuations65838
+Node: Encapsulations74381
+Node: Promises75834
+Node: Keyed Variables79989
+Node: Numbers82760
+Node: Strings105214
+Node: Characters112487
+Node: Ports117133
+Node: Vectors140832
+Node: Bytevectors146586
+Node: Errors152405
+Node: Libraries154420
+Node: System163180
+Node: Alphabetical Index166678
End Tag Table
diff --git a/doc/src/Makefile b/doc/src/Makefile
@@ -11,7 +11,9 @@ srcs = klisp.texi index.texi \
numbers.texi strings.texi \
characters.texi ports.texi \
vectors.texi bytevectors.texi \
- libraries.texi system.texi
+ errors.texi \
+ libraries.texi system.texi \
+
#TODO add dvi/pdf output
#TODO check what happens with xrefs
diff --git a/doc/src/bytevectors.texi b/doc/src/bytevectors.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@setfilename ../src/bytevectors
-@node Bytevectors, Libraries, Vectors, Top
+@node Bytevectors, Errors, Vectors, Top
@comment node-name, next, previous, up
@chapter Bytevectors
diff --git a/doc/src/errors.texi b/doc/src/errors.texi
@@ -0,0 +1,58 @@
+@c -*-texinfo-*-
+@setfilename ../src/errors
+
+@node Errors, Libraries, Bytevectors, Top
+@comment node-name, next, previous, up
+
+@chapter Errors
+@cindex Errors
+
+An error object contains information that can be used to describe an
+error that occured in the klisp system. The interpreter will pass an
+error object to an error continuation whenever it needs to signal that
+an error occured while executing a program or evaluating an
+expression.
+
+An error object contains a message describing the situation and a
+(possibly empty) list of objects, called its irritants, that provide
+some context or additional info depending on the error condition. The
+error type is encapsulated.
+
+Notice that unlike in most other languages, the error object in klisp
+isn't used to classify the error in error handlers, the error
+continuation being passed the error object is used for that. The
+error object is used only to convey additional info, not the type of
+error.
+
+SOURCE NOTE: The type of object passed to the error continuation is
+not specified in the Kernel Report. This type was inspired by r7rs
+scheme.
+
+@deffn Applicative error-object? (error-object? . objs)
+The primitive type predicate for type error. @code{error-object?}
+returns true iff all the objects in @code{objects} are of type
+error.
+@end deffn
+
+@deffn Applicative error (error msg . objs)
+Create an error object with message @code{msg} and irritants the list
+of objects @code{objs} and then send that error object to the error
+continuation. This is the recommended way to signal an error in
+klisp.
+@end deffn
+
+@deffn Applicative raise (raise obj)
+Send @code{obj} to the error continuation. @code{obj} needs not be an
+error object, any kind of object can be sent to the error continuation
+(but that's not recommended!).
+@end deffn
+
+@deffn Applicative error-object-message (error-object-message error)
+Applicative @code{error-object-message} extracts the message of
+@code{error}.
+@end deffn
+
+@deffn Applicative error-object-irritants (error-object-irritants error)
+Applicative @code{error-object-irritants} extracts the irritants of
+@code{error}.
+@end deffn
diff --git a/doc/src/klisp.texi b/doc/src/klisp.texi
@@ -112,6 +112,7 @@ permission is granted to copy it in whole or in part without fee.
* Ports:: Ports module features.
* Vectors:: Vectors module features.
* Bytevectors:: Bytevectors module features.
+* Errors:: Errors module features.
* Libraries:: Libraries module features.
* System:: System module features.
@c TODO add error objs to both klisp and the manual
@@ -143,6 +144,7 @@ permission is granted to copy it in whole or in part without fee.
@include ports.texi
@include vectors.texi
@include bytevectors.texi
+@include errors.texi
@include libraries.texi
@include system.texi
diff --git a/doc/src/libraries.texi b/doc/src/libraries.texi
@@ -1,7 +1,7 @@
@c -*-texinfo-*-
@setfilename ../src/libraries
-@node Libraries, System, Bytevectors, Top
+@node Libraries, System, Errors, Top
@comment node-name, next, previous, up
@chapter Libraries
diff --git a/src/kgerrors.c b/src/kgerrors.c
@@ -114,7 +114,7 @@ void kinit_error_ground_env(klisp_State *K)
error_object_irritants, 0);
/* TODO raise-continuable from r7rs doesn't make sense in the Kernel
system of handling continuations.
- What we could have is a more sofisticated system
+ What we could have is a more sophisticated system
of restarts, which would be added to an error object
and would encapsulate continuations and descriptions of them.
It would be accessible with