diff --git a/build.xml b/build.xml index dc72dc9bc..44eecb7af 100644 --- a/build.xml +++ b/build.xml @@ -274,7 +274,7 @@ LOCAL REFERENCE BUILD (LOCKER) + src/build/msil.xml in msil branch for more details. --> --> - - - - - - - - - - - - - - - - @@ -1586,14 +1568,9 @@ FORWARDED TARGETS FOR PACKAGING - - - - - - - + + diff --git a/src/build/msil.properties.SAMPLE b/src/build/msil.properties.SAMPLE deleted file mode 100644 index e50eb8db2..000000000 --- a/src/build/msil.properties.SAMPLE +++ /dev/null @@ -1,4 +0,0 @@ -unix.mono.home=/home/linuxsoft/apps/mono -win.mono.home=C:/Progra~1/Mono - -dotnet.home=C:/Windows/Micros~1.NET/Framew~1/v2.0.50727 diff --git a/src/build/msil.xml b/src/build/msil.xml deleted file mode 100644 index e64c88714..000000000 --- a/src/build/msil.xml +++ /dev/null @@ -1,316 +0,0 @@ - - - - - - SuperSabbus extension for the MSIL library targeted for the dotnet framework. THIS FILE IS NOT STAND-ALONE AND SHOULD ONLY BE USED THROUGH ENTRY POINTS IN SUPERSABBUS. - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/build/pack.xml b/src/build/pack.xml index c3de6d5d1..301150352 100644 --- a/src/build/pack.xml +++ b/src/build/pack.xml @@ -260,60 +260,6 @@ JAVA FOUR DISTRIBUTION PACKAGING - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -322,8 +268,6 @@ MISCELLANEOUS - - diff --git a/src/dotnet-library/README b/src/dotnet-library/README deleted file mode 100644 index a85976cdc..000000000 --- a/src/dotnet-library/README +++ /dev/null @@ -1,78 +0,0 @@ -INFO: The dotnet-library tree has been synchronized with -revision 15115 of src/library on $Date: 2008-05-21 14:33:42 +0200 (Wed, 21 May 2008) $. - -IMPORTANT: -Never, never, never, ever add/remove/edit files in the dotnet-library -tree by hand. If you need to change sth use the opportunity to merge -the changes that have occured since the last merge. Any manual intervention -makes the merging harder and is to be considerd rude and counterproductive. - -HOW TO MERGE: -You can obtain the revision number of the last merge from the commit history -of the tree. Or from the second line of this document. But you should -always check to see if it is consistent with svn log messages. - - -lamppc26:trunk luc$ svn log -r 15115 ------------------------------------------------------------------------- -r15115 | rytz | 2008-05-20 16:57:39 +0200 (Tue, 20 May 2008) | 1 line - -Synced src/dotnet-library with rev 15086 of src/library ------------------------------------------------------------------------- - - -Unless you have a specific revision in mind you can check the lates revision -of the src/library tree with - -koko:~/scala>svn info src/library/ -Path: src/library -URL: https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk/src/library -Repository Root: https://lampsvn.epfl.ch/svn-repos/scala -Repository UUID: 5e8d7ff9-d8ef-0310-90f0-a4852d11357a -Revision: 12880 -Node Kind: directory -Schedule: normal -Last Changed Author: mihaylov -Last Changed Rev: 12880 -Last Changed Date: 2007-09-17 12:56:57 +0200 (Mon, 17 Sep 2007) - - -From this we could figure out that we need to merge the changes that happened -between revisions 12365 and 12880 of the src/library tree: - -koko:~/scala/src/dotnet-library>svn merge \ -https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk/src/library@12365 \ -https://lampsvn.epfl.ch/svn-repos/scala/scala/trunk/src/library@12880 ./ - - -(note the ./ at the end of the line specifying the working copy) - -You'll get many "Skipped missing target: ..." messages because this tree -only contains files that are different for MSIL. Hopefully, changes in those -files do not introduce anything platform-specific because they will be copied -from the src/library tree. If there are platform-specific changes, the -offending file has to be added to the dotnet-library tree and modified to -compile for .NET. - -When you have sorted out the conflicts (by means of manual editing and -'svn resolved'), at the top project directory run - -ant msil - -to check, at the bare minimum, whether the MSIL subset of the library compiles. -If this is fine, you can commit your changes but make sure that in the commit -message you - - INCLUDE THE REVISION NUMBER WITH WHICH YOU HAVE MERGED!!!! - -This is very important because subversion will not keep it for you. And this -number is absilutely necessary for the next merge. Also, you should update -the revision number in this document for consistency. - -koko:~/scala/src/dotnet-library>svn ci -m "Synced src/dotnet-library with rev 12880 of src/library" -Adding dotnet-library/README -Sending dotnet-library/scala/Predef.scala -Sending dotnet-library/scala/Random.scala -Sending dotnet-library/scala/runtime/RichString.scala -Transmitting file data .... -Committed revision 12881. diff --git a/src/dotnet-library/scala/Application.scala b/src/dotnet-library/scala/Application.scala deleted file mode 100644 index ad7062187..000000000 --- a/src/dotnet-library/scala/Application.scala +++ /dev/null @@ -1,93 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala - -//import java.lang.System.getProperty -//import scala.compat.Platform.currentTime - -/**

- * The Application trait can be used to quickly turn objects - * into executable programs, but is not recommended. - * Here is an example: - *

- *  object Main with Application {
- *    Console.println("Hello World!");
- *  }
- *  
- *

- * Here, object Main inherits the main method - * of Application. The body of the Main object - * defines the main program. This technique does not work if the main - * program depends on command-line arguments (which are not accessible - * with the technique presented here). - *

- *

- * It is possible to time the execution of objects that inherit from class - * Application by setting the global scala.time - * property. Here is an example for benchmarking object Main: - *

- *  java -Dscala.time Main
- *  
- *

- * In practice the Application trait has a number of serious - * pitfalls: - *

- *
    - *
  • Threaded code that references the object will block until static - * initialization is complete. However, because the entire execution of an - * object extending Application takes place during - * static initialization, concurrent code will always deadlock if - * it must synchronize with the enclosing object.
  • - *
  • As described above, there is no way to obtain the - * command-line arguments because all code in body of an object - * extending Application is run as part of the static initialization - * which occurs before Application's main method - * even begins execution.
  • - *
  • Static initializers are run only once during program execution, and - * JVM authors usually assume their execution to be relatively short. - * Therefore, certain JVM configurations may become confused, or simply fail to - * optimize or JIT the code in the body of an object extending - * Application. This can lead to a significant - * performance degradation.
  • - *
- * - * Instead, it is recommended to define a main method explicitly: - *
- *  object Main {
- *    def main(args: Array[String]) {
- *      //..
- *    }
- *  }
- *  
- * - * @author Matthias Zenger - * @version 1.0, 10/09/2003 - */ - -trait Application { - - /** The time when execution of this program started. - */ -// val executionStart: Long = currentTime - - /** The default main method. - * - * @param args the arguments passed to the main method - */ - def main(args: Array[String]) { -// if (getProperty("scala.time") ne null) { -// val total = currentTime - executionStart -// Console.println("[total " + total + "ms]") -// } - } - -} diff --git a/src/dotnet-library/scala/BigDecimal.scala b/src/dotnet-library/scala/BigDecimal.scala deleted file mode 100644 index eace51c97..000000000 --- a/src/dotnet-library/scala/BigDecimal.scala +++ /dev/null @@ -1 +0,0 @@ -/* BigDecimal.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/BigInt.scala b/src/dotnet-library/scala/BigInt.scala deleted file mode 100644 index 192d2adbc..000000000 --- a/src/dotnet-library/scala/BigInt.scala +++ /dev/null @@ -1 +0,0 @@ -/* BigInt does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/Console.scala b/src/dotnet-library/scala/Console.scala deleted file mode 100644 index f550b243a..000000000 --- a/src/dotnet-library/scala/Console.scala +++ /dev/null @@ -1,310 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala - - -import System.IO.{TextReader,TextWriter} - -import scala.util.DynamicVariable -import Predef._ - - -/** The Console object implements functionality for - * printing Scala values on the terminal. There are also functions - * for reading specific values. Console also defines - * constants for marking up text on ANSI terminals. - * - * @author Matthias Zenger - * @version 1.0, 03/09/2003 - */ -object Console { - - // ANSI colors foreground - final val BLACK = "\033[30m" - final val RED = "\033[31m" - final val GREEN = "\033[32m" - final val YELLOW = "\033[33m" - final val BLUE = "\033[34m" - final val MAGENTA = "\033[35m" - final val CYAN = "\033[36m" - final val WHITE = "\033[37m" - - // ANSI colors background - final val BLACK_B = "\033[40m" - final val RED_B = "\033[41m" - final val GREEN_B = "\033[42m" - final val YELLOW_B = "\033[43m" - final val BLUE_B = "\033[44m" - final val MAGENTA_B = "\033[45m" - final val CYAN_B = "\033[46m" - final val WHITE_B = "\033[47m" - - // ANSI styles - final val RESET = "\033[0m" - final val BOLD = "\033[1m" - final val UNDERLINED = "\033[4m" - final val BLINK = "\033[5m" - final val REVERSED = "\033[7m" - final val INVISIBLE = "\033[8m" - - private val outVar = new DynamicVariable[TextWriter](System.Console.Out) - private val inVar = new DynamicVariable[TextReader](System.Console.In) - - def out = outVar.value - def in = inVar.value - - /** Set the default output stream. - * - * @param out the new output stream. - */ - def setOut(out: TextWriter) { outVar.value = out } - - /** Set the default output stream for the duration - * of execution of one thunk. - * - * @param out the new output stream. - * @param thunk the code to execute with - * the new output stream active - */ - def withOut[T](out: TextWriter)(thunk: =>T): T = - outVar.withValue(out)(thunk) - - - /** Set the default input stream. - * - * @param reader specifies the new input stream. - */ - def setIn(reader: TextReader) { - inVar.value = reader - } - - /** Set the default input stream for the duration - * of execution of one thunk. - * - * @param in the new input stream. - * @param thunk the code to execute with - * the new input stream active - */ - def withIn[T](reader: TextReader)(thunk: =>T): T = - inVar.withValue(reader)(thunk) - - /** Print an object on the terminal. - * - * @param obj the object to print. - */ - def print(obj: Any) { - out.Write(if (null == obj) "null" else obj.toString()) - } - - /** Flush the output stream. This function is required when partial - * output (i.e. output not terminated by a new line character) has - * to be made visible on the terminal. - */ - def flush() { out.Flush() } - - /** Print a new line character on the terminal. - */ - def println() { out.WriteLine() } - - /** Print out an object followed by a new line character. - * - * @param x the object to print. - */ - def println(x: Any) { out.WriteLine(x) } - - /**

- * Prints its arguments as a formatted string, based on a string - * pattern (in a fashion similar to printf in C). - *

- *

- * The interpretation of the formatting patterns is described in - * - * java.util.Formatter. - *

- * - * @param text the pattern for formatting the arguments. - * @param args the arguments used to instantiating the pattern. - * @throws java.lang.IllegalArgumentException - */ - def printf(text: String, args: Any*) { format(text, args: _*) } - - /** - * @see Console.printf. - */ - def format(text: String, args: Any*) { - if (text eq null) out.Write("null") - else out.Write(text, args.toArray) - } - - /** Read a full line from the terminal. Throws System.IO.EndOfStreamException if the end of the - * input stream has been reached. - * - * @return the string read from the terminal. - * @throws System.IO.EndOfStreamException - */ - def readLine(): String = { - val s = in.ReadLine() - if (s == null) throw new System.IO.EndOfStreamException("Console has reached end of input") else s - } - - /** Print a formatted text and read a full line from the terminal. - * Returns null if the end of the input stream has been reached. - * - * @param text the format of the text to print out. - * @param args the parameters used to instantiate the format. - * @return the string read from the terminal. - */ - def readLine(text: String, args: Any*): String = { - printf(text, args: _*) - readLine() - } - - - /** Read a boolean value from the terminal. - * - * @return the boolean value read from the terminal. - */ - def readBoolean(): Boolean = readLine().toLowerCase() match { - case "true" => true - case "t" => true - case "yes" => true - case "y" => true - case _ => false - } - - /** Read a byte value from the terminal. - */ - def readByte(): Byte = readLine().toByte - - /** Read a short value from the terminal. - */ - def readShort(): Short = readLine().toShort - - /** Read a char value from the terminal. - */ - def readChar(): Char = readLine() charAt 0 - - /** Read an int value from the terminal. - */ - def readInt(): Int = readLine().toInt - - /** Read an int value from the terminal. - */ - def readLong(): Long = readLine().toLong - - /** Read a float value from the terminal. - */ - def readFloat(): Float = readLine().toFloat - - /** Read a double value from the terminal. - */ - def readDouble(): Double = readLine().toDouble - -// /** Read in some structured input, specified by a format specifier. -// * See class java.text.MessageFormat for details of -// * the format specification. -// * -// * @param format the format of the input. -// * @return a list of all extracted values. -// */ -// def readf(format: String): List[Any] = -// textComponents(new MessageFormat(format).parse(readLine())) - -// /** Read in some structured input, specified by a format specifier. -// * Opposed to readf, this function only returns the -// * first value extracted from the input according to the format -// * specification. -// * -// * @param format ... -// * @return ... -// */ -// def readf1(format: String): Any = readf(format).head - -// /** Read in some structured input, specified by a format specifier. -// * Opposed to readf, this function only returns the -// * first two values extracted from the input according to the format -// * specification. -// * -// * @param format ... -// * @return ... -// */ -// def readf2(format: String): (Any, Any) = { -// val res = readf(format) -// (res.head, res.tail.head) -// } - -// /** Read in some structured input, specified by a format specifier. -// * Opposed to readf, this function only returns the -// * first three values extracted from the input according to the format -// * specification. -// * -// * @param format ... -// * @return ... -// */ -// def readf3(format: String): (Any, Any, Any) = { -// val res = readf(format) -// (res.head, res.tail.head, res.tail.tail.head) -// } - -// private def textComponents(a: Array[AnyRef]): List[Any] = { -// var i: Int = a.length - 1 -// var res: List[Any] = Nil -// while (i >= 0) { -// res = (a(i) match { -// case x: java.lang.Boolean => x.booleanValue() -// case x: java.lang.Byte => x.byteValue() -// case x: java.lang.Short => x.shortValue() -// case x: java.lang.Character => x.charValue() -// case x: java.lang.Integer => x.intValue() -// case x: java.lang.Long => x.longValue() -// case x: java.lang.Float => x.floatValue() -// case x: java.lang.Double => x.doubleValue() -// case x => x -// }) :: res; -// i = i - 1 -// } -// res -// } - -// private def textParams(s: Seq[Any]): Array[AnyRef] = { -// val res = new Array[AnyRef](s.length) -// var i: Int = 0 -// val iter = s.iterator -// while (iter.hasNext) { -// res(i) = iter.next match { -// case x: Boolean => java.lang.Boolean.valueOf(x) -// /** Should use java.lang.Byte.valueOf(Byte), but only available -// * in Java 1.5 and above. */ -// case x: Byte => new java.lang.Byte(x) -// /** Should use java.lang.Short.valueOf(Short), but only available -// * in Java 1.5 and above. */ -// case x: Short => new java.lang.Short(x) -// /** Should use java.lang.Character.valueOf(Char), but only available -// * in Java 1.5 and above. */ -// case x: Char => new java.lang.Character(x) -// /** Should use java.lang.Integer.valueOf(Int), but only available -// * in Java 1.5 and above. */ -// case x: Int => new java.lang.Integer(x) -// /** Should use java.lang.Long.valueOf(Long), but only available -// * in Java 1.5 and above. */ -// case x: Long => new java.lang.Long(x) -// case x: Float => new java.lang.Float(x) -// case x: Double => new java.lang.Double(x) -// case x: Unit => "()" -// case x: AnyRef => x -// } -// i += 1 -// } -// res -// } -} diff --git a/src/dotnet-library/scala/Math.scala b/src/dotnet-library/scala/Math.scala deleted file mode 100644 index e873b7a47..000000000 --- a/src/dotnet-library/scala/Math.scala +++ /dev/null @@ -1,146 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala - -/** The object Math contains methods for performing basic numeric - * operations such as the elementary exponential, logarithm, square root, and - * trigonometric functions. - */ -object Math { - - /** The smallest possible value for scala.Byte. */ - val MIN_BYTE = System.Byte.MinValue - /** The greatest possible value for scala.Byte. */ - val MAX_BYTE = System.Byte.MaxValue - - /** The smallest possible value for scala.Short. */ - val MIN_SHORT = System.Int16.MinValue - /** The greatest possible value for scala.Short. */ - val MAX_SHORT = System.Int16.MaxValue - - /** The smallest possible value for scala.Char. */ - val MIN_CHAR = System.Char.MinValue - /** The greatest possible value for scala.Char. */ - val MAX_CHAR = System.Char.MaxValue - - /** The smallest possible value for scala.Int. */ - val MIN_INT = System.Int32.MinValue - /** The greatest possible value for scala.Int. */ - val MAX_INT = System.Int32.MaxValue - - /** The smallest possible value for scala.Long. */ - val MIN_LONG = System.Int64.MinValue - /** The greatest possible value for scala.Long. */ - val MAX_LONG = System.Int64.MaxValue - - /** The smallest possible value for scala.Float. */ - val MIN_FLOAT = System.Single.MinValue - /** The smallest difference between two values of scala.Float. */ - val EPS_FLOAT = System.Single.Epsilon - /** The greatest possible value for scala.Float. */ - val MAX_FLOAT = System.Single.MinValue - /** A value of type scala.Float that represents no number. */ - //val NaN_FLOAT = System.Single.NaN - /** Negative infinity of type scala.Float. */ - //val NEG_INF_FLOAT = System.Double.NegativeInfinity - /** Positive infinity of type scala.Float. */ - //val POS_INF_FLOAT = System.Double.PositiveInfinity - - /** The smallest possible value for scala.Double. */ - val MIN_DOUBLE = System.Double.MinValue - /** The smallest difference between two values of scala.Double. */ - val EPS_DOUBLE = System.Double.Epsilon - /** The greatest possible value for scala.Double. */ - val MAX_DOUBLE = System.Double.MaxValue - /** A value of type scala.Double that represents no number. */ - //val NaN_DOUBLE = System.Double.NaN - /** Negative infinity of type scala.Double. */ - //val NEG_INF_DOUBLE = System.Double.NegativeInfinity - /** Positive infinity of type scala.Double. */ - //val POS_INF_DOUBLE = System.Double.PositiveInfinity - - /** The double value that is closer than any other to - * e, the base of the natural logarithms. - */ - - val E = System.Math.E - val Pi = System.Math.PI - - //def random: Double = System.Math.random() - - def sin(x: Double): Double = System.Math.Sin(x) - def cos(x: Double): Double = System.Math.Cos(x) - def tan(x: Double): Double = System.Math.Tan(x) - def asin(x: Double): Double = System.Math.Asin(x) - def acos(x: Double): Double = System.Math.Acos(x) - def atan(x: Double): Double = System.Math.Atan(x) - - def toRadians(x: Double): Double = x * Pi / 180.0 - - def toDegrees(x: Double): Double = x * 180.0 / Pi - - def exp(x: Double): Double = System.Math.Exp(x) - def log(x: Double): Double = System.Math.Log(x) - def sqrt(x: Double): Double = System.Math.Sqrt(x) - def sqrt(x: Int): Int = System.Math.Sqrt(x.toDouble).toInt - def IEEEremainder(x: Double, y: Double): Double = System.Math.IEEERemainder(x, y) - - def ceil(x: Double): Double = System.Math.Ceiling(x) - def floor(x: Double): Double = System.Math.Floor(x) - - //def rint(x: Double): Double = System.Math.rint(x) - def atan2(y: Double, x: Double): Double = System.Math.Atan2(y, x) - def pow(x: Double, y: Double): Double = System.Math.Pow(x, y) - def round(x: Float): Int = System.Math.Round(x).toInt - def round(x: Double): Long = System.Math.Round(x).toLong - - def abs(x: Int): Int = System.Math.Abs(x) - def abs(x: Long): Long = System.Math.Abs(x) - def abs(x: Float): Float = System.Math.Abs(x) - def abs(x: Double): Double = System.Math.Abs(x) - - def max(x: Int, y: Int): Int = System.Math.Max(x, y) - def max(x: Long, y: Long): Long = System.Math.Max(x, y) - def max(x: Float, y: Float): Float = System.Math.Max(x, y) - def max(x: Double, y: Double): Double = System.Math.Max(x, y) - - def min(x: Int, y: Int): Int = System.Math.Min(x, y) - def min(x: Long, y: Long): Long = System.Math.Min(x, y) - def min(x: Float, y: Float): Float = System.Math.Min(x, y) - def min(x: Double, y: Double): Double = System.Math.Min(x, y) - - def signum(x: Double): Double = x match { case 0 => 0 - case y if y < 0 => -1.0 - case y if y > 0 => 1.0 } - def signum(x: Float): Float = x match { case 0f => 0f - case y if y < 0f => -1.0f - case y if y > 0f => 1.0f } - def signum(x: Long): Long = x match { case 0l => 0l - case y if y < 0l => -1l - case y if y > 0l => 1l } - def signum(x: Int): Int = x match { case 0 => 0 - case y if y < 0 => -1 - case y if y > 0 => 1} - - // from Java 1.5 -// def log10(x: Double): Double = java.lang.Math.log10(x) -// def cbrt(x: Double): Double = java.lang.Math.cbrt(x) - // -// def ulp(x: Double): Double = java.lang.Math.ulp(x) -// def ulp(x: Float): Float = java.lang.Math.ulp(x) -// def sinh(x: Double): Double = java.lang.Math.sinh(x) -// def cosh(x: Double): Double = java.lang.Math.cosh(x) -// def tanh(x: Double):Double = java.lang.Math.tanh(x) -// def hypot(x: Double, y: Double): Double = java.lang.Math.hypot(x, y) -// def expm1(x: Double): Double = java.lang.Math.expm1(x) -// def log1p(x: Double): Double = java.lang.Math.log1p(x) -} diff --git a/src/dotnet-library/scala/Numeric.scala b/src/dotnet-library/scala/Numeric.scala deleted file mode 100644 index 5fe7a04fa..000000000 --- a/src/dotnet-library/scala/Numeric.scala +++ /dev/null @@ -1,117 +0,0 @@ -package scala - -object Numeric { -// trait BigIntIsIntegral extends Integral[BigInt] { -// def plus(x: BigInt, y: BigInt): BigInt = x + y -// def minus(x: BigInt, y: BigInt): BigInt = x - y -// def times(x: BigInt, y: BigInt): BigInt = x * y -// def quot(x: BigInt, y: BigInt): BigInt = x / y -// def rem(x: BigInt, y: BigInt): BigInt = x % y -// def negate(x: BigInt): BigInt = -x -// def abs(x: BigInt): BigInt = if (x < 0) -x else x -// def signum(x: BigInt): BigInt = if (x < 0) -1 else if (x > 0) 1 else 0 -// def fromInt(x: Int): BigInt = BigInt(x) -// def toInt(x: BigInt): Int = x.intValue -// def toLong(x: BigInt): Long = x.longValue -// def toFloat(x: BigInt): Float = x.longValue.toFloat -// def toDouble(x: BigInt): Double = x.longValue.toDouble -// } -// implicit object BigIntIsIntegral extends BigIntIsIntegral - - trait IntIsIntegral extends Integral[Int] { - def plus(x: Int, y: Int): Int = x + y - def minus(x: Int, y: Int): Int = x - y - def times(x: Int, y: Int): Int = x * y - def quot(x: Int, y: Int): Int = x / y - def rem(x: Int, y: Int): Int = x % y - def negate(x: Int): Int = -x - def abs(x: Int): Int = if (x < 0) -x else x - def signum(x: Int): Int = if (x < 0) -1 else if (x > 0) 1 else 0 - def fromInt(x: Int): Int = x - def toInt(x: Int): Int = x - def toLong(x: Int): Long = x - def toFloat(x: Int): Float = x - def toDouble(x: Int): Double = x - } - implicit object IntIsIntegral extends IntIsIntegral - - trait LongIsIntegral extends Integral[Long] { - def plus(x: Long, y: Long): Long = x + y - def minus(x: Long, y: Long): Long = x - y - def times(x: Long, y: Long): Long = x * y - def quot(x: Long, y: Long): Long = x / y - def rem(x: Long, y: Long): Long = x % y - def negate(x: Long): Long = -x - def abs(x: Long): Long = if (x < 0) -x else x - def signum(x: Long): Long = if (x < 0) -1 else if (x > 0) 1 else 0 - def fromInt(x: Int): Long = x - def toInt(x: Long): Int = x.toInt - def toLong(x: Long): Long = x - def toFloat(x: Long): Float = x - def toDouble(x: Long): Double = x - } - implicit object LongIsIntegral extends LongIsIntegral - - trait FloatIsFractional extends Fractional[Float] { - def plus(x: Float, y: Float): Float = x + y - def minus(x: Float, y: Float): Float = x - y - def times(x: Float, y: Float): Float = x * y - def div(x: Float, y: Float): Float = x / y - def negate(x: Float): Float = -x - def abs(x: Float): Float = if (x < 0) -x else x - def signum(x: Float): Float = if (x < 0) -1 else if (x > 0) 1 else 0 - def fromInt(x: Int): Float = x - def toInt(x: Float): Int = x.toInt - def toLong(x: Float): Long = x.toLong - def toFloat(x: Float): Float = x - def toDouble(x: Float): Double = x - } - implicit object FloatIsFractional extends FloatIsFractional - - trait DoubleIsFractional extends Fractional[Double] { - def plus(x: Double, y: Double): Double = x + y - def minus(x: Double, y: Double): Double = x - y - def times(x: Double, y: Double): Double = x * y - def div(x: Double, y: Double): Double = x / y - def negate(x: Double): Double = -x - def abs(x: Double): Double = if (x < 0) -x else x - def signum(x: Double): Double = if (x < 0) -1 else if (x > 0) 1 else 0 - def fromInt(x: Int): Double = x - def toInt(x: Double): Int = x.toInt - def toLong(x: Double): Long = x.toLong - def toFloat(x: Double): Float = x.toFloat - def toDouble(x: Double): Double = x - } - implicit object DoubleIsFractional extends DoubleIsFractional - -} - -trait Numeric[T] { - def plus(x: T, y: T): T - def minus(x: T, y: T): T - def times(x: T, y: T): T - def negate(x: T): T - def abs(x: T): T - def signum(x: T): T - def fromInt(x: Int): T - def toInt(x: T): Int - def toLong(x: T): Long - def toFloat(x: T): Float - def toDouble(x: T): Double - def zero = fromInt(0) - def one = fromInt(1) - - class Ops(lhs: T) { - def +(rhs: T) = plus(lhs, rhs) - def -(rhs: T) = minus(lhs, rhs) - def *(rhs: T) = times(lhs, rhs) - def unary_-() = negate(lhs) - def abs(): T = Numeric.this.abs(lhs) - def signum(): T = Numeric.this.signum(lhs) - def toInt(): Int = Numeric.this.toInt(lhs) - def toLong(): Long = Numeric.this.toLong(lhs) - def toFloat(): Float = Numeric.this.toFloat(lhs) - def toDouble(): Double = Numeric.this.toDouble(lhs) - } - implicit def mkNumericOps(lhs: T): Ops = new Ops(lhs) -} diff --git a/src/dotnet-library/scala/Ordering.scala b/src/dotnet-library/scala/Ordering.scala deleted file mode 100644 index f116e05ef..000000000 --- a/src/dotnet-library/scala/Ordering.scala +++ /dev/null @@ -1,319 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -package scala - -/** A trait for representing total orderings. It is important to - * distinguish between a type that has a total order and a representation - * of total ordering on some type. This trait is for representing the - * latter. - * - * A total ordering - * is a binary relation on a type T that is also an equivalence relation - * and partial ordering on values of type T. This relation is exposed as - * the compare method of the Ordering trait. - * This relation must be: - *
    - *
  • reflexive: compare(x, x) == 0, for any x of - * type T.
  • - *
  • symmetry: compare(x, y) == z and compare(y, x) == w - * then Math.signum(z) == -Math.signum(w), for any x and y of - * type T and z and w of type Int.
  • - *
  • transitive: if compare(x, y) == z and compare(y, w) == v - * and Math.signum(z) >= 0 and Math.signum(v) >= 0 then - * compare(x, w) == u and Math.signum(z + v) == Math.signum(u), - * for any x, y, - * and w of type T and z, v, and u - * of type Int.
  • - *
- * - * @author Geoffrey Washburn - * @version 0.9.5, 2008-04-15 - */ - -trait Ordering[T] extends PartialOrdering[T] { - /** Returns a negative integer iff x comes before - * y in the ordering, returns 0 iff x - * is the same in the ordering as y, and returns a - * positive number iff x comes after - * y in the ordering. - */ - def compare(x: T, y: T): Int - - /** Returns true iff x comes before - * y in the ordering. - */ - override def lteq(x: T, y: T): Boolean = compare(x, y) <= 0 - - /** Returns true iff y comes before - * x in the ordering. - */ - override def gteq(x: T, y: T): Boolean = compare(x, y) >= 0 - - /** Returns true iff x comes before - * y in the ordering and is not the same as y. - */ - override def lt(x: T, y: T): Boolean = compare(x, y) < 0 - - /** Returns true iff y comes before - * x in the ordering and is not the same as x. - */ - override def gt(x: T, y: T): Boolean = compare(x, y) > 0 - - /** Returns true iff x is equivalent to - * y in the ordering. - */ - override def equiv(x: T, y: T): Boolean = compare(x, y) == 0 - - class Ops(lhs: T) { - def <(rhs: T) = lt(lhs, rhs) - def <=(rhs: T) = lteq(lhs, rhs) - def >(rhs: T) = gt(lhs, rhs) - def >=(rhs: T) = gteq(lhs, rhs) - def ===(rhs: T) = equiv(lhs, rhs) - def !==(rhs: T) = !equiv(lhs, rhs) - } - implicit def mkOrderingOps(lhs: T): Ops = new Ops(lhs) -} - -object Ordering -{ - def apply[T](implicit ord : Ordering[T]) = ord - - implicit val Unit : Ordering[Unit] = new Ordering[Unit] { - def compare(x : Unit, y : Unit) = 0; - } - - implicit val Boolean : Ordering[Boolean] = new Ordering[Boolean] { - def compare(x : Boolean, y : Boolean) = (x, y) match { - case (false, true) => -1; - case (true, false) => 1; - case _ => 0; - } - } - - implicit val Byte : Ordering[Byte] = new Ordering[Byte] { - def compare(x : Byte, y : Byte) = x.toInt - y.toInt; - } - - implicit val Char : Ordering[Char] = new Ordering[Char] { - def compare(x : Char, y : Char) = x.toInt - y.toInt; - } - - implicit val Short : Ordering[Short] = new Ordering[Short] { - def compare(x : Short, y : Short) = x.toInt - y.toInt; - } - - implicit val Int : Ordering[Int] = new Ordering[Int] { - def compare(x : Int, y : Int) = - if(x < y) -1; - else if (x == y) 0; - else 1 - } - - implicit val Long : Ordering[Long] = new Ordering[Long] { - def compare(x : Long, y : Long) = - if(x < y) -1; - else if (x == y) 0; - else 1 - } - - implicit val Float : Ordering[Float] = new Ordering[Float] { - def compare(x : Float, y : Float) = - if(x < y) -1; - else if (x == y) 0; - else 1 - } - - implicit val Double : Ordering[Double] = new Ordering[Double] { - def compare(x : Double, y : Double) = - if(x < y) -1; - else if (x == y) 0; - else 1 - } - -// implicit val BigInt : Ordering[BigInt] = new Ordering[BigInt] { -// def compare(x : BigInt, y : BigInt) = x.compare(y); -// } - - implicit val String : Ordering[String] = new Ordering[String] { - def compare(x : String, y : String) = x.compareTo(y); - } - - implicit def Option[T](implicit ord : Ordering[T]) : Ordering[Option[T]] = - new Ordering[Option[T]] { - def compare(x : Option[T], y : Option[T]) = (x, y) match { - case (None, None) => 0; - case (None, _) => -1; - case (_, None) => 1 - case (Some(x), Some(y)) => ord.compare(x, y); - } - } - - implicit def Iterable[T](implicit ord : Ordering[T]) : Ordering[Iterable[T]] = - new Ordering[Iterable[T]] { - def compare(x : Iterable[T], y : Iterable[T]) : Int = { - val xe = x.iterator; - val ye = y.iterator; - - while (xe.hasNext && ye.hasNext){ - val res = ord.compare(xe.next, ye.next); - if (res != 0) return res; - } - - Boolean.compare(xe.hasNext, ye.hasNext); - } - } - - implicit def Tuple2[T1, T2](implicit ord1 : Ordering[T1], ord2 : Ordering[T2]) : Ordering[(T1, T2)] = - new Ordering[(T1, T2)]{ - def compare(x : Tuple2[T1, T2], y : Tuple2[T1, T2]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - 0; - } - } - - implicit def Tuple3[T1, T2, T3](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3]) : Ordering[(T1, T2, T3)] = - new Ordering[(T1, T2, T3)]{ - def compare(x : Tuple3[T1, T2, T3], y : Tuple3[T1, T2, T3]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - 0; - } - } - - implicit def Tuple4[T1, T2, T3, T4](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4]) : Ordering[(T1, T2, T3, T4)] = - new Ordering[(T1, T2, T3, T4)]{ - def compare(x : Tuple4[T1, T2, T3, T4], y : Tuple4[T1, T2, T3, T4]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - 0; - } - } - - implicit def Tuple5[T1, T2, T3, T4, T5](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4], ord5 : Ordering[T5]) : Ordering[(T1, T2, T3, T4, T5)] = - new Ordering[(T1, T2, T3, T4, T5)]{ - def compare(x : Tuple5[T1, T2, T3, T4, T5], y : Tuple5[T1, T2, T3, T4, T5]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - val compare5 = ord5.compare(x._5, y._5); - if (compare5 != 0) return compare5; - 0; - } - } - - implicit def Tuple6[T1, T2, T3, T4, T5, T6](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4], ord5 : Ordering[T5], ord6 : Ordering[T6]) : Ordering[(T1, T2, T3, T4, T5, T6)] = - new Ordering[(T1, T2, T3, T4, T5, T6)]{ - def compare(x : Tuple6[T1, T2, T3, T4, T5, T6], y : Tuple6[T1, T2, T3, T4, T5, T6]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - val compare5 = ord5.compare(x._5, y._5); - if (compare5 != 0) return compare5; - val compare6 = ord6.compare(x._6, y._6); - if (compare6 != 0) return compare6; - 0; - } - } - - implicit def Tuple7[T1, T2, T3, T4, T5, T6, T7](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4], ord5 : Ordering[T5], ord6 : Ordering[T6], ord7 : Ordering[T7]) : Ordering[(T1, T2, T3, T4, T5, T6, T7)] = - new Ordering[(T1, T2, T3, T4, T5, T6, T7)]{ - def compare(x : Tuple7[T1, T2, T3, T4, T5, T6, T7], y : Tuple7[T1, T2, T3, T4, T5, T6, T7]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - val compare5 = ord5.compare(x._5, y._5); - if (compare5 != 0) return compare5; - val compare6 = ord6.compare(x._6, y._6); - if (compare6 != 0) return compare6; - val compare7 = ord7.compare(x._7, y._7); - if (compare7 != 0) return compare7; - 0; - } - } - - implicit def Tuple8[T1, T2, T3, T4, T5, T6, T7, T8](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4], ord5 : Ordering[T5], ord6 : Ordering[T6], ord7 : Ordering[T7], ord8 : Ordering[T8]) : Ordering[(T1, T2, T3, T4, T5, T6, T7, T8)] = - new Ordering[(T1, T2, T3, T4, T5, T6, T7, T8)]{ - def compare(x : Tuple8[T1, T2, T3, T4, T5, T6, T7, T8], y : Tuple8[T1, T2, T3, T4, T5, T6, T7, T8]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - val compare5 = ord5.compare(x._5, y._5); - if (compare5 != 0) return compare5; - val compare6 = ord6.compare(x._6, y._6); - if (compare6 != 0) return compare6; - val compare7 = ord7.compare(x._7, y._7); - if (compare7 != 0) return compare7; - val compare8 = ord8.compare(x._8, y._8); - if (compare8 != 0) return compare8; - 0; - } - } - - implicit def Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9](implicit ord1 : Ordering[T1], ord2 : Ordering[T2], ord3 : Ordering[T3], ord4 : Ordering[T4], ord5 : Ordering[T5], ord6 : Ordering[T6], ord7 : Ordering[T7], ord8 : Ordering[T8], ord9 : Ordering[T9]) : Ordering[(T1, T2, T3, T4, T5, T6, T7, T8, T9)] = - new Ordering[(T1, T2, T3, T4, T5, T6, T7, T8, T9)]{ - def compare(x : Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9], y : Tuple9[T1, T2, T3, T4, T5, T6, T7, T8, T9]) : Int = { - val compare1 = ord1.compare(x._1, y._1); - if (compare1 != 0) return compare1; - val compare2 = ord2.compare(x._2, y._2); - if (compare2 != 0) return compare2; - val compare3 = ord3.compare(x._3, y._3); - if (compare3 != 0) return compare3; - val compare4 = ord4.compare(x._4, y._4); - if (compare4 != 0) return compare4; - val compare5 = ord5.compare(x._5, y._5); - if (compare5 != 0) return compare5; - val compare6 = ord6.compare(x._6, y._6); - if (compare6 != 0) return compare6; - val compare7 = ord7.compare(x._7, y._7); - if (compare7 != 0) return compare7; - val compare8 = ord8.compare(x._8, y._8); - if (compare8 != 0) return compare8; - val compare9 = ord9.compare(x._9, y._9); - if (compare9 != 0) return compare9; - 0; - } - } - -} diff --git a/src/dotnet-library/scala/Predef.scala b/src/dotnet-library/scala/Predef.scala deleted file mode 100644 index 2f92e2cc2..000000000 --- a/src/dotnet-library/scala/Predef.scala +++ /dev/null @@ -1,237 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala - - -/** The Predef object provides definitions that are - * accessible in all Scala compilation units without explicit - * qualification. - */ -object Predef { - - // classOf dummy ------------------------------------------------------ - - /** Return the runtime representation of a class type. */ - def classOf[T]: Class[T] = null - - // aliases ------------------------------------------------------------ - - @deprecated type byte = scala.Byte - @deprecated type short = scala.Short - @deprecated type char = scala.Char - @deprecated type int = scala.Int - @deprecated type long = scala.Long - @deprecated type float = scala.Float - @deprecated type double = scala.Double - @deprecated type boolean = scala.Boolean - @deprecated type unit = scala.Unit - - type String = System.String - type Class[T] = System.Type - type Runnable = scala.runtime.Runnable - - type Throwable = System.Exception - type Exception = System.Exception - type Error = System.Exception - - type RuntimeException = System.Exception - type NullPointerException = System.NullReferenceException - type ClassCastException = System.InvalidCastException - type IndexOutOfBoundsException = System.IndexOutOfRangeException - type ArrayIndexOutOfBoundsException = System.IndexOutOfRangeException - type StringIndexOutOfBoundsException = System.IndexOutOfRangeException - type UnsupportedOperationException = System.InvalidOperationException - type IllegalArgumentException = System.ArgumentException - type NoSuchElementException = System.InvalidOperationException - type NumberFormatException = System.FormatException - type AbstractMethodError = System.InvalidOperationException - - // miscelleaneous ----------------------------------------------------- - - private val P = scala.`package` // to force scala package object to be seen. - private val L = scala.collection.immutable.List // to force Nil, :: to be seen. - private val S = scala.collection.mutable.StringBuilder // to force StringBuilder to be seen. - - //val $scope = scala.xml.TopScope - - type Function[-A, +B] = Function1[A, B] - - type Map[A, +B] = collection.immutable.Map[A, B] - type Set[A] = collection.immutable.Set[A] - - val Map = collection.immutable.Map - val Set = collection.immutable.Set - - // errors and asserts ------------------------------------------------- - - def error(message: String): Nothing = throw new RuntimeException(message) - - def exit(): Nothing = exit(0) - - def exit(status: Int): Nothing = { - System.Environment.Exit(status) - throw new Throwable() - } - - def assert(assertion: Boolean) { - if (!assertion) - throw new Error("assertion failed") - } - - def assert(assertion: Boolean, message: => Any) { - if (!assertion) - throw new Error("assertion failed: " + message) - } - - def assume(assumption: Boolean) { - if (!assumption) - throw new IllegalArgumentException("assumption failed") - } - - def assume(assumption: Boolean, message: => Any) { - if (!assumption) - throw new System.Security.SecurityException("assumption failed: "+ message) - } - - def require(requirement: Boolean) { - if (!requirement) - throw new IllegalArgumentException("requirement failed") - } - - def require(requirement: Boolean, message: => Any) { - if (!requirement) - throw new IllegalArgumentException("requirement failed: "+ message) - } - - // tupling ------------------------------------------------------------ - - type Pair[+A, +B] = Tuple2[A, B] - object Pair { - def apply[A, B](x: A, y: B) = Tuple2(x, y) - def unapply[A, B](x: Tuple2[A, B]): Option[Tuple2[A, B]] = Some(x) - } - - type Triple[+A, +B, +C] = Tuple3[A, B, C] - object Triple { - def apply[A, B, C](x: A, y: B, z: C) = Tuple3(x, y, z) - def unapply[A, B, C](x: Tuple3[A, B, C]): Option[Tuple3[A, B, C]] = Some(x) - } - - class Ensuring[A](x: A) { - def ensuring(cond: Boolean): A = { assert(cond); x } - def ensuring(cond: Boolean, msg: Any): A = { assert(cond, msg); x } - def ensuring(cond: A => Boolean): A = { assert(cond(x)); x } - def ensuring(cond: A => Boolean, msg: Any): A = { assert(cond(x), msg); x } - } - implicit def any2Ensuring[A](x: A): Ensuring[A] = new Ensuring(x) - - class ArrowAssoc[A](x: A) { - def -> [B](y: B): Tuple2[A, B] = Tuple2(x, y) - def →[B](y: B): Tuple2[A, B] = ->(y) - } - implicit def any2ArrowAssoc[A](x: A): ArrowAssoc[A] = new ArrowAssoc(x) - - def Tuple[A1](x1: A1) = Tuple1(x1) - def Tuple[A1, A2](x1: A1, x2: A2) = Tuple2(x1, x2) - def Tuple[A1, A2, A3](x1: A1, x2: A2, x3: A3) = Tuple3(x1, x2, x3) - def Tuple[A1, A2, A3, A4](x1: A1, x2: A2, x3: A3, x4: A4) = Tuple4(x1, x2, x3, x4) - def Tuple[A1, A2, A3, A4, A5](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5) = Tuple5(x1, x2, x3, x4, x5) - def Tuple[A1, A2, A3, A4, A5, A6](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6) = Tuple6(x1, x2, x3, x4, x5, x6) - def Tuple[A1, A2, A3, A4, A5, A6, A7](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7) = Tuple7(x1, x2, x3, x4, x5, x6, x7) - def Tuple[A1, A2, A3, A4, A5, A6, A7, A8](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8) = Tuple8(x1, x2, x3, x4, x5, x6, x7, x8) - def Tuple[A1, A2, A3, A4, A5, A6, A7, A8, A9](x1: A1, x2: A2, x3: A3, x4: A4, x5: A5, x6: A6, x7: A7, x8: A8, x9: A9) = Tuple9(x1, x2, x3, x4, x5, x6, x7, x8, x9) - - // printing and reading ----------------------------------------------- - - def print(x: Any) = Console.print(x) - def println() = Console.println() - def println(x: Any) = Console.println(x) - //def printf(text: String, xs: Any*) = Console.printf(text, xs: _*) - //def format(text: String, xs: Any*) = Console.format(text, xs) - - def readLine(): String = Console.readLine() - def readLine(text: String, args: Any*) = Console.readLine(text, args) - def readBoolean() = Console.readBoolean() - def readByte() = Console.readByte() - def readShort() = Console.readShort() - def readChar() = Console.readChar() - def readInt() = Console.readInt() - def readLong() = Console.readLong() - def readFloat() = Console.readFloat() - def readDouble() = Console.readDouble() - //def readf(format: String) = Console.readf(format) - //def readf1(format: String) = Console.readf1(format) - //def readf2(format: String) = Console.readf2(format) - //def readf3(format: String) = Console.readf3(format) - - // views -------------------------------------------------------------- - - implicit def identity[A](x: A): A = x - - implicit def byteWrapper(x: Byte) = new runtime.RichByte(x) - implicit def shortWrapper(x: Short) = new runtime.RichShort(x) - implicit def intWrapper(x: Int) = new runtime.RichInt(x) - implicit def charWrapper(c: Char) = new runtime.RichChar(c) - implicit def longWrapper(x: Long) = new runtime.RichLong(x) - implicit def floatWrapper(x: Float) = new runtime.RichFloat(x) - implicit def doubleWrapper(x: Double) = new runtime.RichDouble(x) - - implicit def booleanWrapper(x: Boolean) = new runtime.RichBoolean(x) - implicit def unitWrapper(x: Boolean) = new runtime.RichUnit - - implicit def stringWrapper(x: String) = new runtime.RichString(x) - - implicit def any2stringadd(x: Any) = new runtime.StringAdd(x) - - implicit def exceptionWrapper(exc: Throwable) = new runtime.RichException(exc) - - final class GetClassWrapper(obj: AnyRef) { - def getClass(): runtime.RichClass = classWrapper(obj.GetType()) - } - implicit def getClassWrapper(obj: AnyRef) = new GetClassWrapper(obj) - implicit def classWrapper(clazz: Class[_]): runtime.RichClass = - new runtime.RichClass(clazz) - - /** Lens from Ordering[T] to Ordered[T] */ - implicit def orderingToOrdered[T](x: T)(implicit ord: Ordering[T]): Ordered[T] = - new Ordered[T] { def compare(that: T): Int = ord.compare(x, that) } - - implicit def byte2short(x: Byte): Short = x.toShort - implicit def byte2int(x: Byte): Int = x.toInt - implicit def byte2long(x: Byte): Long = x.toLong - implicit def byte2float(x: Byte): Float = x.toFloat - implicit def byte2double(x: Byte): Double = x.toDouble - - implicit def short2int(x: Short): Int = x.toInt - implicit def short2long(x: Short): Long = x.toLong - implicit def short2float(x: Short): Float = x.toFloat - implicit def short2double(x: Short): Double = x.toDouble - - implicit def char2int(x: Char): Int = x.toInt - implicit def char2long(x: Char): Long = x.toLong - implicit def char2float(x: Char): Float = x.toFloat - implicit def char2double(x: Char): Double = x.toDouble - - implicit def int2long(x: Int): Long = x.toLong - implicit def int2float(x: Int): Float = x.toFloat - implicit def int2double(x: Int): Double = x.toDouble - - implicit def long2float(x: Long): Float = x.toFloat - implicit def long2double(x: Long): Double = x.toDouble - - implicit def float2double(x: Float): Double = x.toDouble - - //implicit def forceArrayProjection[A](x : Array.Projection[A]) : Array[A] = x.force !!! re-enable? - - def currentThread = System.Threading.Thread.CurrentThread - -} diff --git a/src/dotnet-library/scala/Range.scala b/src/dotnet-library/scala/Range.scala deleted file mode 100644 index 4bf06ac74..000000000 --- a/src/dotnet-library/scala/Range.scala +++ /dev/null @@ -1,234 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -package scala - -import collection.immutable.Vector -import collection.generic.VectorView - -/**

- * GenericRange is a generified version of the - * Range class which works with arbitrary types. - * It must be supplied with Integral and Ordering implementations - * of the range type. - * - * Factories for likely types include Range.BigInt and Range.Long. - * Range.Int exists for completeness, but the Int-based scala.Range - * should be more performant. - *

- *     val r1 = new Range(0, 100, 1)
- *     val veryBig = Math.MAX_INT.toLong + 1
- *     val r2 = Range.Long(veryBig, veryBig + 100, 1)
- *     assert(r1 sameElements r2.map(_ - veryBig))
- *  
- * - * @author Paul Phillips - * @version 2.8 - */ -abstract class GenericRange[T] - (val start: T, val end: T, val step: T) - (implicit num: Integral[T], ord: Ordering[T]) -extends VectorView[T, Vector[T]] with RangeToString[T] { - import num._ - import ord._ - - // this lets us pretend all ranges are exclusive - val isInclusive: Boolean - private val trueEnd = if (isInclusive) end + one else end - - // todo? - we could lift the length restriction by implementing a range as a sequence of - // subranges and limiting the subranges to MAX_INT. There's no other way around it because - // the generics we inherit assume integer-based indexing (as well they should.) - require(step !== zero) - require(genericLength <= fromInt(Math.MAX_INT), "Implementation restricts ranges to Math.MAX_INT elements.") - - protected def underlying = Vector.empty[T] - - /** Create a new range with the start and end values of this range and - * a new step. - */ - def by(step: T): GenericRange[T] = - if (isInclusive) GenericRange.inclusive(start, end, step) - else GenericRange(start, end, step) - - override def foreach[U](f: T => U) { - var i = start - if (step > zero) { - while (i < trueEnd) { - f(i) - i = i + step - } - } else { - while (i > trueEnd) { - f(i) - i = i + step - } - } - } - - lazy val genericLength: T = { - def plen(start: T, end: T, step: T) = - if (trueEnd <= start) zero - else (trueEnd - start - one) / step + one - - if (step > zero) plen(start, trueEnd, step) - else plen(trueEnd, start, -step) - } - lazy val length: Int = toInt(genericLength) - - // Since apply(Int) already exists, we are not allowed apply(T) since - // they erase to the same thing. - def apply(idx: Int): T = applyAt(fromInt(idx)) - def applyAt(idx: T): T = { - if (idx < zero || idx >= genericLength) throw new IndexOutOfBoundsException(idx.toString) - start + idx * step - } - - override def contains(_x: Any): Boolean = { - // XXX - can we avoid this cast and still have a contains method? - val x = - try { _x.asInstanceOf[T] } - catch { case _: ClassCastException => return false } - - if (step > zero) start <= x && x < trueEnd - else start >= x && x > trueEnd - } -} - -private[scala] trait RangeToString[T] extends VectorView[T, Vector[T]] { - // The default toString() tries to print every element and will exhaust memory - // if the Range is unduly large. This interacts poorly with the REPL. - override def toString() = { - val MAX_PRINT = 512 // some arbitrary value - val str = (this take MAX_PRINT).toString - - if (length > MAX_PRINT) str.substring(0, str.length-1) + "...)" - else str - } -} - - -object GenericRange { - import Numeric._ - import Ordering._ - - class Inclusive[T](start: T, end: T, step: T)(implicit num: Integral[T], ord: Ordering[T]) - extends GenericRange(start, end, step) - { - val isInclusive = true - def exclusive: Exclusive[T] = new Exclusive(start, end, step) - } - class Exclusive[T](start: T, end: T, step: T)(implicit num: Integral[T], ord: Ordering[T]) - extends GenericRange(start, end, step) - { - val isInclusive = false - def inclusive: Inclusive[T] = new Inclusive(start, end, step) - } - - def apply[T](start: T, end: T, step: T)(implicit num: Integral[T], ord: Ordering[T]) = - new Exclusive(start, end, step) - - def inclusive[T](start: T, end: T, step: T)(implicit num: Integral[T], ord: Ordering[T]) = - new Inclusive(start, end, step) -} - - -/**

- * The Range class represents integer values in range - * [start;end) with non-zero step value step. - * Sort of acts like a sequence also (supports length and contains). - * For example: - *

- *     val r1 = 0 until 10
- *     val r2 = r1.start until r1.end by r1.step + 1
- *     println(r2.length) // = 5
- *  
- * - * @author Martin Odersky - * @version 2.8 - */ -class Range(val start: Int, val end: Int, val step: Int) -extends VectorView[Int, Vector[Int]] with RangeToString[Int] -{ - require(step != 0) - - protected def underlying = Vector.empty[Int] - - /** Create a new range with the start and end values of this range and - * a new step. - */ - def by(step: Int): Range = new Range(start, end, step) - - final override def foreach[U](f: Int => U) { - var i = start - if (step > 0) { - while (i < end) { - f(i) - i += step - } - } else { - while (i > end) { - f(i) - i += step - } - } - } - - lazy val length: Int = { - def plen(start: Int, end: Int, step: Int) = - if (end <= start) 0 else (end - start - 1) / step + 1 - if (step > 0) plen(start, end, step) - else plen(end, start, -step) - } - - @inline - final def apply(idx: Int): Int = { - if (idx < 0 || idx >= length) throw new IndexOutOfBoundsException(idx.toString) - start + idx * step - } - - def contains(x: Int): Boolean = - if (step > 0) start <= x && x < end - else start >= x && x > end - - def inclusive = Range.inclusive(start, end, step) -} - -object Range { - /** @deprecated use Range.inclusive instead */ - final class Inclusive(start: Int, end0: Int, step: Int) - extends Range(start, if (step > 0) end0 + 1 else end0 - 1, step) { self => - override def by(step: Int): Range = new Inclusive(start, end0, step) - } - - def apply(start: Int, end: Int, step: Int) = - new Range(start, end, step) - - def inclusive(start: Int, end: Int, step: Int): Range = - new Range.Inclusive(start, end, step) - -// object BigInt { -// def apply(start: BigInt, end: BigInt, step: BigInt) = GenericRange(start, end, step) -// def inclusive(start: BigInt, end: BigInt, step: BigInt) = GenericRange.inclusive(start, end, step) -// } - object Long { - def apply(start: Long, end: Long, step: Long) = GenericRange(start, end, step) - def inclusive(start: Long, end: Long, step: Long) = GenericRange.inclusive(start, end, step) - } - - // Illustrating genericity with Int Range, which should have the same behavior - // as the original Range class. However we leave the original Range - // indefinitely, for performance and because the compiler seems to bootstrap - // off it and won't do so with our parameterized version without modifications. - object Int { - def apply(start: Int, end: Int, step: Int) = GenericRange(start, end, step) - def inclusive(start: Int, end: Int, step: Int) = GenericRange.inclusive(start, end, step) - } -} diff --git a/src/dotnet-library/scala/Symbol.scala b/src/dotnet-library/scala/Symbol.scala deleted file mode 100644 index 26fe631fe..000000000 --- a/src/dotnet-library/scala/Symbol.scala +++ /dev/null @@ -1,49 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala - - -/**

- * Instances of Symbol can be created easily with - * Scala's built-in quote mechanism. - *

- *

- * For instance, the Scala - * term 'mysym will invoke the constructor of the - * Symbol class in the following way: - * new Symbol("mysym"). - *

- * - * @author Martin Odersky - * @version 1.7, 08/12/2003 - */ -final case class Symbol(name: String) { - - /** Converts this symbol to a string. - */ - override def toString(): String = { - "'" + name - } - - /**

- * Makes this symbol into a unique reference. - *

- *

- * If two interened symbols are equal (i.e. they have the same name) - * then they must be identical (wrt reference equality). - *

- * - * @return the unique reference to this symbol. - */ - def intern: Symbol = this - -} diff --git a/src/dotnet-library/scala/collection/JavaConversions.scala b/src/dotnet-library/scala/collection/JavaConversions.scala deleted file mode 100644 index 381f93aaa..000000000 --- a/src/dotnet-library/scala/collection/JavaConversions.scala +++ /dev/null @@ -1 +0,0 @@ -/* JavaConversions does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/collection/immutable/List.scala b/src/dotnet-library/scala/collection/immutable/List.scala deleted file mode 100644 index 2f4ffdf28..000000000 --- a/src/dotnet-library/scala/collection/immutable/List.scala +++ /dev/null @@ -1,863 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.collection.immutable - -import mutable.ListBuffer -import generic._ - -/** A class representing an ordered collection of elements of type - * a. This class comes with two implementing case - * classes scala.Nil and scala.:: that - * implement the abstract members isEmpty, - * head and tail. - * - * @author Martin Odersky and others - * @version 2.8 - */ -sealed abstract class List[+A] extends LinearSequence[A] - with Product - with TraversableClass[A, List] - with LinearSequenceTemplate[A, List[A]] { - override def companion: Companion[List] = List - - import collection.{Iterable, Traversable, Sequence, Vector} - - /** Returns true if the list does not contain any elements. - * @return true, iff the list is empty. - */ - def isEmpty: Boolean - - /** Returns this first element of the list. - * - * @return the first element of this list. - * @throws Predef.NoSuchElementException if the list is empty. - */ - def head: A - - /** Returns this list without its first element. - * - * @return this list without its first element. - * @throws Predef.NoSuchElementException if the list is empty. - */ - def tail: List[A] - - // New methods in List - - /**

- * Add an element x at the beginning of this list. - *

- * - * @param x the element to prepend. - * @return the list with x added at the beginning. - * @ex 1 :: List(2, 3) = List(2, 3).::(1) = List(1, 2, 3) - */ - def ::[B >: A] (x: B): List[B] = - new scala.collection.immutable.::(x, this) - - /**

- * Returns a list resulting from the concatenation of the given - * list prefix and this list. - *

- * - * @param prefix the list to concatenate at the beginning of this list. - * @return the concatenation of the two lists. - * @ex List(1, 2) ::: List(3, 4) = List(3, 4).:::(List(1, 2)) = List(1, 2, 3, 4) - */ - def :::[B >: A](prefix: List[B]): List[B] = - if (isEmpty) prefix - else (new ListBuffer[B] ++ prefix).prependToList(this) - - /** Reverse the given prefix and append the current list to that. - * This function is equivalent to an application of reverse - * on the prefix followed by a call to :::, but is more - * efficient. - * - * @param prefix the prefix to reverse and then prepend - * @return the concatenation of the reversed prefix and the current list. - */ - def reverse_:::[B >: A](prefix: List[B]): List[B] = { - var these: List[B] = this - var pres = prefix - while (!pres.isEmpty) { - these = pres.head :: these - pres = pres.tail - } - these - } - - /** Apply a function to all the elements of the list, and return the - * reversed list of results. This is equivalent to a call to map - * followed by a call to reverse, but more efficient. - * !!! should we deprecate this? Why have reverseMap, but not filterMap or reverseFilter, say? - * @param f the function to apply to each elements. - * @return the reversed list of results. - */ - def reverseMap[B](f: A => B): List[B] = { - def loop(l: List[A], res: List[B]): List[B] = l match { - case Nil => res - case head :: tail => loop(tail, f(head) :: res) - } - loop(this, Nil) - } - - /** Like xs map f, but returns xs unchanged if function - * f maps all elements to themselves (wrt ==). - * @note Unlike `map`, `mapConserve` is not tail-recursive. - */ - def mapConserve[B >: A] (f: A => B): List[B] = { - def loop(ys: List[A]): List[B] = - if (ys.isEmpty) this - else { - val head0 = ys.head - val head1 = f(head0) - if (head1 == head0) { - loop(ys.tail) - } else { - val ys1 = head1 :: ys.tail.mapConserve(f) - if (this eq ys) ys1 - else { - val b = new ListBuffer[B] - var xc = this - while (xc ne ys) { - b += xc.head - xc = xc.tail - } - b.prependToList(ys1) - } - } - } - loop(this) - } - - // Overridden methods from IterableTemplate or overloaded variants of such methods - - /** Create a new list which contains all elements of this list - * followed by all elements of Traversable `that' - */ - override def ++[B >: A, That](that: Traversable[B])(implicit bf: BuilderFactory[B, That, List[A]]): That = { - val b = bf(this) - if (b.isInstanceOf[ListBuffer[_]]) (this ::: that.toList).asInstanceOf[That] - else super.++(that) - } - - /** Create a new list which contains all elements of this list - * followed by all elements of Iterator `that' - */ - override def ++[B >: A, That](that: Iterator[B])(implicit bf: BuilderFactory[B, That, List[A]]): That = - this ++ that.toList - - /** Overrides the method in Iterable for efficiency. - * - * @return the list itself - */ - override def toList: List[A] = this - - /** Returns the n first elements of this list, or else the whole - * list, if it has less than n elements. - - * @param n the number of elements to take. - * @return the n first elements of this list. - */ - override def take(n: Int): List[A] = { - val b = new ListBuffer[A] - var i = 0 - var these = this - while (!these.isEmpty && i < n) { - i += 1 - b += these.head - these = these.tail - } - if (these.isEmpty) this - else b.toList - } - - /** Returns the list without its n first elements. - * If this list has less than n elements, the empty list is returned. - * - * @param n the number of elements to drop. - * @return the list without its n first elements. - */ - override def drop(n: Int): List[A] = { - var these = this - var count = n - while (!these.isEmpty && count > 0) { - these = these.tail - count -= 1 - } - these - } - - /** Returns the list with elements belonging to the given index range. - * - * @param start the start position of the list slice. - * @param end the end position (exclusive) of the list slice. - * @return the list with elements belonging to the given index range. - */ - override def slice(start: Int, end: Int): List[A] = { - var len = end - if (start > 0) len -= start - drop(start) take len - } - - /** Returns the rightmost n elements from this list. - * - * @param n the number of elements to take - * @return the suffix of length n of the list - */ - override def takeRight(n: Int): List[A] = { - def loop(lead: List[A], lag: List[A]): List[A] = lead match { - case Nil => lag - case _ :: tail => loop(tail, lag.tail) - } - loop(drop(n), this) - } - - // dropRight is inherited from Stream - - /** Split the list at a given point and return the two parts thus - * created. - * - * @param n the position at which to split - * @return a pair of lists composed of the first n - * elements, and the other elements. - */ - override def splitAt(n: Int): (List[A], List[A]) = { - val b = new ListBuffer[A] - var i = 0 - var these = this - while (!these.isEmpty && i < n) { - i += 1 - b += these.head - these = these.tail - } - (b.toList, these) - } - - /** Returns the longest prefix of this list whose elements satisfy - * the predicate p. - * - * @param p the test predicate. - * @return the longest prefix of this list whose elements satisfy - * the predicate p. - */ - override def takeWhile(p: A => Boolean): List[A] = { - val b = new ListBuffer[A] - var these = this - while (!these.isEmpty && p(these.head)) { - b += these.head - these = these.tail - } - b.toList - } - - /** Returns the longest suffix of this list whose first element - * does not satisfy the predicate p. - * - * @param p the test predicate. - * @return the longest suffix of the list whose first element - * does not satisfy the predicate p. - */ - override def dropWhile(p: A => Boolean): List[A] = - if (isEmpty || !p(head)) this - else tail dropWhile p - - /** Returns the longest prefix of the list whose elements all satisfy - * the given predicate, and the rest of the list. - * - * @param p the test predicate - * @return a pair consisting of the longest prefix of the list whose - * elements all satisfy p, and the rest of the list. - */ - override def span(p: A => Boolean): (List[A], List[A]) = { - val b = new ListBuffer[A] - var these = this - while (!these.isEmpty && p(these.head)) { - b += these.head - these = these.tail - } - (b.toList, these) - } - - /** A list consisting of all elements of this list in reverse order. - */ - override def reverse: List[A] = { - var result: List[A] = Nil - var these = this - while (!these.isEmpty) { - result = these.head :: result - these = these.tail - } - result - } - - override def stringPrefix = "List" - - override def toStream : Stream[A] = - if (isEmpty) Stream.Empty - else new Stream.Cons(head, tail.toStream) - - // !!! todo: work in patch - - /** Computes the difference between this list and the given list - * that. - * - * @param that the list of elements to remove from this list. - * @return this list without the elements of the given list - * that. - * @deprecated use diff instead - */ - @deprecated def -- [B >: A](that: List[B]): List[B] = { - val b = new ListBuffer[B] - var these = this - while (!these.isEmpty) { - if (!that.contains(these.head)) b += these.head - these = these.tail - } - b.toList - } - - /** Computes the difference between this list and the given object - * x. - * - * @param x the object to remove from this list. - * @return this list without occurrences of the given object - * x. - * @deprecated use diff instead - */ - @deprecated def - [B >: A](x: B): List[B] = { - val b = new ListBuffer[B] - var these = this - while (!these.isEmpty) { - if (these.head != x) b += these.head - these = these.tail - } - b.toList - } - - /**

- * Sort the list according to the comparison function - * <(e1: a, e2: a) => Boolean, - * which should be true iff e1 is smaller than - * e2. - * !!! todo: move sorting to IterableTemplate - *

- * - * @param lt the comparison function - * @return a list sorted according to the comparison function - * <(e1: a, e2: a) => Boolean. - * @ex
-   *    List("Steve", "Tom", "John", "Bob")
-   *      .sort((e1, e2) => (e1 compareTo e2) < 0) =
-   *    List("Bob", "John", "Steve", "Tom")
- * @deprecated use sortWith instead - */ - @deprecated def sort(lt : (A,A) => Boolean): List[A] = { - /** Merge two already-sorted lists */ - def merge(l1: List[A], l2: List[A]): List[A] = { - val res = new ListBuffer[A] - var left1 = l1 - var left2 = l2 - - while (!left1.isEmpty && !left2.isEmpty) { - if(lt(left1.head, left2.head)) { - res += left1.head - left1 = left1.tail - } else { - res += left2.head - left2 = left2.tail - } - } - - res ++= left1 - res ++= left2 - - res.toList - } - - /** Split a list into two lists of about the same size */ - def split(lst: List[A]) = { - val res1 = new ListBuffer[A] - val res2 = new ListBuffer[A] - var left = lst - - while (!left.isEmpty) { - res1 += left.head - left = left.tail - if (!left.isEmpty) { - res2 += left.head - left = left.tail - } - } - - (res1.toList, res2.toList) - } - - - /** Merge-sort the specified list */ - def ms(lst: List[A]): List[A] = - lst match { - case Nil => lst - case x :: Nil => lst - case x :: y :: Nil => - if (lt(x,y)) - lst - else - y :: x :: Nil - - case lst => - val (l1, l2) = split(lst) - val l1s = ms(l1) - val l2s = ms(l2) - merge(l1s, l2s) - } - - ms(this) - } - -} - -/** The empty list. - * - * @author Martin Odersky - * @version 1.0, 15/07/2003 - */ -@SerialVersionUID(0 - 8256821097970055419L) -case object Nil extends List[Nothing] { - override def isEmpty = true - override def head: Nothing = - throw new NoSuchElementException("head of empty list") - override def tail: List[Nothing] = - throw new NoSuchElementException("tail of empty list") - override def equals(that: Any) = that match { - case that1: Sequence[_] => that1.isEmpty - case _ => false - } -} - -/** A non empty list characterized by a head and a tail. - * - * @author Martin Odersky - * @version 1.0, 15/07/2003 - */ -@SerialVersionUID(0L - 8476791151983527571L) -final case class ::[B](private var hd: B, private[scala] var tl: List[B]) extends List[B] { - override def head : B = hd - override def tail : List[B] = tl - override def isEmpty: Boolean = false - -// import java.io._ - -// private def writeObject(out: ObjectOutputStream) { -// var xs: List[B] = this -// while (!xs.isEmpty) { out.writeObject(xs.head); xs = xs.tail } -// out.writeObject(ListSerializeEnd) -// } - -// private def readObject(in: ObjectInputStream) { -// hd = in.readObject.asInstanceOf[B] -// assert(hd != ListSerializeEnd) -// var current: ::[B] = this -// while (true) in.readObject match { -// case ListSerializeEnd => -// current.tl = Nil -// return -// case a : Any => -// val list : ::[B] = new ::(a.asInstanceOf[B], Nil) -// current.tl = list -// current = list -// } -// } -} - -/** This object provides methods for creating specialized lists, and for - * transforming special kinds of lists (e.g. lists of lists). - * - * @author Martin Odersky - * @version 2.8 - */ -object List extends SequenceFactory[List] { - - import collection.{Iterable, Sequence, Vector} - - implicit def builderFactory[A]: BuilderFactory[A, List[A], Coll] = new VirtualBuilderFactory[A] - def newBuilder[A]: Builder[A, List[A]] = new ListBuffer[A] - - override def empty[A]: List[A] = Nil - - override def apply[A](xs: A*): List[A] = xs.toList - - /** Create a sorted list with element values - * vn+1 = step(vn) - * where v0 = start - * and elements are in the range between start (inclusive) - * and end (exclusive) - * - * @deprecated use @see iterate instead. - * @param start the start value of the list - * @param end the end value of the list - * @param step the increment function of the list, which given vn, - * computes vn+1. Must be monotonically increasing - * or decreasing. - * @return the sorted list of all integers in range [start;end). - */ - @deprecated def range(start: Int, end: Int, step: Int => Int): List[Int] = { - val up = step(start) > start - val down = step(start) < start - val b = new ListBuffer[Int] - var i = start - while ((!up || i < end) && (!down || i > end)) { - b += i - val next = step(i) - if (i == next) - throw new IllegalArgumentException("the step function did not make any progress on "+ i) - i = next - } - b.toList - } - - /** Create a list containing several copies of an element. - * @deprecated use @see fill instead - * - * @param n the length of the resulting list - * @param elem the element composing the resulting list - * @return a list composed of n elements all equal to elem - */ - @deprecated def make[A](n: Int, elem: A): List[A] = { - val b = new ListBuffer[A] - var i = 0 - while (i < n) { - b += elem - i += 1 - } - b.toList - } - - /** Concatenate all the elements of a given list of lists. - * - * @deprecated use `xss.flatten` instead - * @param xss the list of lists that are to be concatenated - * @return the concatenation of all the lists - */ - @deprecated def flatten[A](xss: List[List[A]]): List[A] = { - val b = new ListBuffer[A] - for (xs <- xss) { - var xc = xs - while (!xc.isEmpty) { - b += xc.head - xc = xc.tail - } - } - b.toList - } - - /** Transforms a list of pairs into a pair of lists. - * - * @param xs the list of pairs to unzip - * @return a pair of lists. - * @deprecated use `xs.unzp` instead - */ - @deprecated def unzip[A,B](xs: List[(A,B)]): (List[A], List[B]) = { - val b1 = new ListBuffer[A] - val b2 = new ListBuffer[B] - var xc = xs - while (!xc.isEmpty) { - b1 += xc.head._1 - b2 += xc.head._2 - xc = xc.tail - } - (b1.toList, b2.toList) - } - - /** Transforms an iterable of pairs into a pair of lists. - * - * @deprecated use `xs.unzip` instead - * @param xs the iterable of pairs to unzip - * @return a pair of lists. - */ - @deprecated def unzip[A,B](xs: Iterable[(A,B)]): (List[A], List[B]) = - xs.foldRight[(List[A], List[B])]((Nil, Nil)) { - case ((x, y), (xs, ys)) => (x :: xs, y :: ys) - } - - /** - * Returns the Left values in the given Iterable of Eithers. - * @deprecated use `Either.lefts` instead - */ - @deprecated def lefts[A, B](es: Iterable[Either[A, B]]) = - es.foldRight[List[A]](Nil)((e, as) => e match { - case Left(a) => a :: as - case Right(_) => as - }) - - /** - * Returns the Right values in the givenIterable of Eithers. - * @deprecated use `Either.rights` instead - */ - @deprecated def rights[A, B](es: Iterable[Either[A, B]]) = - es.foldRight[List[B]](Nil)((e, bs) => e match { - case Left(_) => bs - case Right(b) => b :: bs - }) - - /** Transforms an Iterable of Eithers into a pair of lists. - * - * @param xs the iterable of Eithers to separate - * @return a pair of lists. - * @deprecated use `Either.separate` instead - */ - @deprecated def separate[A,B](es: Iterable[Either[A,B]]): (List[A], List[B]) = - es.foldRight[(List[A], List[B])]((Nil, Nil)) { - case (Left(a), (lefts, rights)) => (a :: lefts, rights) - case (Right(b), (lefts, rights)) => (lefts, b :: rights) - } - - /** Converts an iterator to a list. - * - * @param it the iterator to convert - * @return a list that contains the elements returned by successive - * calls to it.next - * @deprecated use it.toList instead - */ - @deprecated def fromIterator[A](it: Iterator[A]): List[A] = it.toList - - /** Converts an array into a list. - * - * @param arr the array to convert - * @return a list that contains the same elements than arr - * in the same order - * @deprecated use `array.toList` instead - */ - @deprecated def fromArray[A](arr: Array[A]): List[A] = fromArray(arr, 0, arr.length) - - /** Converts a range of an array into a list. - * - * @param arr the array to convert - * @param start the first index to consider - * @param len the lenght of the range to convert - * @return a list that contains the same elements than arr - * in the same order - * @deprecated use `array.view(start, end).toList` instead - */ - @deprecated def fromArray[A](arr: Array[A], start: Int, len: Int): List[A] = { - var res: List[A] = Nil - var i = start + len - while (i > start) { - i -= 1 - res = arr(i) :: res - } - res - } - - /** Parses a string which contains substrings separated by a - * separator character and returns a list of all substrings. - * - * @param str the string to parse - * @param separator the separator character - * @return the list of substrings - * @deprecated use `str.split(separator).toList` instead - */ - @deprecated def fromString(str: String, separator: Char): List[String] = { - var words: List[String] = Nil - var pos = str.length() - while (pos > 0) { - val pos1 = str.lastIndexOf(separator, pos - 1) - if (pos1 + 1 < pos) - words = str.substring(pos1 + 1, pos) :: words - pos = pos1 - } - words - } - - /** Returns the given string as a list of characters. - * - * @param str the string to convert. - * @return the string as a list of characters. - * @deprecated use str.toList instead - */ - @deprecated def fromString(str: String): List[Char] = str.toList - - /** Returns the given list of characters as a string. - * - * @param xs the list to convert. - * @return the list in form of a string. - * @deprecated use xs.mkString instead - */ - @deprecated def toString(xs: List[Char]): String = { - val sb = new StringBuilder() - var xc = xs - while (!xc.isEmpty) { - sb.append(xc.head) - xc = xc.tail - } - sb.toString() - } - - /** Like xs map f, but returns xs unchanged if function - * f maps all elements to themselves. - * @deprecated use xs.mapConserve(f) - */ - @deprecated def mapConserve[A <: AnyRef](xs: List[A])(f: A => A): List[A] = { - def loop(ys: List[A]): List[A] = - if (ys.isEmpty) xs - else { - val head0 = ys.head - val head1 = f(head0) - if (head1 eq head0) { - loop(ys.tail) - } else { - val ys1 = head1 :: mapConserve(ys.tail)(f) - if (xs eq ys) ys1 - else { - val b = new ListBuffer[A] - var xc = xs - while (xc ne ys) { - b += xc.head - xc = xc.tail - } - b.prependToList(ys1) - } - } - } - loop(xs) - } - - /** Returns the list resulting from applying the given function f - * to corresponding elements of the argument lists. - * @deprecated use (xs, ys).map(f) instead - * @param f function to apply to each pair of elements. - * @return [f(a0,b0), ..., f(an,bn)] if the lists are - * [a0, ..., ak], [b0, ..., bl] and - * n = min(k,l) - */ - @deprecated def map2[A,B,C](xs: List[A], ys: List[B])(f: (A, B) => C): List[C] = { - val b = new ListBuffer[C] - var xc = xs - var yc = ys - while (!xc.isEmpty && !yc.isEmpty) { - b += f(xc.head, yc.head) - xc = xc.tail - yc = yc.tail - } - b.toList - } - - /** Returns the list resulting from applying the given function - * f to corresponding elements of the argument lists. - * - * @param f function to apply to each pair of elements. - * @deprecated use (xs, ys, zs).map(f) instead - * @return [f(a0,b0,c0), - * ..., f(an,bn,cn)] - * if the lists are [a0, ..., ak], - * [b0, ..., bl], - * [c0, ..., cm] and - * n = min(k,l,m) - */ - @deprecated def map3[A,B,C,D](xs: List[A], ys: List[B], zs: List[C])(f: (A, B, C) => D): List[D] = { - val b = new ListBuffer[D] - var xc = xs - var yc = ys - var zc = zs - while (!xc.isEmpty && !yc.isEmpty && !zc.isEmpty) { - b += f(xc.head, yc.head, zc.head) - xc = xc.tail - yc = yc.tail - zc = zc.tail - } - b.toList - } - - /** Tests whether the given predicate p holds - * for all corresponding elements of the argument lists. - * - * @param p function to apply to each pair of elements. - * @return (p(a0,b0) && - * ... && p(an,bn))] - * if the lists are [a0, ..., ak]; - * [b0, ..., bl] - * and n = min(k,l) - * @deprecated use (xs, ys).forall(f) instead - */ - @deprecated def forall2[A,B](xs: List[A], ys: List[B])(f: (A, B) => Boolean): Boolean = { - var xc = xs - var yc = ys - while (!xc.isEmpty && !yc.isEmpty) { - if (!f(xc.head, yc.head)) return false - xc = xc.tail - yc = yc.tail - } - true - } - - /** Tests whether the given predicate p holds - * for some corresponding elements of the argument lists. - * - * @param p function to apply to each pair of elements. - * @return n != 0 && (p(a0,b0) || - * ... || p(an,bn))] if the lists are - * [a0, ..., ak], - * [b0, ..., bl] and - * n = min(k,l) - * @deprecated use (xs, ys).forall(f) instead - */ - @deprecated def exists2[A,B](xs: List[A], ys: List[B])(f: (A, B) => Boolean): Boolean = { - var xc = xs - var yc = ys - while (!xc.isEmpty && !yc.isEmpty) { - if (f(xc.head, yc.head)) return true - xc = xc.tail - yc = yc.tail - } - false - } - - /** Transposes a list of lists. - * pre: All element lists have the same length. - * - * @param xss the list of lists - * @return the transposed list of lists - * @deprecated use xss.transpose instead - */ - @deprecated def transpose[A](xss: List[List[A]]): List[List[A]] = { - val buf = new ListBuffer[List[A]] - var yss = xss - while (!yss.head.isEmpty) { - buf += (yss map (_.head)) - yss = (yss map (_.tail)) - } - buf.toList - } - - /** Lists with ordered elements are ordered - implicit def list2ordered[a <% Ordered[a]](x: List[a]): Ordered[List[a]] = new Ordered[List[a]] { - def compare [b >: List[a] <% Ordered[b]](y: b): Int = y match { - case y1: List[a] => compareLists(x, y1); - case _ => -(y compare x) - } - private def compareLists(xs: List[a], ys: List[a]): Int = { - if (xs.isEmpty && ys.isEmpty) 0 - else if (xs.isEmpty) -1 - else if (ys.isEmpty) 1 - else { - val s = xs.head compare ys.head; - if (s != 0) s - else compareLists(xs.tail, ys.tail) - } - } - } - */ -} - -/** Only used for list serialization */ -@SerialVersionUID(0L - 8476791151975527571L) -private[scala] case object ListSerializeEnd - diff --git a/src/dotnet-library/scala/collection/immutable/PagedSeq.scala b/src/dotnet-library/scala/collection/immutable/PagedSeq.scala deleted file mode 100644 index afa2ef2e8..000000000 --- a/src/dotnet-library/scala/collection/immutable/PagedSeq.scala +++ /dev/null @@ -1 +0,0 @@ -/* PagedSeq does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/collection/mutable/OpenHashMap.scala b/src/dotnet-library/scala/collection/mutable/OpenHashMap.scala deleted file mode 100644 index df3bcaded..000000000 --- a/src/dotnet-library/scala/collection/mutable/OpenHashMap.scala +++ /dev/null @@ -1,4 +0,0 @@ -/** OpenHashMap.scala currently doesn't work on .NET because of a bug. - * Remove this file once the ticket is closed. - * http://lampsvn.epfl.ch/trac/scala/ticket/1218 - */ diff --git a/src/dotnet-library/scala/collection/mutable/StringBuilder.scala b/src/dotnet-library/scala/collection/mutable/StringBuilder.scala deleted file mode 100644 index befaea296..000000000 --- a/src/dotnet-library/scala/collection/mutable/StringBuilder.scala +++ /dev/null @@ -1,955 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.collection.mutable - -import collection.generic._ -import scala.runtime.RichString - -/**

- * A mutable sequence of characters. This class provides an API compatible - * with - * java.lang.StringBuilder. - *

generic/ - * - * @author Stephane Micheloud - * @author Martin Odersky - * @version 2.8 - */ -//@serializable -//@SerialVersionUID(0 - 8525408645367278351L) -final class StringBuilder(initCapacity: Int, private val initValue: String) - extends Builder[Char, String] - with Vector[Char] { - - require(initCapacity > 0) - - /** The value is used for character storage. */ - private var array = new Array[Char](initCapacity + initValue.length) - - /** The count is the number of characters used. */ - private var count: Int = 0 - - /** Constructs a string builder with no characters in it and an - * initial capacity of 16 characters. - */ - def this() = this(16, "") - - /** Constructs a string builder with no characters in it and an - * initial capacity specified by the capacity argument. - * - * @param capacity the initial capacity. - * @throws NegativeArraySizeException if the capacity - * argument is less than 0. - */ - def this(capacity: Int) = this(capacity, "") - - /** Constructs a string builder with initial characters - * equal to characters of `str`. - */ - def this(str: String) = this(16, str) - - append(initValue) - - def toArray: Array[Char] = array - - def length: Int = count - def length_=(n: Int) { setLength(n) } - - /** Clears the builder contents. - */ - def clear(): Unit = setLength(0) - - /** Sets the length of the character sequence. - * - * @param newLength the new length - * @throws IndexOutOfBoundsException if the n argument is negative. - */ - def setLength(n: Int) { - require(n >= 0, n) - while (count < n) append('\0') - count = n - } - - /** Returns the current capacity. The capacity is the amount of storage - * available for newly inserted characters, beyond which an allocation - * will occur. - * - * @return the current capacity - */ - def capacity: Int = array.length - - /** Same as ensureCapacity. - * @deprecated use `ensureCapacity` instead. An assignment is misleading - * because it can never decrease the capacity. - */ - @deprecated def capacity_=(n: Int) { ensureCapacity(n) } - - /**

- * Ensures that the capacity is at least equal to the specified minimum. - * If the current capacity is less than the argument, then a new internal - * array is allocated with greater capacity. The new capacity is the larger of: - *

- *
    - *
  • The n argument. - *
  • Twice the old capacity, plus 2. - *
- *

- * If the n argument is non-positive, this - * method takes no action and simply returns. - *

- * - * @param n the minimum desired capacity. - */ - def ensureCapacity(n: Int) { - if (n > array.length) { - var newsize = array.length * 2 - while (n > newsize) - newsize = newsize * 2 - val newar = new Array[Char](newsize) - Array.copy(array, 0, newar, 0, count) - array = newar - } - } - - /**

- * Returns the Char value in this sequence at the specified index. - * The first Char value is at index 0, the next at index - * 1, and so on, as in array indexing. - *

- *

- * The index argument must be greater than or equal to - * 0, and less than the length of this sequence. - *

- * - * @param index the index of the desired Char value. - * @return the Char value at the specified index. - * @throws IndexOutOfBoundsException if index is - * negative or greater than or equal to length(). - */ - def charAt(index: Int): Char = { - if (index < 0 || index >= count) - throw new StringIndexOutOfBoundsException//(index) - array(index) - } - - /** Same as charAt. */ - def apply(i: Int): Char = charAt(i) - - /**

- * Removes the Char at the specified position in this - * sequence. This sequence is shortened by one Char. - *

- * - * @param index Index of Char to remove - * @return This object. - * @throws StringIndexOutOfBoundsException if the index - * is negative or greater than or equal to length(). - */ - def deleteCharAt(index: Int): StringBuilder = { - if (index < 0 || index >= count) - throw new StringIndexOutOfBoundsException//(index) - compat.Platform.arraycopy(array, index + 1, array, index, count - index - 1) - count -= 1 - this - } - - /**

- * The character at the specified index is set to ch. This - * sequence is altered to represent a new character sequence that is - * identical to the old character sequence, except that it contains the - * character ch at position index. - *

- *

- * The index argument must be greater than or equal to - * 0, and less than the length of this sequence. - *

- * - * @param index the index of the character to modify. - * @param ch the new character. - * @throws IndexOutOfBoundsException if index is - * negative or greater than or equal to length(). - */ - def setCharAt(index: Int, ch: Char) { - if (index < 0 || index >= count) - throw new StringIndexOutOfBoundsException//(index) - array(index) = ch - } - - /** Same as setCharAt. */ - def update(i: Int, c: Char) { setCharAt(i, c) } - - /** Returns a new String that contains a subsequence of - * characters currently contained in this character sequence. The - * substring begins at the specified index and extends to the end of - * this sequence. - * - * @param start The beginning index, inclusive. - * @return The new string. - * @throws StringIndexOutOfBoundsException if start is - * less than zero, or greater than the length of this object. - */ - def substring(start: Int): String = substring(start, count) - - /** Returns a new String that contains a subsequence of - * characters currently contained in this sequence. The - * substring begins at the specified start and - * extends to the character at index end - 1. - * - * @param start The beginning index, inclusive. - * @param end The ending index, exclusive. - * @return The new string. - * @throws StringIndexOutOfBoundsException if start - * or end are negative or greater than - * length(), or start is - * greater than end. - */ - def substring(start: Int, end: Int): String = { - if (start < 0) - throw new StringIndexOutOfBoundsException//(start) - if (end > count) - throw new StringIndexOutOfBoundsException//(end) - if (start > end) - throw new StringIndexOutOfBoundsException//(end - start) - new String(array, start, end - start) - } - -// def subSequence(start: Int, end: Int): java.lang.CharSequence = substring(start, end) - - /* Appends the string representation of the Any argument. - */ - def +=(x: Char): this.type = { append(x); this } - - def +(x: Char): this.type = { +=(x); this } - - - /**

- * Appends the string representation of the Any - * argument. - *

- *

- * The argument is converted to a string as if by the method - * System.Convert.ToString, and the characters of that - * string are then appended to this sequence. - *

- * - * @param x an Any object. - * @return a reference to this object. - */ - def append(x: Any): StringBuilder = - append(System.Convert.ToString(x)) - - /** Appends the specified string to this character sequence. - * - * @param s a string. - * @return a reference to this object. - */ - def append(s: String): StringBuilder = { - val str = if (s == null) "null" else s - val len = str.length - ensureCapacity(count + len) - compat.Platform.arraycopy(str.ToCharArray, 0, array, count, len) - count += len - this - } - - /** Appends the specified string builder to this sequence. - * - * @param sb - * @return - */ - def append(sb: StringBuilder): StringBuilder = - if (sb == null) - append("null") - else { - val len = sb.length - ensureCapacity(count + len) - compat.Platform.arraycopy(sb.toArray, 0, array, count, len) - count += len - this - } - - /**

- * Appends the string representation of the Char sequence - * argument to this sequence. - *

- *

- * The characters of the sequence argument are appended, in order, - * to the contents of this sequence. The length of this sequence - * increases by the length of the argument. - *

- * - * @param x the characters to be appended. - * @return a reference to this object. - */ - def appendAll(x: Seq[Char]): StringBuilder = - appendAll(x.toArray, 0, x.length) - - /* @deprecated use appendAll instead. This method is deprecated - * because of the possible confusion with `append(Any)`. - */ - @deprecated def append(x: Seq[Char]): StringBuilder = - appendAll(x) - - /**

- * Appends the string representation of the Char array - * argument to this sequence. - *

- *

- * The characters of the array argument are appended, in order, to - * the contents of this sequence. The length of this sequence - * increases by the length of the argument. - *

- * - * @param x the characters to be appended. - * @return a reference to this object. - */ - def appendAll(x: Array[Char]): StringBuilder = - appendAll(x, 0, x.length) - - /** @deprecated use appendAll instead. This method is deprecated - * because of the possible confusion with `append(Any)`. - */ - @deprecated def append(x: Array[Char]): StringBuilder = - appendAll(x) - - /**

- * Appends the string representation of a subarray of the - * char array argument to this sequence. - *

- *

- * Characters of the Char array x, starting at - * index offset, are appended, in order, to the contents - * of this sequence. The length of this sequence increases - * by the value of len. - *

- * - * @param x the characters to be appended. - * @param offset the index of the first Char to append. - * @param len the number of Chars to append. - * @return a reference to this object. - */ - def appendAll(x: Array[Char], offset: Int, len: Int): StringBuilder = { - ensureCapacity(count + len) - compat.Platform.arraycopy(x, offset, array, count, len) - count += len - this - } - - /** @deprecated use appendAll instead. This method is deprecated - * because of the possible confusion with `append(Any, Int, Int)`. - */ - @deprecated def append(x: Array[Char], offset: Int, len: Int): StringBuilder = - appendAll(x, offset, len) - - /**

- * Appends the string representation of the Boolean - * argument to the sequence. - *

- *

- * The argument is converted to a string as if by the method - * System.Convert.ToString, and the characters of that - * string are then appended to this sequence. - *

- * - * @param x a Boolean. - * @return a reference to this object. - */ - def append(x: Boolean): StringBuilder = append(System.Convert.ToString(x)) -// def append(x: Byte): StringBuilder = append(System.Convert.ToString(x)) - - def append(x: Char): StringBuilder = { - ensureCapacity(count + 1) - array(count) = x - count += 1 - this - } - - def append(x: Short): StringBuilder = - append(System.Convert.ToString(x)) - - def append(x: Int): StringBuilder = - append(System.Convert.ToString(x)) - - def append(x: Long): StringBuilder = - append(System.Convert.ToString(x)) - - def append(x: Float): StringBuilder = - append(System.Convert.ToString(x)) - - def append(x: Double): StringBuilder = - append(System.Convert.ToString(x)) - - /** Removes the characters in a substring of this sequence. - * The substring begins at the specified start and extends to - * the character at index end - 1 or to the end of the - * sequence if no such character exists. If - * start is equal to end, no changes are made. - * - * @param start The beginning index, inclusive. - * @param end The ending index, exclusive. - * @return This object. - * @throws StringIndexOutOfBoundsException if start - * is negative, greater than length(), or - * greater than end. - */ - def delete(start: Int, end: Int): StringBuilder = { - if (start < 0 || start > end) - throw new StringIndexOutOfBoundsException//(start) - val end0 = if (end > count) count else end - val len = end0 - start - if (len > 0) { - compat.Platform.arraycopy(array, start + len, array, start, count - end0) - count -= len - } - this - } - - /** Replaces the characters in a substring of this sequence - * with characters in the specified String. The substring - * begins at the specified start and extends to the character - * at index end - 1 or to the end of the sequence if no such - * character exists. First the characters in the substring are removed and - * then the specified String is inserted at start. - * - * @param start The beginning index, inclusive. - * @param end The ending index, exclusive. - * @param str String that will replace previous contents. - * @return This object. - * @throws StringIndexOutOfBoundsException if start - * is negative, greater than length(), or - * greater than end. - */ - def replace(start: Int, end: Int, str: String) { - if (start < 0 || start > count || start > end) - throw new StringIndexOutOfBoundsException//(start) - - val end0 = if (end > count) count else end - val len = str.length() - val newCount = count + len - (end0 - start) - ensureCapacity(newCount) - - compat.Platform.arraycopy(array, end, array, start + len, count - end) - compat.Platform.arraycopy(str.ToCharArray, 0, array, start, len) - count = newCount - this - } - - /** Inserts the string representation of a subarray of the str - * array argument into this sequence. The subarray begins at the specified - * offset and extends len chars. - * The characters of the subarray are inserted into this sequence at - * the position indicated by index. The length of this - * sequence increases by len Chars. - * - * @param index position at which to insert subarray. - * @param str a Char array. - * @param offset the index of the first char in subarray to - * be inserted. - * @param len the number of Chars in the subarray to - * be inserted. - * @return This object - * @throws StringIndexOutOfBoundsException if index - * is negative or greater than length(), or - * offset or len are negative, or - * (offset+len) is greater than - * str.length. - */ - def insertAll(index: Int, str: Array[Char], offset: Int, len: Int): StringBuilder = { - if (index < 0 || index > count) - throw new StringIndexOutOfBoundsException//(index) - if (offset < 0 || len < 0 || offset > str.length - len) - throw new StringIndexOutOfBoundsException//( -// "offset " + offset + ", len " + len + -// ", str.length " + str.length) - ensureCapacity(count + len) - compat.Platform.arraycopy(array, index, array, index + len, count - index) - compat.Platform.arraycopy(str, offset, array, index, len) - count += len - this - } - - /** @deprecated use insertAll instead. This method is deprecated - * because of the possible confusion with `insert(Int, Any, Int, Int)`. - */ - @deprecated def insert(index: Int, str: Array[Char], offset: Int, len: Int): StringBuilder = - insertAll(index, str, offset, len) - - /**

- * Inserts the string representation of the Any - * argument into this character sequence. - *

- *

- * The second argument is converted to a string as if by the method - * System.Convert.ToString, and the characters of that - * string are then inserted into this sequence at the indicated - * offset. - *

- *

- * The offset argument must be greater than or equal to - * 0, and less than or equal to the length of this - * sequence. - *

- * - * @param offset the offset. - * @param x an Any value. - * @return a reference to this object. - * @throws StringIndexOutOfBoundsException if the offset is invalid. - */ - def insert(at: Int, x: Any): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /** Inserts the string into this character sequence. - * - * @param at the offset position. - * @param x a string. - * @return a reference to this object. - * @throws StringIndexOutOfBoundsException if the offset is invalid. - */ - def insert(at: Int, x: String): StringBuilder = { - if (at < 0 || at > count) - throw new StringIndexOutOfBoundsException//(at) - val str = if (x == null) "null" else x - val len = str.length - ensureCapacity(count + len) - compat.Platform.arraycopy(array, at, array, at + len, count - at) - compat.Platform.arraycopy(str.ToCharArray, 0, array, at, len) - count += len - this - } - - /** Inserts the string representation of the Char sequence - * argument into this sequence. - * - * @param at the offset position. - * @param x a character sequence. - * @return a reference to this object. - * @throws StringIndexOutOfBoundsException if the offset is invalid. - */ - def insertAll(at: Int, x: Seq[Char]): StringBuilder = - insertAll(at, x.toArray) - - /* @deprecated use insertAll instead. This method is deprecated - * because of the possible confusion with `insert(Int, Any)`. - */ - @deprecated def insert(at: Int, x: Seq[Char]): StringBuilder = - insertAll(at, x) - - /** Inserts the string representation of the Char array - * argument into this sequence. - * - * @param at the offset position. - * @param x a character array. - * @return a reference to this object. - * @throws StringIndexOutOfBoundsException if the offset is invalid. - */ - def insertAll(at: Int, x: Array[Char]): StringBuilder = { - if (at < 0 || at > count) - throw new StringIndexOutOfBoundsException//(at) - val len = x.length - ensureCapacity(count + len) - compat.Platform.arraycopy(array, at, array, at + len, count - at) - compat.Platform.arraycopy(x, 0, array, at, len) - count += len - this - } - - /* @deprecated use insertAll instead. This method is deprecated - * because of the possible confusion with `insert(Int, Any)`. - */ - @deprecated def insert(at: Int, x: Array[Char]): StringBuilder = - insertAll(at, x) - - /**

- * Inserts the string representation of the Boolean argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Boolean value. - * @return a reference to this object. - */ - def insert(at: Int, x: Boolean): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Byte argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Byte value. - * @return a reference to this object. - */ -// def insert(at: Int, x: Byte): StringBuilder = -// insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Char argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Char value. - * @return a reference to this object. - */ - def insert(at: Int, x: Char): StringBuilder = { - if (at < 0 || at > count) - throw new StringIndexOutOfBoundsException//(at) - ensureCapacity(count + 1) - compat.Platform.arraycopy(array, at, array, at + 1, count - at) - array(at) = x - count += 1 - this - } - - /**

- * Inserts the string representation of the Short argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Short value. - * @return a reference to this object. - */ - def insert(at: Int, x: Short): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Int argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Int value. - * @return a reference to this object. - */ - def insert(at: Int, x: Int): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Long argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Long value. - * @return a reference to this object. - */ - def insert(at: Int, x: Long): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Float argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Float value. - * @return a reference to this object. - */ - def insert(at: Int, x: Float): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Inserts the string representation of the Double argument - * into this sequence. - *

- *

- * The offset argument must be greater than or equal to 0, and less than - * or equal to the length of this sequence. - *

- * - * @param at the offset position. - * @param x a Double value. - * @return a reference to this object. - */ - def insert(at: Int, x: Double): StringBuilder = - insert(at, System.Convert.ToString(x)) - - /**

- * Returns the index within this string of the first occurrence of the - * specified substring. The integer returned is the smallest value - * k such that: - *

- *
-   *  this.toString().startsWith(str, k)
- *
- *

- * is true. - *

- * - * @param str any string. - * @return if the string argument occurs as a substring within this - * object, then the index of the first character of the first - * such substring is returned; if it does not occur as a - * substring, -1 is returned. - * @throws NullPointerException if str is null. - */ - def indexOf(str: String): Int = indexOf(str, 0) - - /**

- * Returns the index within this string of the first occurrence of the - * specified substring, starting at the specified index. The integer - * returned is the smallest value k for which: - *

-   *    k >= Math.min(fromIndex, str.length()) &&
-   *                   this.toString().startsWith(str, k)
- *

- * If no such value of k exists, then -1 - * is returned. - *

- * - * @param str the substring for which to search. - * @param fromIndex the index from which to start the search. - * @return the index within this string of the first occurrence - * of the specified substring, starting at the specified index. - */ - def indexOf(str: String, fromIndex: Int): Int = - StringBuilder.indexOf(array, 0, count, str.ToCharArray, 0, str.length(), fromIndex) - - /**

- * Returns the index within this string of the rightmost occurrence - * of the specified substring. The rightmost empty string "" is - * considered to occur at the index value this.length(). - * The returned index is the largest value k such that - *

- *
-   *  this.toString().startsWith(str, k)
- *
- *

- * is true. - *

- * - * @param str the substring to search for. - * @return if the string argument occurs one or more times as a substring - * within this object, then the index of the first character of - * the last such substring is returned. If it does not occur as - * a substring, -1 is returned. - * @throws NullPointerException if str is null. - */ - def lastIndexOf(str: String): Int = lastIndexOf(str, count) - - /**

- * Returns the index within this string of the last occurrence of the - * specified substring. The integer returned is the largest value - * k such that: - *

val
-   *    k <= Math.min(fromIndex, str.length()) &&
-   *                   this.toString().startsWith(str, k)
- *

- * If no such value of k exists, then -1 - * is returned. - *

- * - * @param str the substring to search for. - * @param fromIndex the index to start the search from. - * @return the index within this sequence of the last occurrence - * of the specified substring. - */ - def lastIndexOf(str: String, fromIndex: Int): Int = - StringBuilder.lastIndexOf(array, 0, count, str.ToCharArray, 0, str.length(), fromIndex) - - /**

- * Causes this character sequence to be replaced by the reverse of the - * sequence. If there are any surrogate pairs included in the sequence, - * these are treated as single characters for the reverse operation. - * Thus, the order of the high-low surrogates is never reversed. - *

- *

- * Let n be the character length of this character sequence - * (not the length in Char values) just prior to - * execution of the reverse method. Then the - * character at index k in the new character sequence is - * equal to the character at index n-k-1 in the old - * character sequence. - *

- * - * @return a reference to this object. - */ - override def reverse(): StringBuilder = { - var hasSurrogate = false - val n = count - 1 - var j = (n-1) >> 1 - while (j >= 0) { - val temp = array(j) - val temp2 = array(n - j) - if (!hasSurrogate) - hasSurrogate = - (temp >= StringBuilder.MIN_SURROGATE && temp <= StringBuilder.MAX_SURROGATE) || - (temp2 >= StringBuilder.MIN_SURROGATE && temp2 <= StringBuilder.MAX_SURROGATE) - array(j) = temp2 - array(n - j) = temp - j -= 1 - } - if (hasSurrogate) { - // Reverse back all valid surrogate pairs - var i = 0 - while (i < count - 1) { - val c2 = array(i) - if (StringBuilder.isLowSurrogate(c2)) { - val c1 = array(i + 1) - if (StringBuilder.isHighSurrogate(c1)) { - array(i) = c1; i += 1 - array(i) = c2 - } - } - i += 1 - } - } - this - } - - /** Returns a string representing the data in this sequence. - * A new String object is allocated and initialized to - * contain the character sequence currently represented by this - * object. This String is then returned. Subsequent - * changes to this sequence do not affect the contents of the - * String. - * - * @return a string representation of this sequence of characters. - */ - override def toString: String = new String(array, 0, count) - - def result(): String = toString -} - - -object StringBuilder -{ - private val MIN_HIGH_SURROGATE = '\uD800' - private val MAX_HIGH_SURROGATE = '\uDBFF' - - private val MIN_LOW_SURROGATE = '\uDC00' - private val MAX_LOW_SURROGATE = '\uDFFF' - - // constants java.langCharacter.MIN-/MAX_SURROGATE exist since 1.5 - private val MIN_SURROGATE = MIN_HIGH_SURROGATE - private val MAX_SURROGATE = MAX_LOW_SURROGATE - - // methods java.langCharacter.isLow-/isHighSurrogate exist since 1.5 - private def isLowSurrogate(ch: Char): Boolean = - MIN_LOW_SURROGATE <= ch && ch <= MAX_LOW_SURROGATE - - private def isHighSurrogate(ch: Char): Boolean = - MIN_HIGH_SURROGATE <= ch && ch <= MAX_HIGH_SURROGATE - - // method java.util.Arrays.copyOf exists since 1.6 - private def copyOf(src: Array[Char], newLength: Int): Array[Char] = { - val dest = new Array[Char](newLength) - compat.Platform.arraycopy(src, 0, dest, 0, Math.min(src.length, newLength)) - dest - } - - private def indexOf(source: Array[Char], sourceOffset: Int, sourceCount: Int, - target: Array[Char], targetOffset: Int, targetCount: Int, - fromIndex: Int): Int = - // todo: There are faster string search algorithms than this! - // we should use at least KMP here. - if (fromIndex >= sourceCount) - if (targetCount == 0) sourceCount else -1 - else { - val inx = if (fromIndex < 0) 0 else fromIndex - if (targetCount == 0) - inx - else { - val first = target(targetOffset) - val max = sourceOffset + (sourceCount - targetCount) - - var i = sourceOffset + inx - while (i <= max) { - /* Look for first character. */ - if (source(i) != first) { - i += 1 - while (i <= max && source(i) != first) i += 1 - } - /* Found first character, now look at the rest of v2 */ - if (i <= max) { - var j = i + 1 - val end = j + targetCount - 1 - var k = targetOffset + 1 - while (j < end && source(j) == target(k)) { - j += 1 - k += 1 - } - if (j == end) { - /* Found whole string. */ - return i - sourceOffset - } - } // if - i += 1 - } // while - -1 - } - } - - private def lastIndexOf(source: Array[Char], sourceOffset: Int, sourceCount: Int, - target: Array[Char], targetOffset: Int, targetCount: Int, - fromIndex: Int): Int = { - val rightIndex = sourceCount - targetCount - if (fromIndex < 0) return -1 - val inx = if (fromIndex > rightIndex) rightIndex else fromIndex - // Empty string always matches - if (targetCount == 0) return inx - - val strLastIndex = targetOffset + targetCount - 1 - val strLastChar = target(strLastIndex) - val min = sourceOffset + targetCount - 1 - var i = min + fromIndex - - while (true) { - while (i >= min && source(i) != strLastChar) i -= 1 - if (i < min) return -1 - var j = i - 1 - val start = j - (targetCount - 1) - var k = strLastIndex - 1 - var outerWhile = false - while (j > start && !outerWhile) { - if (source(j) != target(k)) { - j -= 1 - k -= 1 - i -= 1 - outerWhile = true - } - } - if (!outerWhile) return start - sourceOffset + 1 - } - -1 - } -} diff --git a/src/dotnet-library/scala/collection/mutable/WeakHashMap.scala b/src/dotnet-library/scala/collection/mutable/WeakHashMap.scala deleted file mode 100644 index dbe203971..000000000 --- a/src/dotnet-library/scala/collection/mutable/WeakHashMap.scala +++ /dev/null @@ -1 +0,0 @@ -/* WeakHashMap does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/compat/Platform.scala b/src/dotnet-library/scala/compat/Platform.scala deleted file mode 100644 index f5766316d..000000000 --- a/src/dotnet-library/scala/compat/Platform.scala +++ /dev/null @@ -1,63 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.compat - - -import Predef._ - -object Platform { - - type StackOverflowError = System.StackOverflowException - type ConcurrentModificationException = System.Exception - - /** - * @param src .. - * @param srcPos .. - * @param dest .. - * @param destPos .. - * @param length .. - */ - def arraycopy(src: AnyRef, srcPos: Int, dest: AnyRef, destPos: Int, length: Int) { - if (!src.isInstanceOf[System.Array]) throw new Exception("src for arraycopy is not an Array; use scala.Array.copy for boxed arrays"); - if (!dest.isInstanceOf[System.Array]) throw new Exception("dest for arraycopy is not an Array; use scala.Array.copy for boxed arrays"); - System.Array.Copy(src.asInstanceOf[System.Array], srcPos, dest.asInstanceOf[System.Array], destPos, length) - } - - /** Create array of the same type as arrayInstance with the given - * length. - * - * @param elemClass .. - * @param length .. - * @return .. - */ - def createArray(elemClass: Class[_], length: Int): AnyRef = - System.Array.CreateInstance(elemClass, length) - - def arrayclear(arr: Array[Int]) { - System.Array.Clear(arr.asInstanceOf[System.Array], 0, arr.length) - } - - def getClassForName(name: String): Class[_] = System.Type.GetType(name) - - val EOL = System.Environment.NewLine - - def currentTime: Long = 0L -/* // compiler crash :-( - private lazy val baseTicks = (new System.DateTime(1970, 1, 1, 0, 0, 0)).Ticks - def currentTime: Long = { - val nowTicks = System.DateTime.UtcNow.Ticks - (nowTicks - baseTicks) / 10000 - } -*/ - def collectGarbage { System.GC.Collect() } - -} diff --git a/src/dotnet-library/scala/concurrent/DelayedLazyVal.scala b/src/dotnet-library/scala/concurrent/DelayedLazyVal.scala deleted file mode 100644 index 66ec24f8e..000000000 --- a/src/dotnet-library/scala/concurrent/DelayedLazyVal.scala +++ /dev/null @@ -1 +0,0 @@ -/* DelayedLazyVal does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/concurrent/jolib.scala b/src/dotnet-library/scala/concurrent/jolib.scala deleted file mode 100644 index 73cb5bf1e..000000000 --- a/src/dotnet-library/scala/concurrent/jolib.scala +++ /dev/null @@ -1 +0,0 @@ -/* jolib does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/concurrent/ops.scala b/src/dotnet-library/scala/concurrent/ops.scala deleted file mode 100644 index 7251a6a18..000000000 --- a/src/dotnet-library/scala/concurrent/ops.scala +++ /dev/null @@ -1 +0,0 @@ -/* ops does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/concurrent/pilib.scala b/src/dotnet-library/scala/concurrent/pilib.scala deleted file mode 100644 index 249110e67..000000000 --- a/src/dotnet-library/scala/concurrent/pilib.scala +++ /dev/null @@ -1 +0,0 @@ -/* pilib does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/BufferedSource.scala b/src/dotnet-library/scala/io/BufferedSource.scala deleted file mode 100644 index 0e0fb1079..000000000 --- a/src/dotnet-library/scala/io/BufferedSource.scala +++ /dev/null @@ -1 +0,0 @@ -/* BufferedSource.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/BytePickle.scala b/src/dotnet-library/scala/io/BytePickle.scala deleted file mode 100644 index 3d9273ad7..000000000 --- a/src/dotnet-library/scala/io/BytePickle.scala +++ /dev/null @@ -1 +0,0 @@ -/* BytePickle.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/Codec.scala b/src/dotnet-library/scala/io/Codec.scala deleted file mode 100644 index 803e41274..000000000 --- a/src/dotnet-library/scala/io/Codec.scala +++ /dev/null @@ -1 +0,0 @@ -/* Codec.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/Position.scala b/src/dotnet-library/scala/io/Position.scala deleted file mode 100644 index d8af57210..000000000 --- a/src/dotnet-library/scala/io/Position.scala +++ /dev/null @@ -1 +0,0 @@ -/* Position.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/Source.scala b/src/dotnet-library/scala/io/Source.scala deleted file mode 100644 index 0bdd37b11..000000000 --- a/src/dotnet-library/scala/io/Source.scala +++ /dev/null @@ -1 +0,0 @@ -/* Source.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/io/UTF8Codec.scala b/src/dotnet-library/scala/io/UTF8Codec.scala deleted file mode 100644 index 7958462fd..000000000 --- a/src/dotnet-library/scala/io/UTF8Codec.scala +++ /dev/null @@ -1 +0,0 @@ -/* UTF8Codec.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/mobile/Code.scala b/src/dotnet-library/scala/mobile/Code.scala deleted file mode 100644 index 42ddf0164..000000000 --- a/src/dotnet-library/scala/mobile/Code.scala +++ /dev/null @@ -1 +0,0 @@ -/* Code.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/mobile/Location.scala b/src/dotnet-library/scala/mobile/Location.scala deleted file mode 100644 index fe693a7c6..000000000 --- a/src/dotnet-library/scala/mobile/Location.scala +++ /dev/null @@ -1 +0,0 @@ -/* Location.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/net/Utility.scala b/src/dotnet-library/scala/net/Utility.scala deleted file mode 100644 index 1a3e8c582..000000000 --- a/src/dotnet-library/scala/net/Utility.scala +++ /dev/null @@ -1 +0,0 @@ -/* Utility does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/ref/PhantomReference.scala b/src/dotnet-library/scala/ref/PhantomReference.scala deleted file mode 100644 index d2bc86f9c..000000000 --- a/src/dotnet-library/scala/ref/PhantomReference.scala +++ /dev/null @@ -1 +0,0 @@ -/* PhantomReference does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/ref/ReferenceQueue.scala b/src/dotnet-library/scala/ref/ReferenceQueue.scala deleted file mode 100644 index cc95c40e4..000000000 --- a/src/dotnet-library/scala/ref/ReferenceQueue.scala +++ /dev/null @@ -1 +0,0 @@ -/* ReferenceQueue does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/ref/ReferenceWrapper.scala b/src/dotnet-library/scala/ref/ReferenceWrapper.scala deleted file mode 100644 index 3a954437d..000000000 --- a/src/dotnet-library/scala/ref/ReferenceWrapper.scala +++ /dev/null @@ -1 +0,0 @@ -/* ReferenceWrapper does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/ref/SoftReference.scala b/src/dotnet-library/scala/ref/SoftReference.scala deleted file mode 100644 index decd2c97e..000000000 --- a/src/dotnet-library/scala/ref/SoftReference.scala +++ /dev/null @@ -1 +0,0 @@ -/* SoftReference does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/ref/WeakReference.scala b/src/dotnet-library/scala/ref/WeakReference.scala deleted file mode 100644 index 322d27063..000000000 --- a/src/dotnet-library/scala/ref/WeakReference.scala +++ /dev/null @@ -1 +0,0 @@ -/* WeakReference does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/reflect/Invocation.scala b/src/dotnet-library/scala/reflect/Invocation.scala deleted file mode 100644 index 1dba7d233..000000000 --- a/src/dotnet-library/scala/reflect/Invocation.scala +++ /dev/null @@ -1 +0,0 @@ -/* Invocation.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/reflect/Manifest.scala b/src/dotnet-library/scala/reflect/Manifest.scala deleted file mode 100644 index 7659a80af..000000000 --- a/src/dotnet-library/scala/reflect/Manifest.scala +++ /dev/null @@ -1,157 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2007-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.reflect - -/**

- * A Manifest[T] is an opaque descriptor for type T. - * Currently, its only use is to give access to the erasure of the type as a - * Class instance. - *

- *

- * BE AWARE: The different type-relation operators are all forwarded - * to the erased type as an approximation of the final semantics where - * these operators should be on the unerased type. - *

- */ -trait Manifest[T] extends OptManifest[T] { - - /** A class representing the type U to which T would be erased. Note - * that there is no subtyping relationship between T and U. */ - def erasure: Predef.Class[U] forSome { type U } - - /** Tests whether the type represented by this manifest is a subtype of - * the type represented by `that' manifest. BE AWARE: the current - * implementation is an approximation, as the test is done on the - * erasure of the type. */ - def <:<(that: Manifest[_]): Boolean = { - def subtype(sub: Predef.Class[_], sup: Predef.Class[_]): Boolean = { - val subSuperClass = sub.BaseType - val subSuperInterfaces = sub.GetInterfaces.toList - val subSuper = - (if (subSuperClass == null) Nil else List(subSuperClass)) ::: subSuperInterfaces - (subSuper contains sup) || (subSuper exists (subtype(_, sup))) - } - this.erasure == that.erasure || subtype(this.erasure, that.erasure) - } - - /** Tests whether the type represented by this manifest is a supertype - * of the type represented by `that' manifest. BE AWARE: the current - * implementation is an approximation, as the test is done on the - * erasure of the type. */ - def >:>(that: Manifest[_]): Boolean = - that <:< this - - /** Tests whether the type represented by this manifest is equal to the - * type represented by `that' manifest. BE AWARE: the current - * implementation is an approximation, as the test is done on the - * erasure of the type. */ - override def equals(that: Any): Boolean = that match { - case m:Manifest[_] => this.erasure == m.erasure - case _ => false - } - - private[reflect] def typeArguments: Option[List[Manifest[_]]] = None - -} - -/**

- * This object is used by the compiler and should not be used in client - * code. The object Manifest defines factory methods for - * manifests. - *

- *

- * BE AWARE: The factory for refinement types is missing and - * will be implemented in a later version of this class. - *

- */ -object Manifest { - - /** Manifest for the singleton type `value.type'. */ - def singleType[T](value: Any): Manifest[T] = - new Manifest[T] { - lazy val erasure = - value match { - case anyRefValue: AnyRef => anyRefValue.GetType - case anyValue => error("There is no singleton type for AnyVal values") - } - override lazy val toString = value.toString + ".type" - } - - /** Manifest for the class type `clazz', where `clazz' is - * a top-level or static class. */ - def classType[T](clazz: Predef.Class[T]): Manifest[T] = - new Manifest[T] { - val erasure = clazz - override lazy val toString = erasure.getName - } - - /** Manifest for the class type `clazz[args]', where `clazz' is - * a top-level or static class. */ - def classType[T](clazz: Predef.Class[_], args: Manifest[_]*): Manifest[T] = - new Manifest[T] { - val erasure = clazz - private[reflect] override val typeArguments = Some(args.toList) - override def <:<(that: Manifest[_]): Boolean = { - that.typeArguments match { - case Some(thatArgs) => - super.<:<(that) && args.equalsWith(thatArgs) { (x, y) => x <:< y } - case None => - false - } - } - override lazy val toString = - (if (erasure.isArray) "Array" else erasure.getName) + - args.toList.mkString("[", ", ", "]") - } - - /** Manifest for the class type `prefix # clazz'. */ - def classType[T](prefix: Manifest[_], clazz: Predef.Class[_]): Manifest[T] = - new Manifest[T] { - val erasure = clazz - override lazy val toString = prefix.toString + "#" + clazz.getName - } - - /** Manifest for the class type `prefix # clazz[args]'. */ - def classType[T](prefix: Manifest[_], clazz: Predef.Class[_], args: Manifest[_]*): Manifest[T] = - new Manifest[T] { - val erasure = clazz - private[reflect] override val typeArguments = Some(args.toList) - override lazy val toString = - prefix.toString + "#" + erasure.getName + typeArguments.mkString("[", ", ", "]") - } - - /** Manifest for the abstract type `prefix # name'. `upperBound' is not - * strictly necessary as it could be obtained by reflection. It was - * added so that erasure can be calculated without reflection. */ - def abstractType[T](prefix: Manifest[_], name: String, upperBound: Manifest[_]): Manifest[T] = - new Manifest[T] { - lazy val erasure = upperBound.erasure - override lazy val toString = prefix.toString + "#" + name - } - - /** Manifest for the abstract type `prefix # name[args]'. */ - def abstractType[T](prefix: Manifest[_], name: String, upperBound: Manifest[_], args: Manifest[_]*): Manifest[T] = - new Manifest[T] { - lazy val erasure = upperBound.erasure - private[reflect] override val typeArguments = Some(args.toList) - override lazy val toString = - prefix.toString + "#" + name + typeArguments.mkString("[", ", ", "]") - } - - /** Manifest for the intersection type `parents_0 with ... with parents_n'. */ - def intersectionType[T](parents: Manifest[_]*): Manifest[T] = - new Manifest[T] { - lazy val erasure = parents.first.erasure - override lazy val toString = parents.mkString(" with ") - } - -} diff --git a/src/dotnet-library/scala/reflect/ScalaBeanInfo.scala b/src/dotnet-library/scala/reflect/ScalaBeanInfo.scala deleted file mode 100644 index 5d4ffb45a..000000000 --- a/src/dotnet-library/scala/reflect/ScalaBeanInfo.scala +++ /dev/null @@ -1 +0,0 @@ -/* ScalaBeanInfo does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/runtime/BooleanRef.cs b/src/dotnet-library/scala/runtime/BooleanRef.cs deleted file mode 100644 index 455ed3bee..000000000 --- a/src/dotnet-library/scala/runtime/BooleanRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class BooleanRef { - public bool elem; - public BooleanRef(bool elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/BoxedUnit.cs b/src/dotnet-library/scala/runtime/BoxedUnit.cs deleted file mode 100644 index 44f59d623..000000000 --- a/src/dotnet-library/scala/runtime/BoxedUnit.cs +++ /dev/null @@ -1,36 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -namespace scala.runtime { - - using System; - - [Serializable] - public sealed class BoxedUnit { - - public static readonly BoxedUnit UNIT = new BoxedUnit(); - - private BoxedUnit() { } - - override public bool Equals(object other) { - return this == other; - } - - override public int GetHashCode() { - return 0; - } - - override public string ToString() { - return "()"; - } - } - -} diff --git a/src/dotnet-library/scala/runtime/ByteRef.cs b/src/dotnet-library/scala/runtime/ByteRef.cs deleted file mode 100644 index 8d26da0af..000000000 --- a/src/dotnet-library/scala/runtime/ByteRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class ByteRef { - public byte elem; - public ByteRef(byte elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/CharRef.cs b/src/dotnet-library/scala/runtime/CharRef.cs deleted file mode 100644 index 8ee7c5d4c..000000000 --- a/src/dotnet-library/scala/runtime/CharRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class CharRef { - public char elem; - public CharRef(char elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/Comparator.cs b/src/dotnet-library/scala/runtime/Comparator.cs deleted file mode 100644 index bab602e56..000000000 --- a/src/dotnet-library/scala/runtime/Comparator.cs +++ /dev/null @@ -1,51 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - public class Comparator { - public static bool equals(object a, object b) { - if (a == null) - return b == null; - if (a.Equals(b)) - return true; - if (a == b) - return true; - IConvertible aa = a as IConvertible; - IConvertible bb = b as IConvertible; - - // We must check if a and b are realy convertible to numbers, because - // String is also an implementation of IConvertible... - // So we can avoid having "12" == 12 returning true !! - if((a is Decimal || a is Double || a is Single || a is Byte - || a is SByte || a is Int16 || a is UInt16 || a is Int32 - || a is UInt32 || a is Int64 || a is UInt64) - && (b is Decimal || b is Double || b is Single || b is Byte - || b is SByte || b is Int16 || b is UInt16 || b is Int32 - || b is UInt32 || b is Int64 || b is UInt64)){ - if (aa != null && bb != null) { - if (a is Decimal || b is Decimal) - return aa.ToDecimal(null) == bb.ToDecimal(null); - if (a is Double || b is Double) - return aa.ToDouble(null) == bb.ToDouble(null); - if (a is Single || b is Single) - return aa.ToSingle(null) == bb.ToSingle(null); - if (a is Int64 || b is Int64) - return aa.ToInt64(null) == bb.ToInt64(null); - return aa.ToInt32(null) == bb.ToInt32(null); - } - } - return false; - } - } - -} diff --git a/src/dotnet-library/scala/runtime/DoubleRef.cs b/src/dotnet-library/scala/runtime/DoubleRef.cs deleted file mode 100644 index a501a62c5..000000000 --- a/src/dotnet-library/scala/runtime/DoubleRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class DoubleRef { - public double elem; - public DoubleRef(double elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/ExceptionHandling.cs b/src/dotnet-library/scala/runtime/ExceptionHandling.cs deleted file mode 100644 index c1c991421..000000000 --- a/src/dotnet-library/scala/runtime/ExceptionHandling.cs +++ /dev/null @@ -1,27 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - public abstract class ExceptionHandling { - - public static Exception tryCatch(Runnable runnable) { - try { - runnable.run(); - return null; - } catch (Exception exception) { - return exception; - } - } - } - -} diff --git a/src/dotnet-library/scala/runtime/FloatRef.cs b/src/dotnet-library/scala/runtime/FloatRef.cs deleted file mode 100644 index 4b7b77191..000000000 --- a/src/dotnet-library/scala/runtime/FloatRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class FloatRef { - public float elem; - public FloatRef(float elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/IntRef.cs b/src/dotnet-library/scala/runtime/IntRef.cs deleted file mode 100644 index bf641ad52..000000000 --- a/src/dotnet-library/scala/runtime/IntRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class IntRef { - public int elem; - public IntRef(int elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/LongRef.cs b/src/dotnet-library/scala/runtime/LongRef.cs deleted file mode 100644 index 4588cdeb7..000000000 --- a/src/dotnet-library/scala/runtime/LongRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class LongRef { - public long elem; - public LongRef(long elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/MethodCache.scala b/src/dotnet-library/scala/runtime/MethodCache.scala deleted file mode 100644 index 530e85c69..000000000 --- a/src/dotnet-library/scala/runtime/MethodCache.scala +++ /dev/null @@ -1 +0,0 @@ -/* MethodCache does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/runtime/NonLocalReturnException.scala b/src/dotnet-library/scala/runtime/NonLocalReturnException.scala deleted file mode 100644 index 78045b64e..000000000 --- a/src/dotnet-library/scala/runtime/NonLocalReturnException.scala +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -import Predef.RuntimeException - -class NonLocalReturnException[T](val key: AnyRef, val value: T) extends RuntimeException diff --git a/src/dotnet-library/scala/runtime/ObjectRef.cs b/src/dotnet-library/scala/runtime/ObjectRef.cs deleted file mode 100644 index 2ec2a9e90..000000000 --- a/src/dotnet-library/scala/runtime/ObjectRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class ObjectRef { - public Object elem; - public ObjectRef(Object elem) { this.elem = elem; } - override public string ToString() { return "" + elem; } - } - -} diff --git a/src/dotnet-library/scala/runtime/RichChar.scala b/src/dotnet-library/scala/runtime/RichChar.scala deleted file mode 100644 index df19bd789..000000000 --- a/src/dotnet-library/scala/runtime/RichChar.scala +++ /dev/null @@ -1,74 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - -//import java.lang.Character -import collection.Vector -import collection.generic.VectorView -import Predef.{require, NoSuchElementException} - -/**

- * For example, in the following code - *

- *
- *    object test extends Application {
- *      Console.println('\40'.isWhitespace)
- *      Console.println('\011'.isWhitespace)
- *      Console.println('1'.asDigit == 1)
- *      Console.println('A'.asDigit == 10)
- *    }
- *

- * the implicit conversions are performed using the predefined view - * Predef.charWrapper. - *

- */ -final class RichChar(x: Char) extends Proxy with Ordered[Char] { - - // Proxy.self - def self: Any = x - - // Ordered[Char].compare - def compare (y: Char): Int = if (x < y) -1 else if (x > y) 1 else 0 - - def asDigit: Int = System.Char.GetNumericValue(x).toInt - - def isControl: Boolean = System.Char.IsControl(x) - def isDigit: Boolean = System.Char.IsDigit(x) - def isLetter: Boolean = System.Char.IsLetter(x) - def isLetterOrDigit: Boolean = System.Char.IsLetterOrDigit(x) - def isLowerCase: Boolean = System.Char.IsLower(x) - def isUpperCase: Boolean = System.Char.IsUpper(x) - def isWhitespace: Boolean = System.Char.IsWhiteSpace(x) - - def toLowerCase: Char = System.Char.ToLower(x) - def toUpperCase: Char = System.Char.ToUpper(x) - - /** Create a [Char] over the characters from 'x' to 'y' - 1 - */ - def until(limit: Char): VectorView[Char, Vector[Char]] = - if (limit <= x) Vector.empty.view - else - new VectorView[Char, Vector[Char]] { - protected def underlying = Vector.empty[Char] - def length = limit - x - def apply(i: Int): Char = { - require(i >= 0 && i < length) - (x + i).toChar - } - } - - /** Create a VectorView[Char] over the characters from 'x' to 'y' - */ - def to(y: Char): VectorView[Char, Vector[Char]] = until((y + 1).toChar) - -} diff --git a/src/dotnet-library/scala/runtime/RichClass.scala b/src/dotnet-library/scala/runtime/RichClass.scala deleted file mode 100644 index a7a781f61..000000000 --- a/src/dotnet-library/scala/runtime/RichClass.scala +++ /dev/null @@ -1,26 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - -import Predef.Class - -final class RichClass(val self: Class[_]) extends Proxy -{ - def isPrimitive(): Boolean = self.IsPrimitive - def isArray(): Boolean = self.IsArray - - def getClass(): RichClass = this - def getName(): String = self.Name - def getComponentType(): Class[_] = self.GetElementType - def isAssignableFrom(other: RichClass) = self.IsAssignableFrom(other.self) - -} diff --git a/src/dotnet-library/scala/runtime/RichDouble.scala b/src/dotnet-library/scala/runtime/RichDouble.scala deleted file mode 100644 index acb432768..000000000 --- a/src/dotnet-library/scala/runtime/RichDouble.scala +++ /dev/null @@ -1,52 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -final class RichDouble(x: Double) extends Proxy with Ordered[Double] { - - // Proxy.self - def self: Any = x - - // Ordered[Double].compare - def compare(y: Double): Int = if (x < y) -1 else if (x > y) 1 else 0 - - def min(y: Double): Double = Math.min(x, y) - def max(y: Double): Double = Math.max(x, y) - def abs: Double = Math.abs(x) - - def round: Long = Math.round(x) - def ceil: Double = Math.ceil(x) - def floor: Double = Math.floor(x) - - /** Converts an angle measured in degrees to an approximately equivalent - * angle measured in radians. - * - * @param x an angle, in degrees - * @return the measurement of the angle x in radians. - */ - def toRadians: Double = Math.toRadians(x) - - /** Converts an angle measured in radians to an approximately equivalent - * angle measured in degrees. - * - * @param x angle, in radians - * @return the measurement of the angle x in degrees. - */ - def toDegrees: Double = Math.toDegrees(x) - - def isNaN: Boolean = System.Double.IsNaN(x) - def isInfinity: Boolean = System.Double.IsInfinity(x) - def isPosInfinity: Boolean = System.Double.IsPositiveInfinity(x) - def isNegInfinity: Boolean = System.Double.IsNegativeInfinity(x) - -} diff --git a/src/dotnet-library/scala/runtime/RichException.scala b/src/dotnet-library/scala/runtime/RichException.scala deleted file mode 100644 index b962e8152..000000000 --- a/src/dotnet-library/scala/runtime/RichException.scala +++ /dev/null @@ -1,21 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -final class RichException(exc: System.Exception) { - - def printStackTrace() = System.Console.WriteLine(exc.StackTrace) - def getMessage() = exc.Message - def getStackTraceString: String = exc.StackTrace - -} diff --git a/src/dotnet-library/scala/runtime/RichFloat.scala b/src/dotnet-library/scala/runtime/RichFloat.scala deleted file mode 100644 index 3f69ce3fd..000000000 --- a/src/dotnet-library/scala/runtime/RichFloat.scala +++ /dev/null @@ -1,54 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -import Predef._ - -final class RichFloat(x: Float) extends Proxy with Ordered[Float] { - - // Proxy.self - def self: Any = x - - // Ordered[Float].compare - def compare (y: Float): Int = if (x < y) -1 else if (x > y) 1 else 0 - - def min(y: Float) = Math.min(x, y) - def max(y: Float) = Math.max(x, y) - def abs: Float = Math.abs(x) - - def round: Int = Math.round(x) - def ceil: Float = Math.ceil(x).toFloat - def floor: Float = Math.floor(x).toFloat - - /** Converts an angle measured in degrees to an approximately equivalent - * angle measured in radians. - * - * @param x an angle, in degrees - * @return the measurement of the angle x in radians. - */ - def toRadians: Float = Math.toRadians(x).toFloat - - /** Converts an angle measured in radians to an approximately equivalent - * angle measured in degrees. - * - * @param x angle, in radians - * @return the measurement of the angle x in degrees. - */ - def toDegrees: Float = Math.toDegrees(x).toFloat - - def isNaN: Boolean = System.Single.IsNaN(x) - def isInfinity: Boolean = System.Single.IsInfinity(x) - def isPosInfinity: Boolean = System.Single.IsPositiveInfinity(x) - def isNegInfinity: Boolean = System.Single.IsNegativeInfinity(x) - -} diff --git a/src/dotnet-library/scala/runtime/RichInt.scala b/src/dotnet-library/scala/runtime/RichInt.scala deleted file mode 100644 index 390188c13..000000000 --- a/src/dotnet-library/scala/runtime/RichInt.scala +++ /dev/null @@ -1,36 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -final class RichInt(val start: Int) extends Proxy with Ordered[Int] { - - // Proxy - def self: Any = start - - // Ordered[Int] - def compare(that: Int): Int = if (start < that) -1 else if (start > that) 1 else 0 - - /** See Iterator.range. */ - def until(end: Int, step: Int = 1): Range = new Range(start, end, step) - - /** like until, but includes the last index */ - def to(end: Int, step: Int = 1) = Range.inclusive(start, end, step) - - def min(that: Int): Int = if (start < that) start else that - def max(that: Int): Int = if (start > that) start else that - def abs: Int = if (start < 0) -start else start - - def toBinaryString: String = System.Convert.ToString(start, 2) - def toHexString: String = System.Convert.ToString(start, 16) - def toOctalString: String = System.Convert.ToString(start, 8) -} diff --git a/src/dotnet-library/scala/runtime/RichLong.scala b/src/dotnet-library/scala/runtime/RichLong.scala deleted file mode 100644 index e24cd3787..000000000 --- a/src/dotnet-library/scala/runtime/RichLong.scala +++ /dev/null @@ -1,30 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - - -final class RichLong(x: Long) extends Proxy with Ordered[Long] { - - // Proxy.self - def self: Any = x - - // Ordered[Long].compare - def compare(y: Long): Int = if (x < y) -1 else if (x > y) 1 else 0 - - def min(y: Long): Long = if (x < y) x else y - def max(y: Long): Long = if (x > y) x else y - def abs: Long = if (x < 0) -x else x - - def toBinaryString: String = System.Convert.ToString(x, 2) - def toHexString: String = System.Convert.ToString(x, 16) - def toOctalString: String = System.Convert.ToString(x, 8) -} diff --git a/src/dotnet-library/scala/runtime/RichString.scala b/src/dotnet-library/scala/runtime/RichString.scala deleted file mode 100644 index e690c0891..000000000 --- a/src/dotnet-library/scala/runtime/RichString.scala +++ /dev/null @@ -1,218 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.runtime - -//import scala.util.matching.Regex -import collection.generic._ -//import collection.mutable.StringBuilder -import collection.immutable.Vector - -object RichString { - - def newBuilder: Builder[Char, RichString] = new StringBuilder() mapResult (new RichString(_)) - implicit def builderFactory: BuilderFactory[Char, RichString, RichString] = new BuilderFactory[Char, RichString, RichString] { def apply(from: RichString) = newBuilder } - implicit def builderFactory2: BuilderFactory[Char, RichString, String] = new BuilderFactory[Char, RichString, String] { def apply(from: String) = newBuilder } - - // just statics for rich string. - private final val LF: Char = 0x0A - private final val FF: Char = 0x0C - private final val CR: Char = 0x0D - private final val SU: Char = 0x1A -} - -import RichString._ - -class RichString(val self: String) extends Proxy with Vector[Char] with VectorTemplate[Char, RichString] with PartialFunction[Int, Char] with Ordered[String] { - - /** Creates a string builder buffer as builder for this class */ - override protected[this] def newBuilder = RichString.newBuilder - - /** Return element at index `n` - * @throws IndexOutofBoundsException if the index is not valid - */ - def apply(n: Int): Char = self charAt n - - def length: Int = self.length - - override def mkString = self - override def toString = self - - /** return n times the current string - */ - def * (n: Int): String = { - val buf = new StringBuilder - for (i <- 0 until n) buf append self - buf.toString - } - - override def compare(other: String) = self compareTo other - - private def isLineBreak(c: Char) = c == LF || c == FF - - /**

- * Strip trailing line end character from this string if it has one. - * A line end character is one of - *

- *
    - *
  • LF - line feed (0x0A hex)
  • - *
  • FF - form feed (0x0C hex)
  • - *
- *

- * If a line feed character LF is preceded by a carriage return CR - * (0x0D hex), the CR character is also stripped (Windows convention). - *

- */ - def stripLineEnd: String = { - val len = self.length - if (len == 0) self - else { - val last = apply(len - 1) - if (isLineBreak(last)) - self.substring(0, if (last == LF && len >= 2 && apply(len - 2) == CR) len - 2 else len - 1) - else - self - } - } - - /**

- * Return all lines in this string in an iterator, including trailing - * line end characters. - *

- *

- * The number of strings returned is one greater than the number of line - * end characters in this string. For an empty string, a single empty - * line is returned. A line end character is one of - *

- *
    - *
  • LF - line feed (0x0A hex)
  • - *
  • FF - form feed (0x0C hex)
  • - *
- */ - def linesWithSeparators = new Iterator[String] { - val len = self.length - var index = 0 - def hasNext: Boolean = index < len - def next(): String = { - if (index >= len) throw new NoSuchElementException("next on empty iterator") - val start = index - while (index < len && !isLineBreak(apply(index))) index += 1 - index += 1 - self.substring(start, index min len) - } - } - - /** Return all lines in this string in an iterator, excluding trailing line - * end characters, i.e. apply .stripLineEnd to all lines - * returned by linesWithSeparators. - */ - def lines: Iterator[String] = - linesWithSeparators map (line => new RichString(line).stripLineEnd) - - /** Returns this string with first character converted to upper case */ - def capitalize: String = - if (self == null) null - else if (self.length == 0) "" - else { - val chars = self.toCharArray - chars(0) = chars(0).toUpperCase - new String(chars) - } - - /**

- * For every line in this string: - *

- *
- * Strip a leading prefix consisting of blanks or control characters - * followed by marginChar from the line. - *
- */ - def stripMargin(marginChar: Char): String = { - val buf = new StringBuilder - for (line <- linesWithSeparators) { - val len = line.length - var index = 0 - while (index < len && line.charAt(index) <= ' ') index += 1 - buf append - (if (index < len && line.charAt(index) == marginChar) line.substring(index + 1) else line) - } - buf.toString - } - - /**

- * For every line in this string: - *

- *
- * Strip a leading prefix consisting of blanks or control characters - * followed by | from the line. - *
- */ - def stripMargin: String = stripMargin('|') - -// private def escape(ch: Char): String = "\\Q" + ch + "\\E" - -// @throws(classOf[java.util.regex.PatternSyntaxException]) -// def split(separator: Char): Array[String] = self.split(escape(separator)) - -// @throws(classOf[java.util.regex.PatternSyntaxException]) -// def split(separators: Array[Char]): Array[String] = { -// val re = separators.foldLeft("[")(_+escape(_)) + "]" -// self.split(re) -// } - - /** You can follow a string with `.r', turning - * it into a Regex. E.g. - * - * """A\w*""".r is the regular expression for identifiers starting with `A'. - */ -// def r: Regex = new Regex(self) - - def toBoolean: Boolean = System.Boolean.Parse(self) - def toByte: Byte = System.Byte.Parse(self) - def toShort: Short = System.Int16.Parse(self) - def toInt: Int = System.Int32.Parse(self) - def toLong: Long = System.Int64.Parse(self) - def toFloat: Float = System.Single.Parse(self) - def toDouble: Double = System.Double.Parse(self) - - private def parseBoolean(s: String): Boolean = - if (s != null) s.toLowerCase match { - case "true" => true - case "false" => false - case _ => throw new NumberFormatException("For input string: \""+s+"\"") - } - else - throw new NumberFormatException("For input string: \"null\"") - - def toArray: Array[Char] = { - val result = new Array[Char](length) - compat.Platform.arraycopy(self.ToCharArray, 0, result, 0, length) - result - } - - /**

- * Uses the underlying string as a pattern (in a fashion similar to - * printf in C), and uses the supplied arguments to fill in the - * holes. - *

- *

- * The interpretation of the formatting patterns is described in - * - * java.util.Formatter. - *

- * - * @param args the arguments used to instantiating the pattern. - * @throws java.lang.IllegalArgumentException - */ -// def format(args : Any*) : String = -// java.lang.String.format(self, args.toArray[Any].asInstanceOf[Array[AnyRef]]: _*) -} - diff --git a/src/dotnet-library/scala/runtime/Runnable.cs b/src/dotnet-library/scala/runtime/Runnable.cs deleted file mode 100644 index 6bd085f94..000000000 --- a/src/dotnet-library/scala/runtime/Runnable.cs +++ /dev/null @@ -1,17 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - public interface Runnable { - void run(); - } - -} diff --git a/src/dotnet-library/scala/runtime/ShortRef.cs b/src/dotnet-library/scala/runtime/ShortRef.cs deleted file mode 100644 index b7c35aeb0..000000000 --- a/src/dotnet-library/scala/runtime/ShortRef.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - [Serializable] - public class ShortRef { - public short elem; - public ShortRef(short elem) { this.elem = elem; } - override public string ToString() { return elem.ToString(); } - } - -} diff --git a/src/dotnet-library/scala/runtime/StringAdd.scala b/src/dotnet-library/scala/runtime/StringAdd.scala deleted file mode 100644 index f23de8aad..000000000 --- a/src/dotnet-library/scala/runtime/StringAdd.scala +++ /dev/null @@ -1,28 +0,0 @@ -/* *\ -** ________ ___ __ ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ |_| ** -** ** -\* */ - -// $Id$ - - -package scala.runtime - - -import Predef._ - -final class StringAdd(self: Any) { - - def +(other: String) = self.toString + other - - /** Formats string according to given format string. - * Format strings are as for String.format (@see - * http://msdn2.microsoft.com/en-us/library/system.string.format(VS.71).aspx - * and http://www.codeproject.com/books/0735616485.asp). - */ - def formatted(format: String): String = - String.Format(format, Array(self.asInstanceOf[Object])) -} diff --git a/src/dotnet-library/scala/runtime/SymtabAttribute.cs b/src/dotnet-library/scala/runtime/SymtabAttribute.cs deleted file mode 100644 index b099f848f..000000000 --- a/src/dotnet-library/scala/runtime/SymtabAttribute.cs +++ /dev/null @@ -1,22 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2002-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - -namespace scala.runtime { - - using System; - - public class SymtabAttribute : Attribute { - public byte[] symtab; - - public SymtabAttribute(byte[] symtab) { this.symtab = symtab; } - public SymtabAttribute() {} - } - -} diff --git a/src/dotnet-library/scala/testing/Benchmark.scala b/src/dotnet-library/scala/testing/Benchmark.scala deleted file mode 100644 index 1e5cd8c32..000000000 --- a/src/dotnet-library/scala/testing/Benchmark.scala +++ /dev/null @@ -1 +0,0 @@ -/* Benchmark does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/testing/SUnit.scala b/src/dotnet-library/scala/testing/SUnit.scala deleted file mode 100644 index 0c657b94c..000000000 --- a/src/dotnet-library/scala/testing/SUnit.scala +++ /dev/null @@ -1 +0,0 @@ -/* SUnit does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/testing/Show.scala b/src/dotnet-library/scala/testing/Show.scala deleted file mode 100644 index 06adc0bd6..000000000 --- a/src/dotnet-library/scala/testing/Show.scala +++ /dev/null @@ -1 +0,0 @@ -/* scala.testing.Show does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/text/Document.scala b/src/dotnet-library/scala/text/Document.scala deleted file mode 100644 index b016032fe..000000000 --- a/src/dotnet-library/scala/text/Document.scala +++ /dev/null @@ -1,122 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2003-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.text - - -import System.IO.TextWriter - -case object DocNil extends Document -case object DocBreak extends Document -case class DocText(txt: String) extends Document -case class DocGroup(doc: Document) extends Document -case class DocNest(indent: Int, doc: Document) extends Document -case class DocCons(hd: Document, tl: Document) extends Document - -/** - * A basic pretty-printing library, based on Lindig's strict version - * of Wadler's adaptation of Hughes' pretty-printer. - * - * @author Michel Schinz - * @version 1.0 - */ -abstract class Document { - def ::(hd: Document): Document = DocCons(hd, this) - def ::(hd: String): Document = DocCons(DocText(hd), this) - def :/:(hd: Document): Document = hd :: DocBreak :: this - def :/:(hd: String): Document = hd :: DocBreak :: this - - /** - * Format this document on writer and try to set line - * breaks so that the result fits in width columns. - * - * @param width ... - * @param writer ... - */ - def format(width: Int, writer: TextWriter) { - type FmtState = (Int, Boolean, Document) - - def fits(w: Int, state: List[FmtState]): Boolean = state match { - case _ if w < 0 => - false - case List() => - true - case (_, _, DocNil) :: z => - fits(w, z) - case (i, b, DocCons(h, t)) :: z => - fits(w, (i,b,h) :: (i,b,t) :: z) - case (_, _, DocText(t)) :: z => - fits(w - t.length(), z) - case (i, b, DocNest(ii, d)) :: z => - fits(w, (i + ii, b, d) :: z) - case (_, false, DocBreak) :: z => - fits(w - 1, z) - case (_, true, DocBreak) :: z => - true - case (i, _, DocGroup(d)) :: z => - fits(w, (i, false, d) :: z) - } - - def spaces(n: Int) { - var rem = n - while (rem >= 16) { writer Write " "; rem -= 16 } - if (rem >= 8) { writer Write " "; rem -= 8 } - if (rem >= 4) { writer Write " "; rem -= 4 } - if (rem >= 2) { writer Write " "; rem -= 2} - if (rem == 1) { writer Write " " } - } - - def fmt(k: Int, state: List[FmtState]): Unit = state match { - case List() => () - case (_, _, DocNil) :: z => - fmt(k, z) - case (i, b, DocCons(h, t)) :: z => - fmt(k, (i, b, h) :: (i, b, t) :: z) - case (i, _, DocText(t)) :: z => - writer Write t - fmt(k + t.length(), z) - case (i, b, DocNest(ii, d)) :: z => - fmt(k, (i + ii, b, d) :: z) - case (i, true, DocBreak) :: z => - writer Write "\n" - spaces(i); - fmt(i, z) - case (i, false, DocBreak) :: z => - writer Write " " - fmt(k + 1, z) - case (i, b, DocGroup(d)) :: z => - val fitsFlat = fits(width - k, (i, false, d) :: z) - fmt(k, (i, !fitsFlat, d) :: z) - } - - fmt(0, (0, false, DocGroup(this)) :: Nil) - } -} - -object Document { - /** The empty document */ - def empty = DocNil - - /** A break, which will either be turned into a space or a line break */ - def break = DocBreak - - /** A document consisting of some text literal */ - def text(s: String): Document = DocText(s) - - /** - * A group, whose components will either be printed with all breaks - * rendered as spaces, or with all breaks rendered as line breaks. - */ - def group(d: Document): Document = DocGroup(d) - - /** A nested document, which will be indented as specified. */ - def nest(i: Int, d: Document): Document = DocNest(i, d) -} diff --git a/src/dotnet-library/scala/util/DynamicVariable.scala b/src/dotnet-library/scala/util/DynamicVariable.scala deleted file mode 100644 index 39ceaf1b7..000000000 --- a/src/dotnet-library/scala/util/DynamicVariable.scala +++ /dev/null @@ -1,83 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.util - - -import Predef._ -import System.Threading.Thread -import System.LocalDataStoreSlot - -/**

- * DynamicVariables provide a binding mechanism where the current - * value is found through dynamic scope, but where - * access to the variable itself is resolved through static - * scope. - *

- *

- * The current value can be retrieved with the - * value method. New values should be - * pushed using the withValue method. - * Values pushed via withValue only - * stay valid while the withValue's - * second argument, a parameterless closure, - * executes. When the second argument finishes, - * the variable reverts to the previous value. - *

- *

- * Usage of withValue looks like this: - *

- *
- *  someDynamicVariable.withValue(newValue) {
- *    // ... code called in here that calls value ...
- *    // ... will be given back the newValue ...
- *  }
- *  
- *

- * Each thread gets its own stack of bindings. When a - * new thread is created, the fluid gets a copy of - * the stack of bindings from the parent thread, and - * from then on the bindings for the new thread - * are independent of those for the original thread. - *

- * - * @author Lex Spoon - * @version 1.1, 2007-5-21 - */ -class DynamicVariable[T](init: T) { - private val slot: LocalDataStoreSlot = Thread.AllocateDataSlot() - value = init - - /** Retrieve the current value */ - def value: T = Thread.GetData(slot).asInstanceOf[T] - - /** Set the value of the fluid while executing the specified - * thunk. - * - * @param newval The value to which to set the fluid - * @param thunk The code to evaluate under the new setting - */ - def withValue[S](newval: T)(thunk: =>S): S = { - val oldval = value - value = newval - - try { thunk } finally { - value = oldval - } - } - - /** Change the currently bound value, discarding the old value. - * Usually withValue() gives better semantics. - */ - def value_=(newval: T) = { Thread.SetData(slot, newval.asInstanceOf[AnyRef]) } - - override def toString: String = "DynamicVariable(" + value +")" -} diff --git a/src/dotnet-library/scala/util/Marshal.scala b/src/dotnet-library/scala/util/Marshal.scala deleted file mode 100644 index 4817f34c9..000000000 --- a/src/dotnet-library/scala/util/Marshal.scala +++ /dev/null @@ -1 +0,0 @@ -/* Marshal does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/NameTransformer.scala b/src/dotnet-library/scala/util/NameTransformer.scala deleted file mode 100644 index 1df270414..000000000 --- a/src/dotnet-library/scala/util/NameTransformer.scala +++ /dev/null @@ -1 +0,0 @@ -/* NameTransformer does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/Properties.scala b/src/dotnet-library/scala/util/Properties.scala deleted file mode 100644 index efa7824ec..000000000 --- a/src/dotnet-library/scala/util/Properties.scala +++ /dev/null @@ -1 +0,0 @@ -/* Properties does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/Random.scala b/src/dotnet-library/scala/util/Random.scala deleted file mode 100644 index 406efd995..000000000 --- a/src/dotnet-library/scala/util/Random.scala +++ /dev/null @@ -1,98 +0,0 @@ -/* __ *\ -** ________ ___ / / ___ Scala API ** -** / __/ __// _ | / / / _ | (c) 2006-2009, LAMP/EPFL ** -** __\ \/ /__/ __ |/ /__/ __ | http://scala-lang.org/ ** -** /____/\___/_/ |_/____/_/ | | ** -** |/ ** -\* */ - -// $Id$ - - -package scala.util - -/** - * @author Stephane Micheloud - */ -class Random(self0: System.Random) { - private var rnd = self0 // see setSeed(seed) - def self = rnd - - /** Creates a new random number generator using a single long seed. */ - def this(seed: Long) = this(new System.Random(seed.toInt)) - - /** Creates a new random number generator using a single integer seed. */ - def this(seed: Int) = this(new System.Random(seed)) - - /** Creates a new random number generator. */ - def this() = this(new System.Random(System.Environment.TickCount)) - - /** Returns the next pseudorandom, uniformly distributed boolean value - * from this random number generator's sequence. - */ - def nextBoolean(): Boolean = (nextInt() & 0x1) == 1 - - /** Generates random bytes and places them into a user-supplied byte - * array. - */ - def nextBytes(bytes: Array[Byte]) { rnd.NextBytes(bytes) } - - /** Returns the next pseudorandom, uniformly distributed double value - * between 0.0 and 1.0 from this random number generator's sequence. - */ - def nextDouble(): Double = rnd.NextDouble() - - /** Returns the next pseudorandom, uniformly distributed float value - * between 0.0 and 1.0 from this random number generator's sequence. - */ - def nextFloat(): Float = nextDouble().toFloat - - /** Returns the next pseudorandom, Gaussian ("normally") distributed - * double value with mean 0.0 and standard deviation 1.0 from this - * random number generator's sequence. - * This implements the Box-Muller transformation on the pseudorandom - * `nextDouble` method of this class, and should be equivalent to - * the implementation of `nextGaussian` in the Java API. - */ - def nextGaussian(): Double = synchronized { - if (nextGaussianAvailable) { - nextGaussianAvailable = false - nextGaussianCache - } else { - var u: Double = 0.0 - var v: Double = 0.0 - var s: Double = 0.0 - do { - u = 2 * nextDouble() - 1 // [-1, +1] - v = 2 * nextDouble() - 1 // [-1, +1] - s = Math.pow(u, 2) + Math.pow(v, 2) - } while (s >= 1 || s == 0); - val mul = Math.sqrt((-2 * Math.log(s)) / s) - nextGaussianCache = u * mul - nextGaussianAvailable = true - v * mul - } - } - - private var nextGaussianAvailable: Boolean = false - private var nextGaussianCache: Double = _ - - /** Returns the next pseudorandom, uniformly distributed int value - * from this random number generator's sequence. - */ - def nextInt(): Int = rnd.Next() - - /** Returns a pseudorandom, uniformly distributed int value between 0 - * (inclusive) and the specified value (exclusive), drawn from this - * random number generator's sequence. - */ - def nextInt(n: Int): Int = rnd.Next(0, n) - - /** Returns the next pseudorandom, uniformly distributed long value - * from this random number generator's sequence. - */ - def nextLong(): Long = nextInt().toLong // 2x nextInt() ?! - - def setSeed(seed: Long) { rnd = new System.Random(seed.toInt) } - -} diff --git a/src/dotnet-library/scala/util/ScalaClassLoader.scala b/src/dotnet-library/scala/util/ScalaClassLoader.scala deleted file mode 100644 index 0c330e0a1..000000000 --- a/src/dotnet-library/scala/util/ScalaClassLoader.scala +++ /dev/null @@ -1 +0,0 @@ -/* ScalaClassLoader does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/BaseBerrySethi.scala b/src/dotnet-library/scala/util/automata/BaseBerrySethi.scala deleted file mode 100644 index 5ae9bf2ff..000000000 --- a/src/dotnet-library/scala/util/automata/BaseBerrySethi.scala +++ /dev/null @@ -1 +0,0 @@ -/* BaseBerrySethi.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/DetWordAutom.scala b/src/dotnet-library/scala/util/automata/DetWordAutom.scala deleted file mode 100644 index 8dcc11cbb..000000000 --- a/src/dotnet-library/scala/util/automata/DetWordAutom.scala +++ /dev/null @@ -1 +0,0 @@ -/* DetWordAutom.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/Inclusion.scala b/src/dotnet-library/scala/util/automata/Inclusion.scala deleted file mode 100644 index 428634003..000000000 --- a/src/dotnet-library/scala/util/automata/Inclusion.scala +++ /dev/null @@ -1 +0,0 @@ -/* Inclusion.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/NondetWordAutom.scala b/src/dotnet-library/scala/util/automata/NondetWordAutom.scala deleted file mode 100644 index 3cca4d560..000000000 --- a/src/dotnet-library/scala/util/automata/NondetWordAutom.scala +++ /dev/null @@ -1 +0,0 @@ -/* NondetWordAutom.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/SubsetConstruction.scala b/src/dotnet-library/scala/util/automata/SubsetConstruction.scala deleted file mode 100644 index e191ae5a4..000000000 --- a/src/dotnet-library/scala/util/automata/SubsetConstruction.scala +++ /dev/null @@ -1 +0,0 @@ -/* SubsetConstruction.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/automata/WordBerrySethi.scala b/src/dotnet-library/scala/util/automata/WordBerrySethi.scala deleted file mode 100644 index 10372139d..000000000 --- a/src/dotnet-library/scala/util/automata/WordBerrySethi.scala +++ /dev/null @@ -1 +0,0 @@ -/* WordBerrySethi.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/control/Exception.scala b/src/dotnet-library/scala/util/control/Exception.scala deleted file mode 100644 index 06fac0842..000000000 --- a/src/dotnet-library/scala/util/control/Exception.scala +++ /dev/null @@ -1 +0,0 @@ -/* Exception does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/grammar/HedgeRHS.scala b/src/dotnet-library/scala/util/grammar/HedgeRHS.scala deleted file mode 100644 index fc6cb2691..000000000 --- a/src/dotnet-library/scala/util/grammar/HedgeRHS.scala +++ /dev/null @@ -1 +0,0 @@ -/* HedgeRHS.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/grammar/TreeRHS.scala b/src/dotnet-library/scala/util/grammar/TreeRHS.scala deleted file mode 100644 index f23c9bbb3..000000000 --- a/src/dotnet-library/scala/util/grammar/TreeRHS.scala +++ /dev/null @@ -1 +0,0 @@ -/* TreeRHS.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/logging/ConsoleLogger.scala b/src/dotnet-library/scala/util/logging/ConsoleLogger.scala deleted file mode 100644 index 89b792898..000000000 --- a/src/dotnet-library/scala/util/logging/ConsoleLogger.scala +++ /dev/null @@ -1 +0,0 @@ -/* ConsoleLogger.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/logging/Logged.scala b/src/dotnet-library/scala/util/logging/Logged.scala deleted file mode 100644 index 0a893b638..000000000 --- a/src/dotnet-library/scala/util/logging/Logged.scala +++ /dev/null @@ -1 +0,0 @@ -/* Logged.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/matching/Regex.scala b/src/dotnet-library/scala/util/matching/Regex.scala deleted file mode 100644 index f7932dacf..000000000 --- a/src/dotnet-library/scala/util/matching/Regex.scala +++ /dev/null @@ -1 +0,0 @@ -/* Regex does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/ast/AbstractSyntax.scala b/src/dotnet-library/scala/util/parsing/ast/AbstractSyntax.scala deleted file mode 100644 index 4e6e3f96b..000000000 --- a/src/dotnet-library/scala/util/parsing/ast/AbstractSyntax.scala +++ /dev/null @@ -1 +0,0 @@ -/* AbstractSyntax.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/ast/Binders.scala b/src/dotnet-library/scala/util/parsing/ast/Binders.scala deleted file mode 100644 index a6abe6072..000000000 --- a/src/dotnet-library/scala/util/parsing/ast/Binders.scala +++ /dev/null @@ -1 +0,0 @@ -/* Binders does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/ImplicitConversions.scala b/src/dotnet-library/scala/util/parsing/combinator/ImplicitConversions.scala deleted file mode 100644 index a78e9708c..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/ImplicitConversions.scala +++ /dev/null @@ -1 +0,0 @@ -/* ImplicitConversions.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/JavaTokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/JavaTokenParsers.scala deleted file mode 100644 index 9cee82aa2..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/JavaTokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* JavaTokenParsers does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/PackratParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/PackratParsers.scala deleted file mode 100644 index 7e0583404..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/PackratParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* PackratParsers does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/Parsers.scala b/src/dotnet-library/scala/util/parsing/combinator/Parsers.scala deleted file mode 100644 index 55bc2afb2..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/Parsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* Parsers does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/RegexParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/RegexParsers.scala deleted file mode 100644 index ffdd88fde..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/RegexParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* RegexParsers does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/lexical/Lexical.scala b/src/dotnet-library/scala/util/parsing/combinator/lexical/Lexical.scala deleted file mode 100644 index e7a88da1e..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/lexical/Lexical.scala +++ /dev/null @@ -1 +0,0 @@ -/* Lexical.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/lexical/Scanners.scala b/src/dotnet-library/scala/util/parsing/combinator/lexical/Scanners.scala deleted file mode 100644 index e94f8922c..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/lexical/Scanners.scala +++ /dev/null @@ -1 +0,0 @@ -/* Scanners does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/lexical/StdLexical.scala b/src/dotnet-library/scala/util/parsing/combinator/lexical/StdLexical.scala deleted file mode 100644 index a1f7dfb27..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/lexical/StdLexical.scala +++ /dev/null @@ -1 +0,0 @@ -/* StdLexical does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/syntactical/StandardTokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/syntactical/StandardTokenParsers.scala deleted file mode 100644 index bdc7ed127..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/syntactical/StandardTokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* StandardTokenParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/syntactical/StdTokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/syntactical/StdTokenParsers.scala deleted file mode 100644 index e0cdea567..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/syntactical/StdTokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* StdTokenParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/syntactical/TokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinator/syntactical/TokenParsers.scala deleted file mode 100644 index d397632ac..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/syntactical/TokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* TokenParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/testing/RegexTest.scala b/src/dotnet-library/scala/util/parsing/combinator/testing/RegexTest.scala deleted file mode 100644 index bf6b23b24..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/testing/RegexTest.scala +++ /dev/null @@ -1 +0,0 @@ -/* RegexTest does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinator/testing/Tester.scala b/src/dotnet-library/scala/util/parsing/combinator/testing/Tester.scala deleted file mode 100644 index e6b5eee50..000000000 --- a/src/dotnet-library/scala/util/parsing/combinator/testing/Tester.scala +++ /dev/null @@ -1 +0,0 @@ -/* Tester does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/$tilde.scala b/src/dotnet-library/scala/util/parsing/combinatorold/$tilde.scala deleted file mode 100644 index 211cf1c12..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/$tilde.scala +++ /dev/null @@ -1 +0,0 @@ -/* $tilde.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/ImplicitConversions.scala b/src/dotnet-library/scala/util/parsing/combinatorold/ImplicitConversions.scala deleted file mode 100644 index a78e9708c..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/ImplicitConversions.scala +++ /dev/null @@ -1 +0,0 @@ -/* ImplicitConversions.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/Parsers.scala b/src/dotnet-library/scala/util/parsing/combinatorold/Parsers.scala deleted file mode 100644 index cbc25823f..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/Parsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* Parsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Lexical.scala b/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Lexical.scala deleted file mode 100644 index e7a88da1e..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Lexical.scala +++ /dev/null @@ -1 +0,0 @@ -/* Lexical.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Scanners.scala b/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Scanners.scala deleted file mode 100644 index 7c4e5aff4..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/Scanners.scala +++ /dev/null @@ -1 +0,0 @@ -/* Scanners.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/StdLexical.scala b/src/dotnet-library/scala/util/parsing/combinatorold/lexical/StdLexical.scala deleted file mode 100644 index f7501f81e..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/lexical/StdLexical.scala +++ /dev/null @@ -1 +0,0 @@ -/* StdLexical.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/BindingParsers.scala b/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/BindingParsers.scala deleted file mode 100644 index ae51c25c2..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/BindingParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* BindingParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/StdTokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/StdTokenParsers.scala deleted file mode 100644 index e0cdea567..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/StdTokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* StdTokenParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/TokenParsers.scala b/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/TokenParsers.scala deleted file mode 100644 index d397632ac..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/syntactical/TokenParsers.scala +++ /dev/null @@ -1 +0,0 @@ -/* TokenParsers.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/combinatorold/testing/Tester.scala b/src/dotnet-library/scala/util/parsing/combinatorold/testing/Tester.scala deleted file mode 100644 index 3ec0ac719..000000000 --- a/src/dotnet-library/scala/util/parsing/combinatorold/testing/Tester.scala +++ /dev/null @@ -1 +0,0 @@ -/* Tester.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/CharArrayPosition.scala b/src/dotnet-library/scala/util/parsing/input/CharArrayPosition.scala deleted file mode 100644 index 2f14b2076..000000000 --- a/src/dotnet-library/scala/util/parsing/input/CharArrayPosition.scala +++ /dev/null @@ -1 +0,0 @@ -/* CharArrayPosition.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/CharArrayReader.scala b/src/dotnet-library/scala/util/parsing/input/CharArrayReader.scala deleted file mode 100644 index ca456f1e6..000000000 --- a/src/dotnet-library/scala/util/parsing/input/CharArrayReader.scala +++ /dev/null @@ -1 +0,0 @@ -/* CharArrayReader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/CharSequenceReader.scala b/src/dotnet-library/scala/util/parsing/input/CharSequenceReader.scala deleted file mode 100644 index 55889f81c..000000000 --- a/src/dotnet-library/scala/util/parsing/input/CharSequenceReader.scala +++ /dev/null @@ -1 +0,0 @@ -/* CharSequenceReader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/NoPosition.scala b/src/dotnet-library/scala/util/parsing/input/NoPosition.scala deleted file mode 100644 index dcd417fc9..000000000 --- a/src/dotnet-library/scala/util/parsing/input/NoPosition.scala +++ /dev/null @@ -1 +0,0 @@ -/* NoPosition.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/OffsetPosition.scala b/src/dotnet-library/scala/util/parsing/input/OffsetPosition.scala deleted file mode 100644 index ae2f3b651..000000000 --- a/src/dotnet-library/scala/util/parsing/input/OffsetPosition.scala +++ /dev/null @@ -1 +0,0 @@ -/* OffsetPosition.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/PagedSeqReader.scala b/src/dotnet-library/scala/util/parsing/input/PagedSeqReader.scala deleted file mode 100644 index fb2cf874b..000000000 --- a/src/dotnet-library/scala/util/parsing/input/PagedSeqReader.scala +++ /dev/null @@ -1 +0,0 @@ -/* PagedSeqReader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/Position.scala b/src/dotnet-library/scala/util/parsing/input/Position.scala deleted file mode 100644 index 6fd52726e..000000000 --- a/src/dotnet-library/scala/util/parsing/input/Position.scala +++ /dev/null @@ -1 +0,0 @@ -/* Position does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/Positional.scala b/src/dotnet-library/scala/util/parsing/input/Positional.scala deleted file mode 100644 index bc9b50235..000000000 --- a/src/dotnet-library/scala/util/parsing/input/Positional.scala +++ /dev/null @@ -1 +0,0 @@ -/* Positional does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/Reader.scala b/src/dotnet-library/scala/util/parsing/input/Reader.scala deleted file mode 100644 index d75703166..000000000 --- a/src/dotnet-library/scala/util/parsing/input/Reader.scala +++ /dev/null @@ -1 +0,0 @@ -/* Reader does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/input/StreamReader.scala b/src/dotnet-library/scala/util/parsing/input/StreamReader.scala deleted file mode 100644 index 8a88fb72f..000000000 --- a/src/dotnet-library/scala/util/parsing/input/StreamReader.scala +++ /dev/null @@ -1 +0,0 @@ -/* StreamReader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/json/JSON.scala b/src/dotnet-library/scala/util/parsing/json/JSON.scala deleted file mode 100644 index 7246bb41c..000000000 --- a/src/dotnet-library/scala/util/parsing/json/JSON.scala +++ /dev/null @@ -1 +0,0 @@ -/* JSON.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/json/Lexer.scala b/src/dotnet-library/scala/util/parsing/json/Lexer.scala deleted file mode 100644 index 85af9bb7c..000000000 --- a/src/dotnet-library/scala/util/parsing/json/Lexer.scala +++ /dev/null @@ -1 +0,0 @@ -/* Lexer.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/json/Parser.scala b/src/dotnet-library/scala/util/parsing/json/Parser.scala deleted file mode 100644 index 58f876f49..000000000 --- a/src/dotnet-library/scala/util/parsing/json/Parser.scala +++ /dev/null @@ -1 +0,0 @@ -/* Parser.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/syntax/StdTokens.scala b/src/dotnet-library/scala/util/parsing/syntax/StdTokens.scala deleted file mode 100644 index f31fc0170..000000000 --- a/src/dotnet-library/scala/util/parsing/syntax/StdTokens.scala +++ /dev/null @@ -1 +0,0 @@ -/* StdTokens.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/parsing/syntax/Tokens.scala b/src/dotnet-library/scala/util/parsing/syntax/Tokens.scala deleted file mode 100644 index bc97030f4..000000000 --- a/src/dotnet-library/scala/util/parsing/syntax/Tokens.scala +++ /dev/null @@ -1 +0,0 @@ -/* Tokens.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/regexp/Base.scala b/src/dotnet-library/scala/util/regexp/Base.scala deleted file mode 100644 index 41b3e4c57..000000000 --- a/src/dotnet-library/scala/util/regexp/Base.scala +++ /dev/null @@ -1 +0,0 @@ -/* Base.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/regexp/PointedHedgeExp.scala b/src/dotnet-library/scala/util/regexp/PointedHedgeExp.scala deleted file mode 100644 index 558b00e50..000000000 --- a/src/dotnet-library/scala/util/regexp/PointedHedgeExp.scala +++ /dev/null @@ -1 +0,0 @@ -/* PointedHedgeExp.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/regexp/SyntaxError.scala b/src/dotnet-library/scala/util/regexp/SyntaxError.scala deleted file mode 100644 index 7290f2c22..000000000 --- a/src/dotnet-library/scala/util/regexp/SyntaxError.scala +++ /dev/null @@ -1 +0,0 @@ -/* SyntaxError.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/util/regexp/WordExp.scala b/src/dotnet-library/scala/util/regexp/WordExp.scala deleted file mode 100644 index ac9c6e822..000000000 --- a/src/dotnet-library/scala/util/regexp/WordExp.scala +++ /dev/null @@ -1 +0,0 @@ -/* WordExp.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Atom.scala b/src/dotnet-library/scala/xml/Atom.scala deleted file mode 100644 index cb97d6447..000000000 --- a/src/dotnet-library/scala/xml/Atom.scala +++ /dev/null @@ -1 +0,0 @@ -/* Atom.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Attribute.scala b/src/dotnet-library/scala/xml/Attribute.scala deleted file mode 100644 index 7dc776594..000000000 --- a/src/dotnet-library/scala/xml/Attribute.scala +++ /dev/null @@ -1 +0,0 @@ -/* Attribute.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Comment.scala b/src/dotnet-library/scala/xml/Comment.scala deleted file mode 100644 index 3fe49c7bf..000000000 --- a/src/dotnet-library/scala/xml/Comment.scala +++ /dev/null @@ -1 +0,0 @@ -/* Comment.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Document.scala b/src/dotnet-library/scala/xml/Document.scala deleted file mode 100644 index 9a3e44190..000000000 --- a/src/dotnet-library/scala/xml/Document.scala +++ /dev/null @@ -1 +0,0 @@ -/* Document.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Elem.scala b/src/dotnet-library/scala/xml/Elem.scala deleted file mode 100644 index 6f51090eb..000000000 --- a/src/dotnet-library/scala/xml/Elem.scala +++ /dev/null @@ -1 +0,0 @@ -/* Elem.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/EntityRef.scala b/src/dotnet-library/scala/xml/EntityRef.scala deleted file mode 100644 index e179fb9ff..000000000 --- a/src/dotnet-library/scala/xml/EntityRef.scala +++ /dev/null @@ -1 +0,0 @@ -/* EntityRef.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Group.scala b/src/dotnet-library/scala/xml/Group.scala deleted file mode 100644 index 3a713746c..000000000 --- a/src/dotnet-library/scala/xml/Group.scala +++ /dev/null @@ -1 +0,0 @@ -/* Group.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/HasKeyValue.scala b/src/dotnet-library/scala/xml/HasKeyValue.scala deleted file mode 100644 index 31b53bfb7..000000000 --- a/src/dotnet-library/scala/xml/HasKeyValue.scala +++ /dev/null @@ -1 +0,0 @@ -/* HasKeyValue.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/MalformedAttributeException.scala b/src/dotnet-library/scala/xml/MalformedAttributeException.scala deleted file mode 100644 index 4fea0996d..000000000 --- a/src/dotnet-library/scala/xml/MalformedAttributeException.scala +++ /dev/null @@ -1 +0,0 @@ -/* MalformedAttributeException.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/MetaData.scala b/src/dotnet-library/scala/xml/MetaData.scala deleted file mode 100644 index 16ba9b09d..000000000 --- a/src/dotnet-library/scala/xml/MetaData.scala +++ /dev/null @@ -1 +0,0 @@ -/* MetaData.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/NamespaceBinding.scala b/src/dotnet-library/scala/xml/NamespaceBinding.scala deleted file mode 100644 index 6fa1309a7..000000000 --- a/src/dotnet-library/scala/xml/NamespaceBinding.scala +++ /dev/null @@ -1 +0,0 @@ -/* NamespaceBinding.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Node.scala b/src/dotnet-library/scala/xml/Node.scala deleted file mode 100644 index a4fda4317..000000000 --- a/src/dotnet-library/scala/xml/Node.scala +++ /dev/null @@ -1 +0,0 @@ -/* Node.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/NodeBuffer.scala b/src/dotnet-library/scala/xml/NodeBuffer.scala deleted file mode 100644 index 37bed04b0..000000000 --- a/src/dotnet-library/scala/xml/NodeBuffer.scala +++ /dev/null @@ -1 +0,0 @@ -/* NodeBuffer.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/NodeSeq.scala b/src/dotnet-library/scala/xml/NodeSeq.scala deleted file mode 100644 index b7a6371a1..000000000 --- a/src/dotnet-library/scala/xml/NodeSeq.scala +++ /dev/null @@ -1 +0,0 @@ -/* NodeSeq.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Null.scala b/src/dotnet-library/scala/xml/Null.scala deleted file mode 100644 index 42f17eead..000000000 --- a/src/dotnet-library/scala/xml/Null.scala +++ /dev/null @@ -1 +0,0 @@ -/* Null.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/PCData.scala b/src/dotnet-library/scala/xml/PCData.scala deleted file mode 100644 index 185b016ab..000000000 --- a/src/dotnet-library/scala/xml/PCData.scala +++ /dev/null @@ -1 +0,0 @@ -/* PCData.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/PrefixedAttribute.scala b/src/dotnet-library/scala/xml/PrefixedAttribute.scala deleted file mode 100644 index a01eee764..000000000 --- a/src/dotnet-library/scala/xml/PrefixedAttribute.scala +++ /dev/null @@ -1 +0,0 @@ -/* PrefixedAttribute.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/PrettyPrinter.scala b/src/dotnet-library/scala/xml/PrettyPrinter.scala deleted file mode 100644 index c45630bbd..000000000 --- a/src/dotnet-library/scala/xml/PrettyPrinter.scala +++ /dev/null @@ -1 +0,0 @@ -/* PrettyPrinter.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/ProcInstr.scala b/src/dotnet-library/scala/xml/ProcInstr.scala deleted file mode 100644 index c3f6874fd..000000000 --- a/src/dotnet-library/scala/xml/ProcInstr.scala +++ /dev/null @@ -1 +0,0 @@ -/* ProcInstr.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/QNode.scala b/src/dotnet-library/scala/xml/QNode.scala deleted file mode 100644 index 29f02749f..000000000 --- a/src/dotnet-library/scala/xml/QNode.scala +++ /dev/null @@ -1 +0,0 @@ -/* QNode.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/SpecialNode.scala b/src/dotnet-library/scala/xml/SpecialNode.scala deleted file mode 100644 index 857a02fd0..000000000 --- a/src/dotnet-library/scala/xml/SpecialNode.scala +++ /dev/null @@ -1 +0,0 @@ -/* SpecialNode.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Text.scala b/src/dotnet-library/scala/xml/Text.scala deleted file mode 100644 index 9b23f6478..000000000 --- a/src/dotnet-library/scala/xml/Text.scala +++ /dev/null @@ -1 +0,0 @@ -/* Text.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/TextBuffer.scala b/src/dotnet-library/scala/xml/TextBuffer.scala deleted file mode 100644 index 3a97bc1f6..000000000 --- a/src/dotnet-library/scala/xml/TextBuffer.scala +++ /dev/null @@ -1 +0,0 @@ -/* TextBuffer.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/TopScope.scala b/src/dotnet-library/scala/xml/TopScope.scala deleted file mode 100644 index bcc4491eb..000000000 --- a/src/dotnet-library/scala/xml/TopScope.scala +++ /dev/null @@ -1 +0,0 @@ -/* TopScope.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/TypeSymbol.scala b/src/dotnet-library/scala/xml/TypeSymbol.scala deleted file mode 100644 index d300f74b9..000000000 --- a/src/dotnet-library/scala/xml/TypeSymbol.scala +++ /dev/null @@ -1 +0,0 @@ -/* TypeSymbol.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Unparsed.scala b/src/dotnet-library/scala/xml/Unparsed.scala deleted file mode 100644 index 2a0d68b69..000000000 --- a/src/dotnet-library/scala/xml/Unparsed.scala +++ /dev/null @@ -1 +0,0 @@ -/* Unparsed.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/UnprefixedAttribute.scala b/src/dotnet-library/scala/xml/UnprefixedAttribute.scala deleted file mode 100644 index bb959f7c5..000000000 --- a/src/dotnet-library/scala/xml/UnprefixedAttribute.scala +++ /dev/null @@ -1 +0,0 @@ -/* UnprefixedAttribute.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Utility.scala b/src/dotnet-library/scala/xml/Utility.scala deleted file mode 100644 index 874a96b58..000000000 --- a/src/dotnet-library/scala/xml/Utility.scala +++ /dev/null @@ -1 +0,0 @@ -/* Utility.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/XML.scala b/src/dotnet-library/scala/xml/XML.scala deleted file mode 100644 index 4333bf101..000000000 --- a/src/dotnet-library/scala/xml/XML.scala +++ /dev/null @@ -1 +0,0 @@ -/* XML.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/Xhtml.scala b/src/dotnet-library/scala/xml/Xhtml.scala deleted file mode 100644 index d55d9b4f8..000000000 --- a/src/dotnet-library/scala/xml/Xhtml.scala +++ /dev/null @@ -1 +0,0 @@ -/* Xhtml.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/ContentModel.scala b/src/dotnet-library/scala/xml/dtd/ContentModel.scala deleted file mode 100644 index 896ffb7e1..000000000 --- a/src/dotnet-library/scala/xml/dtd/ContentModel.scala +++ /dev/null @@ -1 +0,0 @@ -/* ContentModel.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/ContentModelParser.scala b/src/dotnet-library/scala/xml/dtd/ContentModelParser.scala deleted file mode 100644 index 861437933..000000000 --- a/src/dotnet-library/scala/xml/dtd/ContentModelParser.scala +++ /dev/null @@ -1 +0,0 @@ -/* ContentModelParser.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/DTD.scala b/src/dotnet-library/scala/xml/dtd/DTD.scala deleted file mode 100644 index 77f57a0b5..000000000 --- a/src/dotnet-library/scala/xml/dtd/DTD.scala +++ /dev/null @@ -1 +0,0 @@ -/* DTD.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/Decl.scala b/src/dotnet-library/scala/xml/dtd/Decl.scala deleted file mode 100644 index 3cd79e8ce..000000000 --- a/src/dotnet-library/scala/xml/dtd/Decl.scala +++ /dev/null @@ -1 +0,0 @@ -/* Decl.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/DocType.scala b/src/dotnet-library/scala/xml/dtd/DocType.scala deleted file mode 100644 index bd7208f18..000000000 --- a/src/dotnet-library/scala/xml/dtd/DocType.scala +++ /dev/null @@ -1 +0,0 @@ -/* DocType.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/ElementValidator.scala b/src/dotnet-library/scala/xml/dtd/ElementValidator.scala deleted file mode 100644 index 25a2c90ba..000000000 --- a/src/dotnet-library/scala/xml/dtd/ElementValidator.scala +++ /dev/null @@ -1 +0,0 @@ -/* ElementValidator.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/ExternalID.scala b/src/dotnet-library/scala/xml/dtd/ExternalID.scala deleted file mode 100644 index f6bc2f88f..000000000 --- a/src/dotnet-library/scala/xml/dtd/ExternalID.scala +++ /dev/null @@ -1 +0,0 @@ -/* ExternalID.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/Scanner.scala b/src/dotnet-library/scala/xml/dtd/Scanner.scala deleted file mode 100644 index 8c7a3d9ca..000000000 --- a/src/dotnet-library/scala/xml/dtd/Scanner.scala +++ /dev/null @@ -1 +0,0 @@ -/* Scanner.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/Tokens.scala b/src/dotnet-library/scala/xml/dtd/Tokens.scala deleted file mode 100644 index bc97030f4..000000000 --- a/src/dotnet-library/scala/xml/dtd/Tokens.scala +++ /dev/null @@ -1 +0,0 @@ -/* Tokens.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/dtd/ValidationException.scala b/src/dotnet-library/scala/xml/dtd/ValidationException.scala deleted file mode 100644 index da821bfa5..000000000 --- a/src/dotnet-library/scala/xml/dtd/ValidationException.scala +++ /dev/null @@ -1 +0,0 @@ -/* ValidationException.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/factory/Binder.scala b/src/dotnet-library/scala/xml/factory/Binder.scala deleted file mode 100644 index 63ac8b6de..000000000 --- a/src/dotnet-library/scala/xml/factory/Binder.scala +++ /dev/null @@ -1 +0,0 @@ -/* Binder.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/factory/LoggedNodeFactory.scala b/src/dotnet-library/scala/xml/factory/LoggedNodeFactory.scala deleted file mode 100644 index 5b892a296..000000000 --- a/src/dotnet-library/scala/xml/factory/LoggedNodeFactory.scala +++ /dev/null @@ -1 +0,0 @@ -/* LoggedNodeFactory.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/factory/NodeFactory.scala b/src/dotnet-library/scala/xml/factory/NodeFactory.scala deleted file mode 100644 index 4099f3590..000000000 --- a/src/dotnet-library/scala/xml/factory/NodeFactory.scala +++ /dev/null @@ -1 +0,0 @@ -/* NodeFactory.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/factory/XMLLoader.scala b/src/dotnet-library/scala/xml/factory/XMLLoader.scala deleted file mode 100644 index f2df87af0..000000000 --- a/src/dotnet-library/scala/xml/factory/XMLLoader.scala +++ /dev/null @@ -1 +0,0 @@ -/* XMLLoader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/CircularIncludeException.scala b/src/dotnet-library/scala/xml/include/CircularIncludeException.scala deleted file mode 100644 index e69534189..000000000 --- a/src/dotnet-library/scala/xml/include/CircularIncludeException.scala +++ /dev/null @@ -1 +0,0 @@ -/* CircularIncludeException.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/UnavailableResourceException.scala b/src/dotnet-library/scala/xml/include/UnavailableResourceException.scala deleted file mode 100644 index 3231e7853..000000000 --- a/src/dotnet-library/scala/xml/include/UnavailableResourceException.scala +++ /dev/null @@ -1 +0,0 @@ -/* UnavailableResourceException.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/XIncludeException.scala b/src/dotnet-library/scala/xml/include/XIncludeException.scala deleted file mode 100644 index 95ea69af3..000000000 --- a/src/dotnet-library/scala/xml/include/XIncludeException.scala +++ /dev/null @@ -1 +0,0 @@ -/* XIncludeException.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/sax/EncodingHeuristics.scala b/src/dotnet-library/scala/xml/include/sax/EncodingHeuristics.scala deleted file mode 100644 index 45f039699..000000000 --- a/src/dotnet-library/scala/xml/include/sax/EncodingHeuristics.scala +++ /dev/null @@ -1 +0,0 @@ -/* EncodingHeuristics.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/sax/Main.scala b/src/dotnet-library/scala/xml/include/sax/Main.scala deleted file mode 100644 index dddf29062..000000000 --- a/src/dotnet-library/scala/xml/include/sax/Main.scala +++ /dev/null @@ -1 +0,0 @@ -/* Main.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/sax/XIncludeFilter.scala b/src/dotnet-library/scala/xml/include/sax/XIncludeFilter.scala deleted file mode 100644 index 3a8fc4c49..000000000 --- a/src/dotnet-library/scala/xml/include/sax/XIncludeFilter.scala +++ /dev/null @@ -1 +0,0 @@ -/* XIncludeFilter.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/include/sax/XIncluder.scala b/src/dotnet-library/scala/xml/include/sax/XIncluder.scala deleted file mode 100644 index 344af7f5f..000000000 --- a/src/dotnet-library/scala/xml/include/sax/XIncluder.scala +++ /dev/null @@ -1 +0,0 @@ -/* XIncluder.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/ConstructingHandler.scala b/src/dotnet-library/scala/xml/parsing/ConstructingHandler.scala deleted file mode 100644 index 51fddef42..000000000 --- a/src/dotnet-library/scala/xml/parsing/ConstructingHandler.scala +++ /dev/null @@ -1 +0,0 @@ -/* ConstructingHandler.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/ConstructingParser.scala b/src/dotnet-library/scala/xml/parsing/ConstructingParser.scala deleted file mode 100644 index 27812a122..000000000 --- a/src/dotnet-library/scala/xml/parsing/ConstructingParser.scala +++ /dev/null @@ -1 +0,0 @@ -/* ConstructingParser.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/DefaultMarkupHandler.scala b/src/dotnet-library/scala/xml/parsing/DefaultMarkupHandler.scala deleted file mode 100644 index 2f653316b..000000000 --- a/src/dotnet-library/scala/xml/parsing/DefaultMarkupHandler.scala +++ /dev/null @@ -1 +0,0 @@ -/* DefaultMarkupHandler.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/ExternalSources.scala b/src/dotnet-library/scala/xml/parsing/ExternalSources.scala deleted file mode 100644 index 22f23c2ba..000000000 --- a/src/dotnet-library/scala/xml/parsing/ExternalSources.scala +++ /dev/null @@ -1 +0,0 @@ -/* ExternalSources.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/FactoryAdapter.scala b/src/dotnet-library/scala/xml/parsing/FactoryAdapter.scala deleted file mode 100644 index 98903721c..000000000 --- a/src/dotnet-library/scala/xml/parsing/FactoryAdapter.scala +++ /dev/null @@ -1 +0,0 @@ -/* FactoryAdapter.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/FatalError.scala b/src/dotnet-library/scala/xml/parsing/FatalError.scala deleted file mode 100644 index 169ace5c7..000000000 --- a/src/dotnet-library/scala/xml/parsing/FatalError.scala +++ /dev/null @@ -1 +0,0 @@ -/* FatalError.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/MarkupHandler.scala b/src/dotnet-library/scala/xml/parsing/MarkupHandler.scala deleted file mode 100644 index a43b7375e..000000000 --- a/src/dotnet-library/scala/xml/parsing/MarkupHandler.scala +++ /dev/null @@ -1 +0,0 @@ -/* MarkupHandler.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/MarkupParser.scala b/src/dotnet-library/scala/xml/parsing/MarkupParser.scala deleted file mode 100644 index c44810047..000000000 --- a/src/dotnet-library/scala/xml/parsing/MarkupParser.scala +++ /dev/null @@ -1 +0,0 @@ -/* MarkupParser.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/NoBindingFactoryAdapter.scala b/src/dotnet-library/scala/xml/parsing/NoBindingFactoryAdapter.scala deleted file mode 100644 index fea1cd770..000000000 --- a/src/dotnet-library/scala/xml/parsing/NoBindingFactoryAdapter.scala +++ /dev/null @@ -1 +0,0 @@ -/* NoBindingFactoryAdapter.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/TokenTests.scala b/src/dotnet-library/scala/xml/parsing/TokenTests.scala deleted file mode 100644 index 78d0e5d87..000000000 --- a/src/dotnet-library/scala/xml/parsing/TokenTests.scala +++ /dev/null @@ -1 +0,0 @@ -/* TokenTests.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/ValidatingMarkupHandler.scala b/src/dotnet-library/scala/xml/parsing/ValidatingMarkupHandler.scala deleted file mode 100644 index 8504b266f..000000000 --- a/src/dotnet-library/scala/xml/parsing/ValidatingMarkupHandler.scala +++ /dev/null @@ -1 +0,0 @@ -/* ValidatingMarkupHandler.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/XhtmlEntities.scala b/src/dotnet-library/scala/xml/parsing/XhtmlEntities.scala deleted file mode 100644 index 88ae29805..000000000 --- a/src/dotnet-library/scala/xml/parsing/XhtmlEntities.scala +++ /dev/null @@ -1 +0,0 @@ -/* XhtmlEntities.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/parsing/XhtmlParser.scala b/src/dotnet-library/scala/xml/parsing/XhtmlParser.scala deleted file mode 100644 index 7d3678059..000000000 --- a/src/dotnet-library/scala/xml/parsing/XhtmlParser.scala +++ /dev/null @@ -1 +0,0 @@ -/* XhtmlParser.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/persistent/CachedFileStorage.scala b/src/dotnet-library/scala/xml/persistent/CachedFileStorage.scala deleted file mode 100644 index 4c063609a..000000000 --- a/src/dotnet-library/scala/xml/persistent/CachedFileStorage.scala +++ /dev/null @@ -1 +0,0 @@ -/* CachedFileStorage.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/persistent/Index.scala b/src/dotnet-library/scala/xml/persistent/Index.scala deleted file mode 100644 index 4ac129d78..000000000 --- a/src/dotnet-library/scala/xml/persistent/Index.scala +++ /dev/null @@ -1 +0,0 @@ -/* Index.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/persistent/SetStorage.scala b/src/dotnet-library/scala/xml/persistent/SetStorage.scala deleted file mode 100644 index e96e8efbb..000000000 --- a/src/dotnet-library/scala/xml/persistent/SetStorage.scala +++ /dev/null @@ -1 +0,0 @@ -/* SetStorage.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/pull/XMLEvent.scala b/src/dotnet-library/scala/xml/pull/XMLEvent.scala deleted file mode 100644 index b862ecccf..000000000 --- a/src/dotnet-library/scala/xml/pull/XMLEvent.scala +++ /dev/null @@ -1 +0,0 @@ -/* XMLEvent.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/pull/XMLEventReader.scala b/src/dotnet-library/scala/xml/pull/XMLEventReader.scala deleted file mode 100644 index c7ab411e1..000000000 --- a/src/dotnet-library/scala/xml/pull/XMLEventReader.scala +++ /dev/null @@ -1 +0,0 @@ -/* XMLEventReader.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/transform/BasicTransformer.scala b/src/dotnet-library/scala/xml/transform/BasicTransformer.scala deleted file mode 100644 index 91da6cd89..000000000 --- a/src/dotnet-library/scala/xml/transform/BasicTransformer.scala +++ /dev/null @@ -1 +0,0 @@ -/* BasicTransformer.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/transform/RewriteRule.scala b/src/dotnet-library/scala/xml/transform/RewriteRule.scala deleted file mode 100644 index 5669343e4..000000000 --- a/src/dotnet-library/scala/xml/transform/RewriteRule.scala +++ /dev/null @@ -1 +0,0 @@ -/* RewriteRule.scala does not exist for the dotnet target */ diff --git a/src/dotnet-library/scala/xml/transform/RuleTransformer.scala b/src/dotnet-library/scala/xml/transform/RuleTransformer.scala deleted file mode 100644 index 9793a35be..000000000 --- a/src/dotnet-library/scala/xml/transform/RuleTransformer.scala +++ /dev/null @@ -1 +0,0 @@ -/* RuleTransformer.scala does not exist for the dotnet target */ diff --git a/src/mono/bin/scala-net b/src/mono/bin/scala-net deleted file mode 100755 index 2058a2d95..000000000 --- a/src/mono/bin/scala-net +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/sh - -############################################################################## -# @NAME@ @VERSION@ -############################################################################## -# @COPYRIGHT@ -# -# This is free software; see the distribution for copying conditions. -# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. -############################################################################## - -cygwin=false; -darwin=false; -case "`uname`" in - CYGWIN*) cygwin=true ;; - Darwin*) darwin=true ;; -esac - -# Finding the root folder for this Scala distribution -SOURCE=$0; -SCRIPT=`basename "$SOURCE"`; -while [ -h "$SOURCE" ]; do - SCRIPT=`basename "$SOURCE"`; - LOOKUP=`ls -ld "$SOURCE"`; - TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; - if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then - SOURCE=${TARGET:-.}; - else - SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; - fi; -done; - -# see #2092 -SCALA_HOME=`dirname "$SOURCE"` -SCALA_HOME=`cd "$SCALA_HOME"; pwd -P` -SCALA_HOME=`cd "$SCALA_HOME"/..; pwd` - -if $cygwin; then - SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"` - SCALA_HOME=`cygpath --unix "$SCALA_HOME"` -fi - -if [ ! -x "$MONO" ] ; then - if [ -d "$MONO_HOME" ] ; then - MONO="$MONO_HOME/bin/mono" - else - MONO="mono" - fi -fi - -MSIL_LIBPATH="$SCALA_HOME/lib" -[ -z "$MONO_PATH" ] || MSIL_LIBPATH="$MSIL_LIBPATH:$MONO_PATH" - -if $cygwin; then - if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then - format=mixed - else - format=windows - fi - MSIL_LIBPATH=`cygpath --path --$format "$MSIL_LIBPATH"` -fi - -env MONO_PATH="$MSIL_LIBPATH" $MONO "$@" diff --git a/src/mono/bin/scala-net.bat b/src/mono/bin/scala-net.bat deleted file mode 100755 index 8018f1cb1..000000000 --- a/src/mono/bin/scala-net.bat +++ /dev/null @@ -1,81 +0,0 @@ -@echo off - -rem ########################################################################## -rem # @NAME@ @VERSION@ -rem ########################################################################## -rem # @COPYRIGHT@ -rem # -rem # This is free software; see the distribution for copying conditions. -rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -rem # PARTICULAR PURPOSE. -rem ########################################################################## - -rem We adopt the following conventions: -rem - System/user environment variables start with a letter -rem - Local batch variables start with an underscore ('_') - -if "%OS%"=="Windows_NT" ( - @setlocal - call :set_home - set _ARGS=%* -) else ( - set _SCALA_HOME=%SCALA_HOME% - rem The following line tests SCALA_HOME instead of _SCALA_HOME, because - rem the above change to _SCALA_HOME is not visible within this block. - if "%SCALA_HOME%"=="" goto error1 - call :set_args -) - -rem We use the value of the MONO environment variable if defined -set _MONO=%MONO% -if "%_MONO%"=="" ( - if exist "%MONO_HOME%" ( - set _MONO=%MONO_HOME%\bin\mono.exe - ) else ( - call :find_mono mono.exe - ) -) - -set _MSIL_LIBPATH=%_SCALA_HOME%\lib -if not "%MONO_PATH%"=="" ( - set _MSIL_LIBPATH=%_MSIL_LIBPATH%;%MONO_PATH% -) - -set MONO_PATH=%_MSIL_LIBPATH% -%_MONO% %_ARGS% -goto end - -rem ########################################################################## -rem # subroutines - -rem Variable "%~dps0" works on WinXP SP2 or newer -rem (see http://support.microsoft.com/?kbid=833431) -rem set _SCALA_HOME=%~dps0.. -:set_home - set _BIN_DIR= - for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi - set _SCALA_HOME=%_BIN_DIR%.. -goto :eof - -:find_mono - set _MONO=%~$PATH:1 -goto :eof - -:set_args - set _ARGS= - :loop - rem Argument %1 may contain quotes so we use parentheses here - if (%1)==() goto :eof - set _ARGS=%_ARGS% %1 - shift - goto loop - -rem ########################################################################## -rem # errors - -:error1 -echo ERROR: environment variable SCALA_HOME is undefined. It should point to your installation directory. -goto end - -:end -if "%OS%"=="Windows_NT" @endlocal diff --git a/src/mono/bin/scalac-net b/src/mono/bin/scalac-net deleted file mode 100755 index 5b77cf753..000000000 --- a/src/mono/bin/scalac-net +++ /dev/null @@ -1,90 +0,0 @@ -#!/bin/sh - -############################################################################## -# @NAME@ @VERSION@ -############################################################################## -# @COPYRIGHT@ -# -# This is free software; see the distribution for copying conditions. -# There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -# PARTICULAR PURPOSE. -############################################################################## - -cygwin=false; -darwin=false; -case "`uname`" in - CYGWIN*) cygwin=true ;; - Darwin*) darwin=true ;; -esac - -# Finding the root folder for this Scala distribution -SOURCE=$0; -SCRIPT=`basename "$SOURCE"`; -while [ -h "$SOURCE" ]; do - SCRIPT=`basename "$SOURCE"`; - LOOKUP=`ls -ld "$SOURCE"`; - TARGET=`expr "$LOOKUP" : '.*-> \(.*\)$'`; - if expr "${TARGET:-.}/" : '/.*/$' > /dev/null; then - SOURCE=${TARGET:-.}; - else - SOURCE=`dirname "$SOURCE"`/${TARGET:-.}; - fi; -done; - -# see #2092 -SCALA_HOME=`dirname "$SOURCE"` -SCALA_HOME=`cd "$SCALA_HOME"; pwd -P` -SCALA_HOME=`cd "$SCALA_HOME"/..; pwd` - -if $cygwin; then - SCALA_HOME=`cygpath --windows --short-name "$SCALA_HOME"` - SCALA_HOME=`cygpath --unix "$SCALA_HOME"` -fi - -# Constructing the extension classpath -EXTENSION_CLASSPATH="" -if [ -z "$EXTENSION_CLASSPATH" ] ; then - for ext in "$SCALA_HOME"/lib/* ; do - if [ -z "$EXTENSION_CLASSPATH" ] ; then - EXTENSION_CLASSPATH="$ext" - else - EXTENSION_CLASSPATH="$EXTENSION_CLASSPATH:$ext" - fi - done -fi - -# Setting the boot class-path to be the standard library (either as a JAR or a folder) -BOOT_CLASSPATH="" -if [ -z "$BOOT_CLASSPATH" ] ; then - if [ -f "$SCALA_HOME/lib/scala-library.jar" ] ; then - BOOT_CLASSPATH="$SCALA_HOME/lib/scala-library.jar" - elif [ -d "$SCALA_HOME/lib/library" ] ; then - BOOT_CLASSPATH="$SCALA_HOME/lib/library" - fi -fi - -if [ ! -x "$ILASM" ] ; then - if [ -d "$MONO_HOME" ] ; then - ILASM="$MONO_HOME/bin/ilasm" - else - ILASM="ilasm" - fi -fi - -MSIL_LIBPATH="$SCALA_HOME/lib/predef.dll:$SCALA_HOME/lib/scalaruntime.dll:$SCALA_HOME/lib/mscorlib.dll" -[ -z "$MONO_PATH" ] || MSIL_LIBPATH="$MSIL_LIBPATH:$MONO_PATH" - -if $cygwin; then - if [ "$OS" = "Windows_NT" ] && cygpath -m .>/dev/null 2>/dev/null ; then - format=mixed - else - format=windows - fi - SCALA_HOME=`cygpath --$format "$SCALA_HOME"` - EXTENSION_CLASSPATH=`cygpath --path --$format "$EXTENSION_CLASSPATH"` - BOOT_CLASSPATH=`cygpath --path --$format "$BOOT_CLASSPATH"` - MSIL_LIBPATH=`cygpath --path --$format "$MSIL_LIBPATH"` - ILASM=`cygpath --$format "$COMSPEC"`" /C "`cygpath --windows "$ILASM"` -fi - -${JAVACMD:=java} ${JAVA_OPTS:=-Xmx256M -Xms16M} -Xbootclasspath/a:"$BOOT_CLASSPATH" -cp "$EXTENSION_CLASSPATH" -Dscala.home="$SCALA_HOME" -Denv.classpath="$CLASSPATH" -Dmsil.libpath="$MSIL_LIBPATH" -Dmsil.ilasm="$ILASM" scala.tools.nsc.Main -target:msil "$@" diff --git a/src/mono/bin/scalac-net.bat b/src/mono/bin/scalac-net.bat deleted file mode 100755 index bd4ddc352..000000000 --- a/src/mono/bin/scalac-net.bat +++ /dev/null @@ -1,116 +0,0 @@ -@echo off - -rem ########################################################################## -rem # @NAME@ @VERSION@ -rem ########################################################################## -rem # @COPYRIGHT@ -rem # -rem # This is free software; see the distribution for copying conditions. -rem # There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A -rem # PARTICULAR PURPOSE. -rem ########################################################################## - -rem We adopt the following conventions: -rem - System/user environment variables start with a letter -rem - Local batch variables start with an underscore ('_') - -if "%OS%"=="Windows_NT" ( - @setlocal - call :set_home - set _ARGS=%* -) else ( - set _SCALA_HOME=%SCALA_HOME% - rem The following line tests SCALA_HOME instead of _SCALA_HOME, because - rem the above change to _SCALA_HOME is not visible within this block. - if "%SCALA_HOME%"=="" goto error1 - call :set_args -) - -rem We use the value of the JAVACMD environment variable if defined -set _JAVACMD=%JAVACMD% -if "%_JAVACMD%"=="" set _JAVACMD=java - -rem We use the value of the JAVA_OPTS environment variable if defined -set _JAVA_OPTS=%JAVA_OPTS% -if "%_JAVA_OPTS%"=="" set _JAVA_OPTS=-Xmx256M -Xms16M - -set _EXTENSION_CLASSPATH= -if "%_EXTENSION_CLASSPATH%"=="" ( - for %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f" - if "%OS%"=="Windows_NT" ( - for /d %%f in ("%_SCALA_HOME%\lib\*") do call :add_cpath "%%f" - ) -) - -set _BOOT_CLASSPATH= -if "%_BOOT_CLASSPATH%"=="" ( - if exist "%_SCALA_HOME%\lib\scala-library.jar" ( - set _BOOT_CLASSPATH=%_SCALA_HOME%\lib\scala-library.jar - ) - if exist "%_SCALA_HOME%\lib\library" ( - set _BOOT_CLASSPATH=%_SCALA_HOME%\lib\library - ) -) - -rem We use the value of the ILASM environment variable if defined -set _ILASM=%ILASM% -if "%_ILASM%"=="" ( - if exist "%MONO_HOME%" ( - set _ILASM=%MONO_HOME%\bin\ilasm.bat - ) else ( - call :find_ilasm ilasm.exe - ) -) - -set _MSIL_LIBPATH=%_SCALA_HOME%\lib\predef.dll;%_SCALA_HOME%\lib\scalaruntime.dll;%_SCALA_HOME%\lib\mscorlib.dll -if not "%MONO_PATH%"=="" ( - set _MSIL_LIBPATH=%_MSIL_LIBPATH%;%MONO_PATH% -) - -set _PROPS=-Dscala.home="%_SCALA_HOME%" -Denv.classpath="%CLASSPATH%" -Dmsil.libpath="%_MSIL_LIBPATH%" -Dmsil.ilasm="%_ILASM%" - -%_JAVACMD% -Xbootclasspath/a:"%_BOOT_CLASSPATH%" %_JAVA_OPTS% %_PROPS% -cp "%_EXTENSION_CLASSPATH%" scala.tools.nsc.Main -target:msil %_ARGS% -goto end - -rem ########################################################################## -rem # subroutines - -:add_cpath - if "%_EXTENSION_CLASSPATH%"=="" ( - set _EXTENSION_CLASSPATH=%~1 - ) else ( - set _EXTENSION_CLASSPATH=%_EXTENSION_CLASSPATH%;%~1 - ) -goto :eof - -rem Variable "%~dps0" works on WinXP SP2 or newer -rem (see http://support.microsoft.com/?kbid=833431) -rem set _SCALA_HOME=%~dps0.. -:set_home - set _BIN_DIR= - for %%i in (%~sf0) do set _BIN_DIR=%_BIN_DIR%%%~dpsi - set _SCALA_HOME=%_BIN_DIR%.. -goto :eof - -:find_ilasm - set _ILASM=%~$PATH:1 -goto :eof - -:set_args - set _ARGS= - :loop - rem Argument %1 may contain quotes so we use parentheses here - if (%1)==() goto :eof - set _ARGS=%_ARGS% %1 - shift - goto loop - -rem ########################################################################## -rem # errors - -:error1 -echo ERROR: environment variable SCALA_HOME is undefined. It should point to your installation directory. -goto end - -:end -if "%OS%"=="Windows_NT" @endlocal