This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for the CHICKEN 5 version of this egg, if it exists.
If it does not exist, there may be equivalent functionality provided by another egg; have a look at the egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.
Trivial macro to define records and appropriate printers
- (define-record-and-printer name slotname) → recordsyntax
Define a record and a printer that shows the contents of the record as a vector; see define-record.
- The name of the record
- The name of the slot
(define-syntax define-record-and-printer (lambda (expression rename compare) (match expression ((_ record . fields) (let ((%define-record (rename 'define-record)) (%define-record-printer (rename 'define-record-printer)) (%begin (rename 'begin)) (%lambda (rename 'lambda)) (%write (rename 'write)) (%record->vector (rename 'record->vector))) `(,%begin (,%define-record ,record ,@fields) (,%define-record-printer ,record (,%lambda (record out) (,%write (,%record->vector record) out)))))))))
- Version 0.1
- Release with docs
- Add cock.
- Remove the dependency on setup-helper-cock.
- Use hahn.
Documented by hahn.