From f96b6beefc08f56218ac68b37a4cecd757cb60ee Mon Sep 17 00:00:00 2001 From: Adriaan Moors Date: Fri, 6 Apr 2007 09:39:53 +0000 Subject: adding test files from tcpoly branch without hi... adding test files from tcpoly branch without history -- much faster this way, sorry --- test/files/pos/tcpoly_boundedmonad.scala | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 test/files/pos/tcpoly_boundedmonad.scala (limited to 'test/files/pos/tcpoly_boundedmonad.scala') diff --git a/test/files/pos/tcpoly_boundedmonad.scala b/test/files/pos/tcpoly_boundedmonad.scala new file mode 100644 index 0000000000..ea19ae4c39 --- /dev/null +++ b/test/files/pos/tcpoly_boundedmonad.scala @@ -0,0 +1,19 @@ +trait Monad[T <: Bound[T], MyType[x <: Bound[x]], Bound[_]] { + def map[S <: Bound[S]](f: T => S): MyType[S] + + def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_], + Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]] + (f: T => Result[S]): Result[S] + + def filter(p: T => Boolean): MyType[T] +} + +class Set[T <: Ordered[T]] extends Monad[T, Set, Ordered] { + def map[S <: Ordered[S]](f: T => S): Set[S] = error("TODO") + + def flatMap[S <: RBound[S], RContainer[x <: RBound[x]], RBound[_], + Result[x <: RBound[x]] <: Monad[x, RContainer, RBound]] + (f: T => Result[S]): Result[S] = error("TODO") + + def filter(p: T => Boolean): Set[T] = error("TODO") +} \ No newline at end of file -- cgit v1.2.3