srfi-9-plus: Enhanced define-record-type in Racket

1Introduction

The srfi-9-plus library (almost completely) implements SRFI-9, and adds a define-record-type/write syntax that is like define-record-type but extended to define a custom writer.

This library does not completely implement SRFI-9 in that the define-record-type defined here requires that the sequence of field tags in the constructor match the initial sequence of field tags defined by the field specs. That feature of SRFI-9 should not be necessary, since the field specs can be ordered to match the desired constructor arguments.

This library was written for adding custom writing to some code that was implemented using SRFI-9, rather than rework that code to use define-struct or make-struct-type directly. srfi-9-plus is currently implemented for Racket as a veneer over make-struct-type, although that is not guaranteed.

3History

Fixed a symbol in an error message. Fixed typo in documentation. Changed references to Scheme to Racket.

Version 0.1 — 2009-11-28 — PLaneT (1 0)

Initial version. Tested lightly.

4Legal

Copyright (c) 2009 – 2011 Neil Van Dyke. This program is Software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 3 of the License (LGPL 3), 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 http://www.gnu.org/licenses/ for details. For other licenses and consulting, please contact the author.

Standard Documentation Format Note: The API
signatures in this documentation are likely incorrect in some regards, such as
indicating type any/c for things that are not, and not indicating when
arguments are optional. This is due to a transitioning from the Texinfo
documentation format to Scribble, which the author intends to finish
someday.