[m-dev.] for review: fix type specialization

Fergus Henderson fjh at cs.mu.OZ.AU
Fri Sep 8 16:04:43 AEDT 2000


On 08-Sep-2000, Simon Taylor <stayl at cs.mu.OZ.AU> wrote:
> 
> 
> Fix type specialization of existentially typed predicates and functions.
...
> +++ hlds_out.m	2000/09/05 13:47:59
> @@ -714,6 +714,11 @@
>  	{ pred_info_get_head_type_params(PredInfo, HeadTypeParams) },
>  	{ pred_info_get_indexes(PredInfo, Indexes) },
>  	globals__io_lookup_string_option(dump_hlds_options, Verbose),
> +	( { string__contains_char(Verbose, 'v') } ->
> +		{ AppendVarnums = yes }
> +	;
> +		{ AppendVarnums = no }
> +	),
> @@ -2578,7 +2580,9 @@
>  
>  	hlds_out__write_indent(Indent),
>  	io__write_string("% Constraints: "),
> -	io__write_list(Constraints, ", ",  mercury_output_constraint(VarSet)),
> +	{ AppendVarnums = no },
> +	io__write_list(Constraints, ", ",
> +		mercury_output_constraint(VarSet, AppendVarnums)),

Why do you set AppendVarnums to `no' here,
rather than checking whether 'v' is set in dump_hlds_options?

Likewise for all of the other places where you set AppendVarnums = no.

Apart from that, this change looks fine.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
WWW: <http://www.cs.mu.oz.au/~fjh>  |  of excellence is a lethal habit"
PGP: finger fjh at 128.250.37.3        |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list