:- module term_to_xml.
:- use_module bool, builtin, char, construct, deconstruct, exception, int, list, map, maybe, private_builtin, stream, string, type_desc, unit, univ.
:- type term_to_xml.maybe_format
	--->	format 
	;	no_format .
:- pred term_to_xml.get_element_pred(term_to_xml.element_mapping, pred(type_desc.type_desc, term_to_xml.maybe_functor_info, string, list.list(term_to_xml.attr_from_source))).
:- mode term_to_xml.get_element_pred(builtin.in((term_to_xml.element_mapping)), builtin.out((term_to_xml.element_pred))) is det.
:- pred term_to_xml.write_xml_element_univ(Stream_1, deconstruct.noncanon_handling, pred(type_desc.type_desc, term_to_xml.maybe_functor_info, string, list.list(term_to_xml.attr_from_source)), int, univ.univ, list.list(maybe.maybe(string)), list.list(maybe.maybe(string)), State_2, State_2) <= (stream.writer(Stream_1, string, State_2)).
:- mode term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.do_not_allow)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det.
:- mode term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.canonicalize)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is det.
:- mode term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.include_details_cc)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi.
:- mode term_to_xml.write_xml_element_univ((builtin.in), (builtin.in), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)) is cc_multi.
term_to_xml.write_xml_doc(Stream_5, Term_6, STATE_VARIABLE_State_0_8, STATE_VARIABLE_State_9) :-
    V_10 = term_to_xml.no_stylesheet : term_to_xml.maybe_stylesheet,
    V_11 = term_to_xml.no_dtd : term_to_xml.maybe_dtd,
    term_to_xml.write_xml_doc_style_dtd(Stream_5, Term_6, V_10, V_11, STATE_VARIABLE_State_0_8, STATE_VARIABLE_State_9).
term_to_xml.write_dtd(Stream_7, Term_8, ElementMapping_9, DTDResult_10, STATE_VARIABLE_State_0_13, STATE_VARIABLE_State_14) :-
    TypeDesc_12 = type_desc.type_of(Term_8),
    term_to_xml.write_dtd_from_type(Stream_7, TypeDesc_12, ElementMapping_9, DTDResult_10, STATE_VARIABLE_State_0_13, STATE_VARIABLE_State_14).
term_to_xml.write_xml_element_general(Stream_8, NonCanon_9, ElementMapping_10, IndentLevel_11, Term_12, STATE_VARIABLE_State_0_17, STATE_VARIABLE_State_18) :-
    univ.type_to_univ(Term_12, Univ_14),
    term_to_xml.get_element_pred(ElementMapping_10, MakeElement_15),
    V_19 = list.[] : list.list(maybe.maybe(string)),
    term_to_xml.write_xml_element_univ(Stream_8, NonCanon_9, MakeElement_15, IndentLevel_11, Univ_14, V_19, V_16, STATE_VARIABLE_State_0_17, STATE_VARIABLE_State_18).
:- pragma exceptions(function, (term_to_xml.to_xml), 2, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_doc), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_doc_style_dtd), 6, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element), 5, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_header), 4, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_doc_general), 8, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_doc_general_cc), 8, 0, may_throw(user_exception)).
:- pragma exceptions(function, (term_to_xml.can_generate_dtd), 3, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_dtd), 6, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_dtd_from_type), 6, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_general), 7, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_general), 7, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_general), 7, 2, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_general), 7, 3, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.get_element_pred), 2, 0, will_not_throw).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_univ), 9, 0, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_univ), 9, 1, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_univ), 9, 2, may_throw(user_exception)).
:- pragma exceptions(predicate, (term_to_xml.write_xml_element_univ), 9, 3, may_throw(user_exception)).
:- pragma termination_info(term_to_xml.to_xml((builtin.in)) = builtin.out((term_to_xml.xml_doc)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_doc((builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_doc_style_dtd((builtin.in), (builtin.in), (builtin.in), builtin.in((term_to_xml.non_embedded_dtd)), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element((builtin.in), (builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_header((builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_doc_general((builtin.in), (builtin.in), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_doc_general_cc((builtin.in), (builtin.in), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.can_generate_dtd(builtin.in((term_to_xml.element_mapping)), (builtin.in)) = (builtin.out), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_dtd((builtin.in), (builtin.unused), builtin.in((term_to_xml.element_mapping)), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_dtd_from_type((builtin.in), (builtin.in), builtin.in((term_to_xml.element_mapping)), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_general((builtin.in), builtin.in((deconstruct.do_not_allow)), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_general((builtin.in), builtin.in((deconstruct.canonicalize)), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_general((builtin.in), builtin.in((deconstruct.include_details_cc)), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_general((builtin.in), (builtin.in), builtin.in((term_to_xml.element_mapping)), (builtin.in), (builtin.in), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.get_element_pred(builtin.in((term_to_xml.element_mapping)), builtin.out((term_to_xml.element_pred))), infinite, cannot_loop).
:- pragma termination_info(term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.do_not_allow)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.canonicalize)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_univ((builtin.in), builtin.in((deconstruct.include_details_cc)), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
:- pragma termination_info(term_to_xml.write_xml_element_univ((builtin.in), (builtin.in), builtin.in((term_to_xml.element_pred)), (builtin.in), (builtin.in), (builtin.in), (builtin.out), (builtin.di), (builtin.uo)), infinite, can_loop).
