[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Undocumented: reader/writer



On Wed, Apr 11, 2001 at 08:42:03AM -0600, Matthew Flatt wrote:
>
> MzScheme doesn't currently provide a hook for setting a type-specific
> printer.

	Being able to write any new type would be helpfull for users
debugging code using thoses types.

> Reading values back in seems more tricky. Offhand, I haven't given it
> enough thought to know how it might work, but I'm open to suggestions.

	How other implementations handle this? A simplistic way to
read would be to invoke a registered reader and passing it an input
port. The reader would be selected by the "type symbol" following
`#<'.  The reader would read forward as needed until it reaches `>'
and return a new object. The new type reader could also be passed a
string build by the parent reader.

-- 
%!PS        '(#<radical-libre> ("Bertrand Petit" . "elrond@phoe.frmug.org"))
297.6 420.9 translate 90 rotate 0 setgray gsave 0 1 1{pop 0 180 moveto 100
180 170 100 170 -10 curveto 180 -9 180 -9 190 -10 curveto 190 100 100 180
0 180 curveto fill 180 rotate}for grestore/Bookman-LightItalic findfont
240 scalefont setfont -151.536392 -63.7998886 moveto (bp)show showpage