Skip to content
Permalink
Browse files

Revert "Applied workaround for scala/bug 11303 from @joroKr21"

This reverts commit e0eb895.
  • Loading branch information...
joroKr21 committed Jan 17, 2019
1 parent 30ecd18 commit e504b9b9a4cb4083d84741edb9f494b0e889ec48
Showing with 4 additions and 4 deletions.
  1. +1 −1 core/shared/src/main/scala/fs2/Pull.scala
  2. +3 −3 core/shared/src/main/scala/fs2/Stream.scala
@@ -218,7 +218,7 @@ object Pull extends PullLowPriority {

/** Pull that outputs nothing and has result of `r`. */
def pure[F[x] >: Pure[x], R](r: R): Pull[F, INothing, R] =
fromFreeC(Algebra.pure[F, INothing, R](r))
fromFreeC(Algebra.pure(r))

/**
* Reads and outputs nothing, and fails with the given error.
@@ -1084,7 +1084,7 @@ final class Stream[+F[_], +O] private (private val free: FreeC[Algebra[Nothing,
else {
f(hd(idx)).get.transformWith {
case Result.Pure(_) => go(idx + 1)
case Result.Fail(err) => Algebra.raiseError[F2, O2](err)
case Result.Fail(err) => Algebra.raiseError(err)
case Result.Interrupted(scopeId: Token, err) =>
Stream.fromFreeC(Algebra.interruptBoundary(tl, scopeId, err)).flatMap(f).get
case Result.Interrupted(invalid, err) =>
@@ -1837,7 +1837,7 @@ final class Stream[+F[_], +O] private (private val free: FreeC[Algebra[Nothing,
* }}}
*/
def onComplete[F2[x] >: F[x], O2 >: O](s2: => Stream[F2, O2]): Stream[F2, O2] =
handleErrorWith(e => s2 ++ Stream.fromFreeC(Algebra.raiseError[F2, O2](e))) ++ s2
handleErrorWith(e => s2 ++ Stream.fromFreeC(Algebra.raiseError(e))) ++ s2

/**
* Run the supplied effectful action at the end of this stream, regardless of how the stream terminates.
@@ -3217,7 +3217,7 @@ object Stream extends StreamLowPriority {
* }}}
*/
def raiseError[F[_]: RaiseThrowable](e: Throwable): Stream[F, INothing] =
fromFreeC(Algebra.raiseError[F, INothing](e))
fromFreeC(Algebra.raiseError(e))

/**
* Creates a random stream of integers using a random seed.

0 comments on commit e504b9b

Please sign in to comment.
You can’t perform that action at this time.