Files
mercury/tests/hard_coded/write_reg2.m
Tyson Dowd 2430b41bdb Fix a bug that Simon Mei reported.
Estimated hours taken: 1.75

Fix a bug that Simon Mei reported.

When writing the types of tuples, we need to avoid printing an
extra parenthesis (we use braces around tuple types).  For example we
were writing
	{int, int, int)}
instead of
	{int, int, int}

library/std_util.m:
	Reorganize code so that ')' is not added after all type parameter
	lists.

tests/hard_coded/Mmakefile:
tests/hard_coded/write_reg2.exp:
tests/hard_coded/write_reg2.m:
	A regression test for this problem.

tests/hard_coded/construct.exp:
	Fix the incorrect output of this test case -- this problem was
	in the tests all the time and just went unnoticed.
2000-12-15 07:41:32 +00:00

25 lines
420 B
Mathematica

% Regression test:
%
% This test ensures that tuple types are written out correctly.
%
% The Mercury compiler of 12 Dec 2000 failed to correctly
% run this test.
%
% Author: trd
:- module write_reg2.
:- interface.
:- import_module io.
:- pred main(io__state::di, io__state::uo) is det.
:- implementation.
:- import_module std_util.
main -->
io__write(univ((1 - 2))),
io__nl,
io__write(univ({1,2,3})),
io__nl.