[Nice-commit] Nice/stdlib/nice/lang collections.nice,1.59,1.60 graph.nice,1.20,1.21 java-io.nice,1.1
Brought to you by:
bonniot
From: <ar...@us...> - 2004-02-24 16:11:31
|
Update of /cvsroot/nice/Nice/stdlib/nice/lang In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15440/F:/nice/stdlib/nice/lang Modified Files: collections.nice graph.nice java-io.nice native.nice null.nice prelude.nice Log Message: Removed the use of 'Any' from nice.lang. Index: collections.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/collections.nice,v retrieving revision 1.59 retrieving revision 1.60 diff -C2 -d -r1.59 -r1.60 *** collections.nice 19 Dec 2003 18:52:45 -0000 1.59 --- collections.nice 24 Feb 2004 16:04:56 -0000 1.60 *************** *** 270,274 **** Returns <code>null</code> if there is no such element. */ ! <Any T> ?T search (java.util.List<!T> list, !T->boolean test) { for (!T elem : list) --- 270,274 ---- Returns <code>null</code> if there is no such element. */ ! <T> ?T search (java.util.List<!T> list, !T->boolean test) { for (!T elem : list) Index: graph.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/graph.nice,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** graph.nice 19 Nov 2003 16:04:45 -0000 1.20 --- graph.nice 24 Feb 2004 16:04:59 -0000 1.21 *************** *** 26,30 **** Tarjan's algorithm (linear). */ ! <Any T> List<List<T>> stronglyConnectedComponents(T start, T->List<T> successors) { --- 26,30 ---- Tarjan's algorithm (linear). */ ! <T> List<List<T>> stronglyConnectedComponents(T start, T->List<T> successors) { *************** *** 39,43 **** } ! <Any T> int visit(T node, T->List<T> successors, Ref<int> id, Stack<T> stack, Map<T,int> mark, List<List<T>> res) --- 39,43 ---- } ! <T> int visit(T node, T->List<T> successors, Ref<int> id, Stack<T> stack, Map<T,int> mark, List<List<T>> res) Index: java-io.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/java-io.nice,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** java-io.nice 26 Nov 2003 00:29:31 -0000 1.1 --- java-io.nice 24 Feb 2004 16:04:59 -0000 1.2 *************** *** 36,41 **** /** Convenience: printing on the standard output. */ ! <Any T> void print (T object) = System.out.print (object); ! <Any T> void println (T object) = System.out.println(object); // Constructors --- 36,41 ---- /** Convenience: printing on the standard output. */ ! <T> void print (T object) = System.out.print (object); ! <T> void println (T object) = System.out.println(object); // Constructors Index: native.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/native.nice,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** native.nice 19 Nov 2003 16:04:45 -0000 1.6 --- native.nice 24 Feb 2004 16:04:59 -0000 1.7 *************** *** 27,31 **** void `throw`(java.lang.Throwable exception) = inline nice.lang.inline.Throw(); ! <Any T> boolean `instanceof`(T value, Type) = inline nice.lang.inline.Instanceof(); --- 27,31 ---- void `throw`(java.lang.Throwable exception) = inline nice.lang.inline.Throw(); ! <T> boolean `instanceof`(T value, Type) = inline nice.lang.inline.Instanceof(); Index: null.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/null.nice,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** null.nice 19 Nov 2003 16:04:45 -0000 1.5 --- null.nice 24 Feb 2004 16:04:59 -0000 1.6 *************** *** 30,33 **** Otherwise evaluate e2 and return it. */ ! <Any T> !T `||`(?T e1, !T e2) = inline nice.lang.inline.OptionOr(); ! <Any T> ?T `||`(?T e1, ?T e2) = inline nice.lang.inline.OptionOr(); --- 30,33 ---- Otherwise evaluate e2 and return it. */ ! <T> !T `||`(?T e1, !T e2) = inline nice.lang.inline.OptionOr(); ! <T> ?T `||`(?T e1, ?T e2) = inline nice.lang.inline.OptionOr(); Index: prelude.nice =================================================================== RCS file: /cvsroot/nice/Nice/stdlib/nice/lang/prelude.nice,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** prelude.nice 12 Dec 2003 12:55:25 -0000 1.36 --- prelude.nice 24 Feb 2004 16:04:59 -0000 1.37 *************** *** 45,49 **** This should probably be fixed so that the semantics is well defined. */ ! <Any T> !T notNull(?T value) { assert(value != null); --- 45,49 ---- This should probably be fixed so that the semantics is well defined. */ ! <T> !T notNull(?T value) { assert(value != null); *************** *** 82,86 **** /** Unsafe cast operator. UNSAFE! */ ! <Any T, Any U> U cast(T) = inline nice.lang.inline.Nop(); /**************************************************************** --- 82,86 ---- /** Unsafe cast operator. UNSAFE! */ ! <T, U> U cast(T) = inline nice.lang.inline.Nop(); /**************************************************************** *************** *** 88,93 **** ****************************************************************/ ! <Any T> boolean `==`(T,T) = inline nice.lang.inline.ReferenceOp("=="); ! <Any T> boolean `!=`(T,T) = inline nice.lang.inline.ReferenceOp("!="); boolean `==`(char, char) = inline nice.lang.inline.CompOp("iEq"); --- 88,93 ---- ****************************************************************/ ! <T> boolean `==`(T,T) = inline nice.lang.inline.ReferenceOp("=="); ! <T> boolean `!=`(T,T) = inline nice.lang.inline.ReferenceOp("!="); boolean `==`(char, char) = inline nice.lang.inline.CompOp("iEq"); *************** *** 95,100 **** ! <Any T> boolean equals(!T,!T) = native boolean Object.equals(Object); ! <Any T> boolean equals(?T a, ?T b) { if (a != null && b != null) --- 95,100 ---- ! <T> boolean equals(!T,!T) = native boolean Object.equals(Object); ! <T> boolean equals(?T a, ?T b) { if (a != null && b != null) *************** *** 106,118 **** <T> int hashCode(!T) = native int Object.hashCode(); ! <Any T> String toString(!T) = native String Object.toString(); ! <Any T> String valueOf(T) = native String String.valueOf(Object); ! <Any T> Class getClass(!T) = native Class Object.getClass(); ! <Any T> void wait(!T) = native void Object.wait(); ! <Any T> void wait(!T, long) = native void Object.wait(long); ! <Any T> void wait(!T, long, int) = native void Object.wait(long, int); ! <Any T> void notify(!T) = native void Object.notify(); ! <Any T> void notifyAll(!T) = native void Object.notifyAll(); /** --- 106,118 ---- <T> int hashCode(!T) = native int Object.hashCode(); ! <T> String toString(!T) = native String Object.toString(); ! <T> String valueOf(T) = native String String.valueOf(Object); ! <T> Class getClass(!T) = native Class Object.getClass(); ! <T> void wait(!T) = native void Object.wait(); ! <T> void wait(!T, long) = native void Object.wait(long); ! <T> void wait(!T, long, int) = native void Object.wait(long, int); ! <T> void notify(!T) = native void Object.notify(); ! <T> void notifyAll(!T) = native void Object.notifyAll(); /** |