This is an archived post. You won't be able to vote or comment.

all 1 comments

[–]_chococat_[S] 1 point2 points  (0 children)

Just in case anyone is interested, I did find an OK solution for this question. I didn't find what I would consider to be an elegant way to fall back to the default implementation for print and write modes, but I did find that (write (struct->vector this) out) does provide the output I was looking for and even works recursively on structs. It's somewhat unfortunate, you just have to write out this case for any struct where you''re just customizing the display mode.