Previous: stdlib records procedural layer, Up: stdlib records [Index]
The (rnrs records inspection (6))
library provides procedures for
inspecting records and their record–type descriptors. These procedures
are designed to allow the writing of portable printers and inspectors.
On the one hand, record?
and record-rtd
treat records of
opaque record types as if they were not records. On the other hand, the
inspection procedures that operate on record–type descriptors
themselves are not affected by opacity. In other words, opacity
controls whether a program can obtain an RTD from a record. If the
program has access to the original RTD via
make-record-type-descriptor
or record-type-descriptor
, it
can still make use of the inspection procedures.
Return #t
if obj is a record, and its record type is not
opaque, and return #f
otherwise.
Return the RTD representing the type of record if the type is
not opaque. The RTD of the most precise type is returned; that is,
the type t such that record is of type t but not of
any type that extends t. If the type is opaque, an exception is
raised with condition type &assertion
.
Return a symbol representing the name of the record–type descriptor rtd.
Return the parent of the record–type descriptor rtd, or #f
if it has none.
Return the UID of the record–type descriptor RTD, or #f
if
it has none. (An implementation may assign a generated UID to a
record type even if the type is generative, so the return of a UID
does not necessarily imply that the type is nongenerative.)
Return #t
if rtd is generative, and #f
if not.
Return #t
if the record-type descriptor is sealed, and #f
if
not.
Return #t
if the the record-type descriptor is opaque, and #f
if not.
Return a vector of symbols naming the fields of the type represented by
rtd (not including the fields of parent types) where the fields
are ordered as described under make-record-type-descriptor
. The
returned vector may be immutable. If the returned vector is modified,
the effect on rtd is unspecified.
Returns #t
if the field specified by k of the type
represented by rtd is mutable, and #f
if not. k is as
in record-accessor
.
Previous: stdlib records procedural layer, Up: stdlib records [Index]