[mercury-users] Functor argument names in RTTI

Fergus Henderson fjh at cs.mu.OZ.AU
Tue Sep 18 21:30:07 AEST 2001


On 17-Sep-2001, Michael Day <mikeday at bigpond.net.au> wrote:
> 
> It would be handy to be able to access functor argument names through rtti
> when trying to automatically serialise arbitrary types. For example,
> extending get_functor which currently returns a list(type_desc) to return
> a list of pair(maybe(string), type_desc).
> 
> Does the source to source translation that implements field names permit
> this, or is it unlikely to be possible?

The RTTI information that we keep at runtime already stores the field names,
I'm pretty sure (grep for "arg_name" in runtime/mercury_type_info.h).
We just haven't yet gotten around to providing an appropriate
Mercury interface to that info.  

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-users mailing list
post:  mercury-users at cs.mu.oz.au
administrative address: owner-mercury-users at cs.mu.oz.au
unsubscribe: Address: mercury-users-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-users-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the users mailing list