From 4da23e1d33c4ced829f13be6b224ccfd89f5fc06 Mon Sep 17 00:00:00 2001 From: "P. Oscar Boykin" Date: Mon, 7 May 2018 09:20:19 -1000 Subject: [PATCH] remove the OptionT method, seems limited in value --- core/src/main/scala/cats/data/OptionT.scala | 8 -------- tests/src/test/scala/cats/tests/IndexedStateTSuite.scala | 4 +--- 2 files changed, 1 insertion(+), 11 deletions(-) diff --git a/core/src/main/scala/cats/data/OptionT.scala b/core/src/main/scala/cats/data/OptionT.scala index 19e1eae325..74fb633fb5 100644 --- a/core/src/main/scala/cats/data/OptionT.scala +++ b/core/src/main/scala/cats/data/OptionT.scala @@ -137,14 +137,6 @@ final case class OptionT[F[_], A](value: F[Option[A]]) { * }}} */ def toNested: Nested[F, Option, A] = Nested(value) - - /** - * This repeats an F until we get defined values. This can be useful - * for polling type operations on State (or RNG) Monads, or in effect - * monads. - */ - def untilDefined(implicit F: FlatMap[F]): F[A] = - (new syntax.FlatMapOptionOps(value)).untilDefinedM } object OptionT extends OptionTInstances { diff --git a/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala b/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala index 40b4a709e9..b605bae24f 100644 --- a/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala +++ b/tests/src/test/scala/cats/tests/IndexedStateTSuite.scala @@ -3,7 +3,7 @@ package tests import catalysts.Platform import cats.arrow.{Profunctor, Strong} -import cats.data.{EitherT, IndexedStateT, OptionT, State, StateT} +import cats.data.{EitherT, IndexedStateT, State, StateT} import cats.arrow.Profunctor import cats.kernel.instances.tuple._ import cats.laws.discipline._ @@ -280,8 +280,6 @@ class IndexedStateTSuite extends CatsSuite { } counter.untilDefinedM.run(0).value should === ((stackSafeTestSize + 2, stackSafeTestSize + 1)) - - OptionT(counter).untilDefined.run(0).value should === ((stackSafeTestSize + 2, stackSafeTestSize + 1)) } test("foreverM works") {