All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dwolla.testutils.PureOrIO.scala Maven / Gradle / Ivy

package com.dwolla.testutils

import cats.effect.IO
import fs2._
import org.scalatest.compatible.Assertion

sealed trait PureOrIO[T[_]] {
  def ioStream(s: Stream[T, Assertion]): Stream[IO, Assertion]
}

object PureOrIO {

  implicit val pure = new PureOrIO[Pure] {
    override def ioStream(s: Stream[Pure, Assertion]): Stream[IO, Assertion] = s.covary[IO]
  }

  implicit val io = new PureOrIO[IO] {
    override def ioStream(s: Stream[IO, Assertion]): Stream[IO, Assertion] = s
  }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy