diff options
author | Den Shabalin <den.shabalin@gmail.com> | 2013-11-13 15:33:33 +0100 |
---|---|---|
committer | Den Shabalin <den.shabalin@gmail.com> | 2013-11-20 16:06:30 +0100 |
commit | b004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (patch) | |
tree | 0c31f83d2e039db4c2ead7a3280aaabc78671333 /test/pending/run/reify_simpleinterpreter.scala | |
parent | c243435f113615b2f7407fbd683c93ec16c73749 (diff) | |
download | scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.gz scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.tar.bz2 scala-b004c3ddb38f8e690a0895a51ad0c83ff57a01e7.zip |
deprecate Pair and Triple
Diffstat (limited to 'test/pending/run/reify_simpleinterpreter.scala')
-rw-r--r-- | test/pending/run/reify_simpleinterpreter.scala | 10 |
1 files changed, 5 insertions, 5 deletions
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)) |