Commit Graph

5 Commits

Author SHA1 Message Date
Julien Fischer
06e57d3bb4 Make string/1 handle version_arrays in the same way as io.write/3 etc.
library/string.m:
	As above.
NEWS:
	Add a section for 14.01.1 news.

	Mention the above change.

tests/hard_coded/string_string.{m,exp}:
	Extend this test case to cover arrays and version arrays.
2014-03-04 01:48:44 +11:00
Ralph Becket
427c7518ec Improve the readability of float output from the debugger and io.print etc.
Estimated hours taken: 4
Branches: main

Improve the readability of float output from the debugger and io.print etc.
by pruning redundant trailing zeroes.

NEWS:
	Mention the change.

library/string.m:
runtime/mercury_float.c:
	Make string.float_to_string trim redundant trailing zeroes.
	The behaviour of string.format etc. is unchanged.

tests/debugger/ambiguity.exp:
tests/debugger/field_names.exp:
tests/debugger/higher_order.exp:
tests/debugger/print_table.exp:
tests/hard_coded/common_type_cast.exp:
tests/hard_coded/constant_prop_1.exp:
tests/hard_coded/construct_test.exp:
tests/hard_coded/deconstruct_arg.exp:
tests/hard_coded/deep_copy.exp:
tests/hard_coded/deep_copy_exist.exp:
tests/hard_coded/dense_lookup_switch2.exp:
tests/hard_coded/dense_lookup_switch_non.exp:
tests/hard_coded/existential_float.exp:
tests/hard_coded/expand.exp:
tests/hard_coded/final_excp.exp:
tests/hard_coded/float_field.exp:
tests/hard_coded/float_gv.exp:
tests/hard_coded/float_reg.exp:
tests/hard_coded/float_rounding_bug.exp:
tests/hard_coded/init_excp.exp:
tests/hard_coded/mutable_excp.exp:
tests/hard_coded/pragma_import.exp:
tests/hard_coded/prince_frameopt.exp:
tests/hard_coded/string_string.exp:
tests/hard_coded/unused_float_box_test.exp:
tests/hard_coded/write.exp:
tests/hard_coded/write_binary.exp:
tests/hard_coded/write_reg1.exp:
tests/hard_coded/write_xml.exp:
tests/hard_coded/sub-modules/non_word_mutable.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_class.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_1.exp:
tests/hard_coded/typeclasses/arbitrary_constraint_pred_2.exp:
tests/hard_coded/typeclasses/existential_rtti.exp:
tests/hard_coded/typeclasses/func_default_mode_bug.exp:
tests/hard_coded/typeclasses/mode_decl_order_bug.exp:
tests/hard_coded/typeclasses/module_test.exp:
tests/hard_coded/typeclasses/typeclass_exist_method.exp:
tests/invalid/error_in_list.err_exp:
tests/invalid/errors2.err_exp:
tests/invalid/purity/purity_type_error.err_exp:
tests/mmc_make/complex_test.exp:
tests/recompilation/add_type_re.exp.1:
tests/recompilation/type_spec_rename_var_r.exp.1:
tests/recompilation/type_spec_rename_var_r.exp.2:
tests/recompilation/type_spec_unname_var_r.exp.1:
tests/recompilation/type_spec_unname_var_r.exp.2:
	Updated expected test case output.
2007-02-15 00:41:59 +00:00
Ralph Becket
03ba699c40 Fix a bug in string.string reported by Peter Ross.
Estimated hours taken: 1
Branches: main, release

Fix a bug in string.string reported by Peter Ross.

library/string.m:
	Bugfix: previously string.value_to_revstrings was not calling
	univ_value on arguments of functors that are handled specially.  This
	caused spurious "univ_cons" functors to appear in the string
	representations of some terms.

test/hard_coded/string_string.exp:
test/hard_coded/string_string.m:
	Extended the test case for string.string to cover Peter's example.
2005-08-04 04:45:19 +00:00
Ian MacLarty
f5d0e83e8b Make string.string/1 format lists properly.
Estimated hours taken: 0.2
Branches: main

Make string.string/1 format lists properly.  Previously it used to
put univ_cons around each tail element.

library/string.m
	The arguments returned from deconstruct are univs, so make
	list_tail_to_revstrings expect a univ and rename to
	univ_list_tail_to_revstrings.

tests/hard_coded/string_string.exp
tests/hard_coded/string_string.m
	Test conversion of lists to strings.
2004-12-20 14:22:54 +00:00
Ralph Becket
fea6e9a1c1 Fix an infinite loop bug in string.string.
Estimated hours taken: 4
Branches: main

Fix an infinite loop bug in string.string.

library/string.m:
	Fixed a bug where string.string would go into an infinite loop when
	trying to format the argument values of terms.

tests/hard_coded/Mmakefile:
tests/hard_coded/string_string.m:
tests/hard_coded/string_string.exp:
	Added a test case.
2004-10-05 05:49:01 +00:00