accomodate scala-2.11.0: evade somewhat erratic fix of ImmutableSetFactory in Scala/bfa70315d72d;
--- a/src/Pure/General/linear_set.scala Tue Apr 22 12:41:34 2014 +0200
+++ b/src/Pure/General/linear_set.scala Tue Apr 22 22:15:44 2014 +0200
@@ -10,16 +10,18 @@
import scala.collection.SetLike
-import scala.collection.generic.{ImmutableSetFactory, CanBuildFrom,
- GenericSetTemplate, GenericCompanion}
+import scala.collection.generic.{SetFactory, CanBuildFrom, GenericSetTemplate, GenericCompanion}
+import scala.collection.mutable.{Builder, SetBuilder}
+import scala.language.higherKinds
-object Linear_Set extends ImmutableSetFactory[Linear_Set]
+object Linear_Set extends SetFactory[Linear_Set]
{
private val empty_val: Linear_Set[Nothing] = new Linear_Set[Nothing](None, None, Map(), Map())
override def empty[A] = empty_val.asInstanceOf[Linear_Set[A]]
implicit def canBuildFrom[A]: CanBuildFrom[Coll, A, Linear_Set[A]] = setCanBuildFrom[A]
+ def newBuilder[A]: Builder[A, Linear_Set[A]] = new SetBuilder[A, Linear_Set[A]](empty[A])
class Duplicate[A](x: A) extends Exception
class Undefined[A](x: A) extends Exception