Permalink
Browse files

Moved a bunch of classes into the newly created...

Moved a bunch of classes into the newly created scala.math package.
Created compatibility aliases in the scala package object.
  • Loading branch information...
1 parent decbd55 commit abd87fb19d4bb7376541e19380acf9c2ec24cf49 @paulp paulp committed Nov 6, 2009
@@ -8,7 +8,7 @@
// $Id$
-package scala
+package scala.math
import java.{ lang => jl }
import java.math.{ MathContext, BigDecimal => BigDec }
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
import java.math.BigInteger
import java.{ lang => jl }
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/** <p>
* A trait for representing equivalence relations. It is important to
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/**
* @since 2.8
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/**
* @since 2.8
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/**
* @since 2.8
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/** A trait for totally ordered data.
*
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
import java.util.Comparator
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/** <p>
* A trait for representing partial orderings. It is important to
@@ -9,7 +9,7 @@
// $Id$
-package scala
+package scala.math
/** A class for partially ordered data.
*
@@ -49,6 +49,30 @@ package object scala {
type Range = scala.collection.immutable.Range
val Range = scala.collection.immutable.Range
+ // Numeric types which were moved into scala.math.*
+
+ type BigDecimal = scala.math.BigDecimal
+ val BigDecimal = scala.math.BigDecimal
+
+ type BigInt = scala.math.BigInt
+ val BigInt = scala.math.BigInt
+
+ type Equiv[T] = scala.math.Equiv[T]
+ type Fractional[T] = scala.math.Fractional[T]
+ type Integral[T] = scala.math.Integral[T]
+
+ type Numeric[T] = scala.math.Numeric[T]
+ val Numeric = scala.math.Numeric
+
+ type Ordered[T] = scala.math.Ordered[T]
+ val Ordered = scala.math.Ordered
+
+ type Ordering[T] = scala.math.Ordering[T]
+ val Ordering = scala.math.Ordering
+
+ type PartialOrdering[T] = scala.math.PartialOrdering[T]
+ type PartiallyOrdered[T] = scala.math.PartiallyOrdered[T]
+
@deprecated("use Iterable instead") type Collection[+A] = Iterable[A]
@deprecated("use Iterable instead") val Collection = Iterable

0 comments on commit abd87fb

Please sign in to comment.