Andre van Tonders macro and module system, with R6RS (draft) / SRFI-83 compliant libraries
This extension is currently unsupported.
For detailed specifications consult the official SRFI documents:
At least CHICKEN version 2.110 is required.
"Curried" define is allowed, as are definitions of the form (define VARIABLE) Note that DSSSL extended lambda lists are currently not available. CHICKEN as of version 2.0 supports the abbreviation #` for quasisyntax
import loads separately compiled libraries automatically. The predefined modules are handled specially since they are bundled in a separate shared object. Other modules are loaded via require by prepending the URI-scheme to the library name (if existing) and converting the library name to a symbol. So for example (import "scheme://syntax-case") would be required as scheme-syntax-case.
Toplevel expressions are by default evaluated in a scope that has the scheme://chicken library imported.
If you need to create a module for pre-existing libraries, create a wrapper module. The special form import-primitives allows importing unqualified toplevel identifiers into the current scope.
This extension is still in an experimental stadium.
Basically any library may be used as the "language" part (the second argument) of a library definition, but it must be available both at compile and run-time. Pre-defined languages are:
Contains all R5RS and non-standard procedures provided by the basic CHICKEN system, that is everything contained in the library and eval library units.
R5RS procedures and syntax, including scheme://syntax-case and SRFI-83.
Non-standard syntax extensions. Note that eval-when is not available and internal define-values is not supported)
Macros for interfacing to foreign code.
Non-standard extensions of the CHICKEN system.
The chicken://tinyclos module exports the define-class, define-generic and define-method syntax. Methods may only be defined on generic functions that have been previously defined with define-generic.
Modules with SRFI functionality.
scheme://syntax-case provides the syntax-case macro and also definessyntax-rules.
Copyright (c) 2005 Andre van Tonder Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the ``Software''), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED ``AS IS'', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.