Tyson Richard DOWD trd at
Mon Feb 24 11:17:44 AEDT 1997

I've been working on io__read, and come up against this problem.

What happens when you want to io__read a list of univ?

Usually the type of the thing we want to read tells us how to parse it.
The type_info for list of univ can't tell us what the type of each
element is, so we cannot parse them. The data itself cannot tell us
what the type of each element is.

This is a bit of a problem, because although io__write can write a 
list of univ, io__read cannot read one.

(The only solution we've seen so far is a co-routining read, that
suspends until it knows what the actual type of a univ is - it will come
from a call to univ_to_type at some stage, then parses it. But 
implementation of this is rather tricky - univ_to_type will perform
unification on the type_infos rather than compare on the type_infos, and
wake-ups and things will have to happen. Ick).

For the moment, I don't think univs will be able to be read.

Any suggestions?

       Tyson Dowd           # "Most people's C code should be indented
                            #  six feet downward and covered with 
     trd at        #  dirt." # - Blair Houghton, on C code indentation

More information about the developers mailing list