diff options
author | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
---|---|---|
committer | Jason Zaugg <jzaugg@gmail.com> | 2013-11-22 03:12:36 -0800 |
commit | 666f39d3493ee633a616c40f1c41add1190a3a40 (patch) | |
tree | a62015e39bfdd6235bdcf0bef31fc31342ea60b6 /test/files/run/tcpoly_parseridioms.scala | |
parent | 42657a6918ef7d6fd3f36838739ec8a3b64744a3 (diff) | |
parent | b004c3ddb38f8e690a0895a51ad0c83ff57a01e7 (diff) | |
download | scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.gz scala-666f39d3493ee633a616c40f1c41add1190a3a40.tar.bz2 scala-666f39d3493ee633a616c40f1c41add1190a3a40.zip |
Merge pull request #3131 from densh/pr/deprecate-pair-and-triple
Deprecate Pair and Triple
Diffstat (limited to 'test/files/run/tcpoly_parseridioms.scala')
-rw-r--r-- | test/files/run/tcpoly_parseridioms.scala | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/files/run/tcpoly_parseridioms.scala b/test/files/run/tcpoly_parseridioms.scala index c8bcf693a1..d22f68b558 100644 --- a/test/files/run/tcpoly_parseridioms.scala +++ b/test/files/run/tcpoly_parseridioms.scala @@ -13,10 +13,10 @@ trait Parsers { } // sequence - def sq[T, U](a: => Parser[T], b: => Parser[U]): Parser[Pair[T, U]] = new Parser[Pair[T, U]] { - def apply(in: Input): ParseResult[Pair[T, U]] = a(in) match { + def sq[T, U](a: => Parser[T], b: => Parser[U]): Parser[Tuple2[T, U]] = new Parser[Tuple2[T, U]] { + def apply(in: Input): ParseResult[Tuple2[T, U]] = a(in) match { case Success(next, x) => b(next) match { - case Success(next2, y) => Success(next2, Pair(x,y)) + case Success(next2, y) => Success(next2, (x,y)) case Failure(_, msg) => Failure(in, msg) } case Failure(_, msg) => Failure(in, msg) @@ -49,7 +49,7 @@ trait Parsers { } } - def apply_++[s, tt](fun: Parser[s => tt], arg: Parser[s]): Parser[tt] = lift[Pair[s=>tt, s], tt]({case Pair(f, a) => f(a)})(sq(fun, arg)) + def apply_++[s, tt](fun: Parser[s => tt], arg: Parser[s]): Parser[tt] = lift[Tuple2[s=>tt, s], tt]({case (f, a) => f(a)})(sq(fun, arg)) def success[u](v: u): Parser[u] = new Parser[u] { def apply(in: Input) = Success(in, v) |