FIXED! Re: [m-dev.] [Bug] write_term...

Mark Brown mark at cs.mu.OZ.AU
Mon Mar 6 01:57:12 AEDT 2006


Hi Doug,

Thanks for reporting this bug.  Unfortunately, the problem is more general
than just the treatment of ';'/2 in argument lists.  It occurs for any
operator whose precedence is greater than that of ','/2 (i.e., > 1000).
For example, the following term is also output incorrectly:

	[
		(
			a(1),
			X = 1
		&
			X = 2,
			Y = 2
		)
	,
		A = 1
	].

I think the problem stems from the following comment in library/ops.m:

	    % XXX ISO prolog syntax would require us to change this to 999,
	    % but we need bug-for-bug compatibility with the NU-Prolog parser
	    % in order to support e.g. `::' in args.
	ops__mercury_arg_priority(_Table) = 1201.

I'll discuss the best solution with Zoltan tomorrow, if possible, and get
back to you after that.

Cheers,
Mark.

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