You are looking at historical revision 18263 of this page. It may differ significantly from its current revision.
static-modules
Description
static-modules is a Scheme implementation of the module system described by Xavier Leroy in the paper A Modular Module System.
Library Procedures
Identifiers
[procedure] ident?[procedure] ident-name
[procedure] ident-stamp
[procedure] ident-create
[procedure] ident-equal?
[procedure] ident-empty
[procedure] ident-add
[procedure] ident-find
Access paths
[procedure] path?[procedure] Pident
[procedure] Pdot
[procedure] path-equal?
[procedure] subst-path
[procedure] subst-identity
Base language syntax
[procedure] (make-core-syntax term? valtype? deftype? kind? make-valtype make-deftype subst-valtype subst-deftype subst-kind)Module language syntax
[procedure] (make-mod-syntax core)modtype? Signature Functorty modspec? Value_sig Type_sig Module_sig modterm? Modid Structure Functor Mapply Constraint moddef? Value_def Type_def Module_def subst-modtype subst-modspec subst-typedecl
Type-checking the base language
[procedure] make-core-typingType-checking the module language
[procedure] make-mod-typingScoping
This library implements generic scoping pass for the module language. This pass is not described in the article.
Scoping is the act of associating identifiers with their binding location. We assume that the parser generates fresh identifiers each time it encounters an occurrence of a lexical identifier in the program, and stores those fresh identifiers in the abstract syntax tree it constructs. The scoping pass rewrites the abstract syntax tree to use identical identifiers at a binding site and at all its usage sites.
[procedure] st-empty[procedure] st-enter-value
[procedure] st-enter-type
[procedure] st-enter-module
[procedure] st-value-path
[procedure] st-type-path
[procedure] st-module-path
[procedure] st-scope-module
Evaluation
Version History
- 1.0 Initial Release
License
static-modules is based on the code and paper by Xavier Leroy (2000): A modular module system. Journal of Functional Programming, 10, pp 269-303
Copyright 2010 Ivan Raikov and the Okinawa Institute of Science and Technology. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at <http://www.gnu.org/licenses/>.