:- module (string.builder).
:- use_module array, assoc_list, bitmap, bool, builtin, char, deconstruct, float, int, integer, list, maybe, ops, pair, pretty_printer, private_builtin, require, rtti_implementation, std_util, stream, term_io, type_desc, univ, version_array.
:- type string.builder.state
	--->	state(list.list(string)).
:- instance (stream.writer(string.builder.handle, string, string.builder.state)).
:- instance (stream.writer(string.builder.handle, character, string.builder.state)).
:- instance (stream.stream(string.builder.handle, string.builder.state)).
:- instance (stream.output(string.builder.handle, string.builder.state)).
(string.builder).init = string.builder.state(V_2) :-
    V_2 = list.[] : list.list(string).
(string.builder).to_string(State_3) = String_4 :-
    State_3 = (string.builder).state(StringList_5) : string.builder.state,
    String_4 = string.append_list(V_6),
    V_6 = list.reverse(StringList_5).
:- pragma exceptions(function, ((string.builder).init), 1, 0, will_not_throw).
:- pragma exceptions(function, ((string.builder).to_string), 2, 0, may_throw(user_exception)).
:- pragma termination_info(((string.builder).init) = (builtin.uo), finite(1, [no]), cannot_loop).
:- pragma termination_info((string.builder).to_string((builtin.di)) = (builtin.uo), infinite, can_loop).
:- pragma termination_info((string.builder).'ClassMethod_for_stream__output____string__builder__handle__arity0__string__builder__state__arity0______stream__flush_3'((builtin.in), (builtin.di), (builtin.uo)), finite(0, [no, yes, no]), cannot_loop).
:- pragma termination_info((string.builder).'ClassMethod_for_stream__stream____string__builder__handle__arity0__string__builder__state__arity0______stream__name_4'((builtin.in), (builtin.out), (builtin.di), (builtin.uo)), finite(0, [no, no, yes, no]), cannot_loop).
:- pragma termination_info((string.builder).'ClassMethod_for_stream__writer____string__builder__handle__arity0__character__arity0__string__builder__state__arity0______stream__put_4'((builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info((string.builder).'ClassMethod_for_stream__writer____string__builder__handle__arity0__string__arity0__string__builder__state__arity0______stream__put_4'((builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
