Is there a way to attach a custom record printer?

Asked by Ken Dickey on 2008-01-17

I am using a trivial object system (YASOS) for some prototyping and it would be helpful to print something useful. I define an "instance" record with a single uninteresting field.

How can I set the print routine for this particular record type descriptor?

I see that there is a way to attach a custom printer at the define-structure level, but this access does not appear to be exported.

Thanks much,
-KenD

Question information

Language:
English Edit question
Status:
Answered
For:
Ikarus Scheme Edit question
Assignee:
No assignee Edit question
Last query:
2008-01-17
Last reply:
2008-11-23
Abdulaziz Ghuloum (aghuloum) said : #1

On Jan 16, 2008, at 8:48 PM, Ken Dickey wrote:

> I see that there is a way to attach a custom printer at the define-
> structure level, but this access does not appear to be exported.

The interface to that facility is going to change at some time.
That's why it's not exported yet. So, no, there is no way to attach
a custom printer to a record type (yet).

Andreas Rottmann (rotty) said : #2

I could very well use such a facility, too. Perhaps it has been implemented in the meantime?

Ramana Kumar (xrchz) said : #3

I would like to be able to control how records made with define-record-type are displayed or pretty-printed - sometimes I don't want to see one of the fields in the record, especially when it's a long list. Is it possible?

Can you help with this problem?

Provide an answer of your own, or ask Ken Dickey for more information if necessary.

To post a message you must log in.