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

Re: Undocumented: reader/writer



Quoting Bertrand Petit:
> 	Browsing schemef.h releals some functions not documented in
> _Inside PLT MzScheme_. The functions scheme_install_type_reader() and
> scheme_install_type_writer() seems of interest as the extension I'm
> writing define a new type that can be read and written. How does one
> use this?

scheme_install_type_reader() and scheme_install_type_writer() are for
marshaling "bytecode" structures to and from .zo files. They probably
shouldn't be in MzScheme's public interface anymore. (Long ago,
MzScheme was designed to let extensions add new primitive syntactic
forms, but not any more.)

MzScheme doesn't currently provide a hook for setting a type-specific
printer. The pretty-print library does provide such a hook.

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.

Matthew