From b004c3ddb38f8e690a0895a51ad0c83ff57a01e7 Mon Sep 17 00:00:00 2001 From: Den Shabalin Date: Wed, 13 Nov 2013 15:33:33 +0100 Subject: deprecate Pair and Triple --- test/pending/run/reify_callccinterpreter.scala | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'test/pending/run/reify_callccinterpreter.scala') 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() = "" } - 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())) -- cgit v1.2.3