define-for-syntax
hash-table-ref/default
to extras-module
import-primitives
by André van Tonder
define-macro
and include
rec
(SRFI-31), removed hash-table-count
(frome extras module)
regex
and posix
modules were not built, changed define-primitive-module
to work on systems where libffi isn't used (i.e. works around argument limit) [Thanks to Dale Jordan]
(require-extension simple-macros)
For detailed specifications consult the official SRFI documents:
CHICKEN specific notes:
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
.
library
and
eval
library units).eval-when
is not available
define-values
is not supported
The 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
.
syntax-case
. The latter also defines
syntax-rules
.
require-module
form (see below), with the string
"-module" added to the name:
(require-module posix-module)
scheme
and chicken
modules imported. Note that module definitions by default only import the bindings of the scheme
module.
(require-module MODULENAME)
(require-module ...)
, then import
it.
import-primitives
or import-primitives-for-all
allows importing unqualified toplevel identifiers
into the current scope:
;;; my-stuff-module.scm ;; add code here to define, include or require the definition of `my-print' ... (module my-stuff (my-print) ; exported identifiers (import-primitives my-print) )If you compile this file into a shared library, you can load the module by invoking
(require-module my-stuff)and import it's definitions via
(import my-stuff)
[syntax] (define-for-syntax ...)
(begin-for-syntax (define ...))
.
Copyright (C) André van Tonder (2005). All Rights Reserved.
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.