test/hard_coded/write_xml.m:
Document why the output differs between the low- and high-level C backends.
Fix odd argument ordering.
tests/hard_coded/write_xml.exp*:
Conform to the above change.
library/term_to_xml.m:
As above, this module had not been updated to cover the new builtin
integer types.
tests/hard_coded/write_xml.{m,exp,exp2}:
Extend this test case to cover the new integer types.
Document what the expected outputs correspond to.
tests/hard_coded/write_xml.exp2:
On jun 10, I fixed write_xml.exp for the change to add details
to foreign types, but in hlc grades, the relevant expected output file
is write_xml.exp2. Make the same update in that file as well.
Estimated hours taken: 0.1
Branches: main
Fix failing test cases in hlc grades.
tests/hard_coded/deconstruct_arg.exp2:
tests/hard_coded/write_reg1.exp3:
tests/hard_coded/write_xml.exp2:
Conform to the new way in which floats are printed.
Estimated hours taken: 2
Branches: main
runtime/mercury_ml_expand_body.h:
Construct strings representing c_pointer addresses. Used in the
implementation of functor and deconstruct.
library/deconstruct.m:
Document the behaviour of functor and deconstruct for c_pointers.
library/string.m:
Export c_pointer_to_string for getting a string representation
of the pointer address.
library/io.m:
library/rtti_implementation.m:
Use c_pointer_to_string/1 to print c_pointers.
Update comments.
library/pprint.m:
Undo Ralph's earlier change, since it is no longer required.
tests/debugger/Mmakefile:
tests/debugger/declarative/Mmakefile:
Canonicalize the output of test cases in which c_pointers appear.
tests:
Update the expected output of test cases.
Estimated hours taken: 1
Branches: main
In term_to_xml check that no functor arguments are existentially typed when
requested to generate a DTD.
Include field name attribute in generated XML.
library/term_to_xml.m
Use construct.get_functor to check that no functors of a type have
existentially typed arguments before generating a DTD for the type. If
there are existentially typed arguments then report this fact.
Set the field name attribute in generated XML. This previously didn't
work for existentially typed functor arguments, because of a bug in the
rtti, which has now been fixed (thanks to Zoltan).
Use `.' as module qualifier.
tests/hard_coded/write_xml.exp
tests/hard_coded/write_xml.exp2
tests/hard_coded/write_xml.m
Test attempt to generate a DTD for a functor with an existentially
typed argument. Test reporting of field name for an existentially
typed functor argument.
Estimated hours taken: 15
Branches: main
Allow custom functor to element mappings in term_to_xml library.
Disable setting of the `field' attribute in generated XML until a bug in the
runtime system has been fixed. The bug causes a seg fault when
construct.get_functor is called on a functor with an existentially quantified
argument type.
Add a check to see if a DTD can be generated for a type under a custom mapping
scheme. This involves checking that the mapping scheme does not generate the
same element for any two distinct functors that could appear in ground terms of
the type.
Also do not generate DTDs for types other than discriminated unions, arrays,
strings, ints, characters and floats since we cannot predict what the children
will be for other types (e.g. curried preds). Note that XML can still
be generated for any type deconstruct.deconstruct/5 can handle.
NEWS
Mention term_to_xml module.
extras/xml_stylesheets/xul_tree.xsl
Hide the field name by default (since we don't populate this attribute
at the moment).
Fix a bug where quotes were not being printed around strings.
The `typename' attribute has now become simply `type'.
library/term_to_xml.m
Allow custom functor to element mappings and include two predefined
mappings.
Do not call construct.get_functor when writing out an XML document so
that the previously mentioned runtime bug doesn't bite. This line of
code just needs to be uncommented - the line is responsible for getting
the field names of the arguments of a functor.
Check that a mapping scheme cannot assign the same element to
two different functors when a DTD is requested.
tests/hard_coded/write_xml.m
tests/hard_coded/write_xml.exp
Test custom and predefined mapping schemes.