[m-rev.] diff: update configure.in for list constructor change

Simon Taylor stayl at cs.mu.OZ.AU
Fri Oct 5 11:23:40 AEST 2001


Estimated hours taken: 1
Branches: main

configure.in:
	When checking that the installed compiler is up-to-date,
	check that the constructor for lists is `[|]/2', not `./2'.

Index: configure.in
===================================================================
RCS file: /home/mercury1/repository/mercury/configure.in,v
retrieving revision 1.278
diff -u -u -r1.278 configure.in
--- configure.in	6 Sep 2001 08:26:32 -0000	1.278
+++ configure.in	5 Oct 2001 01:19:56 -0000
@@ -97,24 +97,15 @@
 		:- module conftest.
 		:- interface.
 		:- import_module io.
-		:- pred main(io__state::di, io__state::uo) is cc_multi.
+		:- pred main(io__state::di, io__state::uo) is det.
 
 		:- implementation.
-		:- import_module int, exception.
+		:- import_module list, std_util.
         
-		% Check that X/0 throws an exception. If it doesn't,
-		% the old compiler will report an error for the clauses
-		% for int:// and float:/, which according to the old
-		% compiler should be builtins.
-		% Also check for unchecked_int_quotient, which is a builtin
-		% present only in recent compilers.
+		% Check that the functor for lists is "[[|]]/2"
+		% rather than "./2".
 		main --> 
-			{ try(
-				(pred(Value::out) is det :-
-					Value = 42 // 0 +
-						unchecked_quotient(10, 2)
-				), Result) },
-			( { Result = exception(_) } ->
+			( { functor([[1, 2]], "[[|]]", 2) } ->
 				print("Hello, world\n")
 			;
 				print("Nope.\n")
--------------------------------------------------------------------------
mercury-reviews mailing list
post:  mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe:   Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------



More information about the reviews mailing list