Files
mercury/tests/hard_coded/existential_bound_tvar.m
David Jeffery 7235409c11 A test case for the exist_q_tvar bug
Estimated hours taken: 0.2

hard_coded/existential_bound_tvar.m:
        A test case for the exist_q_tvar bug
hard_coded/existential_bound_tvar.exp:
        The expected output for the test case.
hard_coded/Mmakefile:
        Add the new test case.
1998-09-24 10:11:51 +00:00

46 lines
778 B
Mathematica

:- module existential_bound_tvar.
:- interface.
:- pred main(io__state::di, io__state::uo) is det.
:- import_module io.
:- implementation.
:- import_module list, std_util.
main -->
{ blah(101, X) },
print("X: value = "), print(X), nl,
print("X: type = "), print(type_of(X)), nl,
{ blah2(101, Y) },
print("Y: value = "), print(Y), nl,
print("Y: type = "), print(type_of(Y)), nl,
(
{ blah3([101], Z) }
->
print("Z: value = "), print(Z), nl,
print("Z: type = "), print(type_of(Z)), nl
;
write("ERROR\n")
).
:- some [T1] pred blah(T, T1).
:- mode blah(in, out) is det.
blah(X, X).
:- some [T1] pred blah2(T, T1).
:- mode blah2(in, out) is det.
blah2(X, [X]).
:- some [T1] pred blah3(list(T), T1).
:- mode blah3(in, out) is semidet.
blah3([X], X).