diff options
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)) |