for review: eq/2

Thomas Charles CONWAY conway at cs.mu.oz.au
Wed Jan 14 12:29:40 AEDT 1998


Hi

A handy little predicate if you're doing much HO stuff...
-- 
ZZ:wq!
^X^C
Thomas Conway               				      conway at cs.mu.oz.au
AD DEUM ET VINUM	  			   Nail here [] for new monitor.


library/std_util.m:
	add eq/2 which is just a curriable form of (T::in = T::in).

WORK_IN_PROGRESS:
	mention eq/2

cvs diff: Diffing .
Index: WORK_IN_PROGRESS
===================================================================
RCS file: /home/staff/zs/imp/mercury/WORK_IN_PROGRESS,v
retrieving revision 1.7
diff -u -r1.7 WORK_IN_PROGRESS
--- WORK_IN_PROGRESS	1997/10/11 15:31:08	1.7
+++ WORK_IN_PROGRESS	1998/01/14 01:18:17
@@ -42,3 +42,6 @@
 * Support for Haskell-style type classes.
 
 * Support for heap profiling.
+
+* Added eq/2 to std_util to allow currying of in-in unification.
+
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing bytecode
cvs diff: Diffing bytecode/test
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/Togl-1.2
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing library
Index: library/std_util.m
===================================================================
RCS file: /home/staff/zs/imp/mercury/library/std_util.m,v
retrieving revision 1.113
diff -u -r1.113 std_util.m
--- std_util.m	1998/01/13 10:00:57	1.113
+++ std_util.m	1998/01/13 21:23:03
@@ -413,6 +413,12 @@
 :- pred deconstruct(T::in, string::out, int::out, list(univ)::out) is det.
 
 %-----------------------------------------------------------------------------%
+
+% eq(T, U) is true iff T and U are unifiable.
+% This is useful for currying test unifications.
+:- pred eq(T::in, T::in) is semidet.
+
+%-----------------------------------------------------------------------------%
 %-----------------------------------------------------------------------------%
 
 :- implementation.
@@ -2988,5 +2994,9 @@
 % 	cc_multi.
 % :- mode do_while(pred(out) is nondet, pred(in,in,out,out) is det, in, out) is
 % 	cc_multi.
+
+%-----------------------------------------------------------------------------%
+
+eq(X, X).
 
 %-----------------------------------------------------------------------------%
cvs diff: Diffing lp_solve
cvs diff: Diffing lp_solve/lp_examples
cvs diff: Diffing profiler
cvs diff: Diffing runtime
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing scripts
cvs diff: Diffing tools
cvs diff: Diffing trial
cvs diff: Diffing util



More information about the developers mailing list