[m-dev.] diff: test case for exist_q_tvar bug fix

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Sep 24 16:42:43 AEST 1998


On 24-Sep-1998, David Glen JEFFERY <dgj at cs.mu.OZ.AU> wrote:
> 
> main -->
> 	{ blah(101, _) }.
> 
> :- some [T1] pred blah(T, T1).
> :- mode blah(in, out) is det.
> 
> blah(X, X).

I think it would be good to test that we actually generate correct
code for this case.  How about you change main/2 to

	main -->
		{ blah(101, X) },
		print("value = "), print(X), nl,
		print("type = "), print(typeof(X)), nl.

and put the test in the `hard_coded' directory rather than the
`valid' directory?

Actually a couple more tests might be worthwhile, e.g.

	:- some [T1] pred blah2(T, T1).
	:- mode blah2(in, out) is det.

	blah2(X, [X]).

and

	:- some [T1] pred blah3(T, T1).
	:- mode blah3(in, out) is semidet.

	blah2([X], X).


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



More information about the developers mailing list