Records inspection

Library (rnrs records syntactic (6))

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.

Function record? obj

[R6RS] Returns #t if obj is a record, and its record type is not opaque, and returns #f otherwise.

Function record-rtd record

[R6RS] Returns 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.

Function record-type-name rtd
Function record-type-parent rtd
Function record-type-uid rtd

[R6RS] Returns the name/parent/uid of the record-type descriptor rtd.

Function record-type-generative? rtd
Function record-type-sealed? rtd
Function record-type-opaque? rtd

[R6RS] Returns #t if the record-type descriptor is generative/sealed/opaque, and #f if not.

Function record-type-field-names rtd

[R6RS] Returns 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.

Function record-type-mutable? rtd k

[R6RS] 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.