[m-dev.] diff: changes to term_to_type & type_to_term
Thomas Charles CONWAY
conway at cs.mu.oz.au
Mon Jun 30 09:28:06 AEST 1997
Fergus Henderson, you write:
> Hi,
>
> Tom, can you please review this one?
>
> Incidentally, the code in this change shows the need for existential types.
> There were several places where without existential types, the only way
> to make the code do what I wanted it to do was to use unsafe_cast and
> friends.
>
> -----------------------------------------------------------------------------
>
> Various improvements to term_to_type, type_to_term, and io__write,
> particularly with regard to the handling of data of type uniq_array(T).
>
> library/term.m:
> - Improve the error messages available from term_to_type: add
> a new predicate `try_term_to_type' which is like term_to_type
> but which returns much more detailed information rather than
> failing. (XXX not yet done: we should modify io__read to take
> advantage of this.)
> - Extend term_to_type to handle uniq_array/1.
> - Extend type_to_term to handle uniq_array/1, univ/0, and type_info/0.
> - Rename term__term_to_type_2 as term__univ_to_type and export
> it (it is needed by io.m).
>
> library/io.m:
> - Fix a bug in the output of uniq_arrays: call term__univ_to_type
> rather than term__term_to_type.
>
This looks good.
Should io__read give back a term_to_type_result?
Thomas
--
ZZ:wq!
^X^C
Thomas Conway conway at cs.mu.oz.au
AD DEUM ET VINUM Every sword has two edges.
More information about the developers
mailing list