[mercury-users] write_term to string.builder?

Julien Fischer juliensf at csse.unimelb.edu.au
Tue Oct 23 09:44:18 AEDT 2012


Hi,

On Mon, 22 Oct 2012, Jeff Thompson wrote:

> Hello.  I want to format a term to a string.  The term module has:
> pred term_io.write_term(varset(T)::in, term(T)::in, io::di, io::uo) is det.
>
> Can I pass a string.builder as the io to write_term?  I can't figure out how 
> to make an io out of a string.builder.

You can't do that, they are different things.  Most of the term_io module 
does not currently use the streams interface (indeed, it doesn't appear to 
possible to pass an text output stream to most of the predicates in it, let
alone some arbitrary string writer.)

Julien.
--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list