[m-dev.] for review: fix tuple type printing bug.

Simon Taylor stayl at cs.mu.OZ.AU
Wed Dec 13 00:44:24 AEDT 2000


 
Tyson wrote:
> When writing the types of tuples, we need to avoid printing an
> extra parenthesis (we use braces around tuple types).
 
> Index: library/std_util.m
> ===================================================================
> @@ -1513,7 +1513,13 @@
>  				UnqualifiedTypeName)
>  		;
>  			type_arg_names(ArgTypes, IsFunc, ArgTypeNames),
> -			string__append_list([Name, "(" | ArgTypeNames],
> +			( IsFunc = yes ->
> +				list__append(ArgTypeNames, [")"], TypeStrings0)
> +			;
> +				TypeStrings0 = ArgTypeNames
> +			),
> +			TypeNameStrings = [Name, "(" | TypeStrings0],
> +			string__append_list(TypeNameStrings,
>  				UnqualifiedTypeName)
>  		)
>  	),

That test should be `IsFunc = no'.

Simon.
--------------------------------------------------------------------------
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