[m-rev.] for review: check for existentially typed functor args when generating DTD

Julien Fischer juliensf at cs.mu.OZ.AU
Wed Dec 15 13:15:37 AEDT 2004


On Tue, 14 Dec 2004, Ian MacLarty wrote:

> For review by anyone.
>
> 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.
>
...
> @@ -1128,63 +1142,82 @@
...
> +
> +			(
> +				map.contains(Done, TypeDesc)
> +			->
>  				Result = can_generate_dtd_for_types(
> -					MakeElement, NewTypeDescs,
> -					NewDoneTypeDescs, NewElementsSoFar)
> +					MakeElement, PseudoTypeDescs,
> +					Done, ElementsSoFar)
> +			;
> +				get_elements_and_args(MakeElement,
> +					TypeDesc, Elements, _, _,
> +					ArgLists, _),
> +				list.filter(map.contains(ElementsSoFar),
> +					Elements, DupElements),
> +				(
> +					DupElements = [DupElement | _],
> +					map.lookup(ElementsSoFar, DupElement,
> +						DupTypeDesc),
> +					DupTypes = [TypeDesc,
> +						DupTypeDesc],
Why is this broken over two lines?

Looks fine otherwise.

Cheers,
Julien.
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list