summaryrefslogtreecommitdiff
path: root/test/pending/run
diff options
context:
space:
mode:
authorDen Shabalin <den.shabalin@gmail.com>2013-11-13 15:33:33 +0100
committerDen Shabalin <den.shabalin@gmail.com>2013-11-20 16:06:30 +0100
commitb004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (patch)
tree0c31f83d2e039db4c2ead7a3280aaabc78671333 /test/pending/run
parentc243435f113615b2f7407fbd683c93ec16c73749 (diff)
downloadscala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.gz
scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.bz2
scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.zip
deprecate Pair and Triple
Diffstat (limited to 'test/pending/run')
-rw-r--r--test/pending/run/reify_callccinterpreter.scala12
-rw-r--r--test/pending/run/reify_simpleinterpreter.scala10
2 files changed, 11 insertions, 11 deletions
diff --git a/test/pending/run/reify_callccinterpreter.scala b/test/pending/run/reify_callccinterpreter.scala
index d9f7736769..82c70da28f 100644
--- a/test/pending/run/reify_callccinterpreter.scala
+++ b/test/pending/run/reify_callccinterpreter.scala
@@ -43,15 +43,15 @@ object Test extends App {
override def toString() = "<function>"
}
- type Environment = List[Pair[Name, Value]];
+ type Environment = List[Tuple2[Name, Value]];
def lookup(x: Name, e: Environment): M[Value] = e match {
case List() => unitM(Wrong)
- case Pair(y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1)
+ case (y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1)
}
- def add(a: Value, b: Value): M[Value] = Pair(a, b) match {
- case Pair(Num(m), Num(n)) => unitM(Num(m + n))
+ def add(a: Value, b: Value): M[Value] = (a, b) match {
+ case (Num(m), Num(n)) => unitM(Num(m + n))
case _ => unitM(Wrong)
}
@@ -67,12 +67,12 @@ object Test extends App {
b <- interp(r, e);
c <- add(a, b))
yield c
- case Lam(x, t) => unitM(Fun(a => interp(t, Pair(x, a) :: e)))
+ case Lam(x, t) => unitM(Fun(a => interp(t, (x, a) :: e)))
case App(f, t) => for (a <- interp(f, e);
b <- interp(t, e);
c <- apply(a, b))
yield c
- case Ccc(x, t) => callCC(k => interp(t, Pair(x, Fun(k)) :: e))
+ case Ccc(x, t) => callCC(k => interp(t, (x, Fun(k)) :: e))
}
def test(t: Term): String = showM(interp(t, List()))
diff --git a/test/pending/run/reify_simpleinterpreter.scala b/test/pending/run/reify_simpleinterpreter.scala
index 6cf87ea7c5..1f6d6c8da7 100644
--- a/test/pending/run/reify_simpleinterpreter.scala
+++ b/test/pending/run/reify_simpleinterpreter.scala
@@ -32,15 +32,15 @@ object Test extends App {
override def toString() = "<function>"
}
- type Environment = List[Pair[Name, Value]]
+ type Environment = List[Tuple2[Name, Value]]
def lookup(x: Name, e: Environment): M[Value] = e match {
case List() => unitM(Wrong)
- case Pair(y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1)
+ case (y, b) :: e1 => if (x == y) unitM(b) else lookup(x, e1)
}
- def add(a: Value, b: Value): M[Value] = Pair(a, b) match {
- case Pair(Num(m), Num(n)) => unitM(Num(m + n))
+ def add(a: Value, b: Value): M[Value] = (a, b) match {
+ case (Num(m), Num(n)) => unitM(Num(m + n))
case _ => unitM(Wrong)
}
@@ -56,7 +56,7 @@ object Test extends App {
b <- interp(r, e);
c <- add(a, b))
yield c
- case Lam(x, t) => unitM(Fun(a => interp(t, Pair(x, a) :: e)))
+ case Lam(x, t) => unitM(Fun(a => interp(t, (x, a) :: e)))
case App(f, t) => for (a <- interp(f, e);
b <- interp(t, e);
c <- apply(a, b))