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

org.atnos.eff.syntax.choose.scala Maven / Gradle / Ivy

The newest version!
package org.atnos.eff.syntax

import cats.Alternative
import org.atnos.eff._

object choose extends choose

trait choose {
  implicit final def toChooseEffectOps[R, A](e: Eff[R, A]): ChooseEffectOps[R, A] = new ChooseEffectOps(e)
}

final class ChooseEffectOps[R, A](private val e: Eff[R, A]) extends AnyVal {

  def runChoose[F[_]: Alternative](implicit member: Member[Choose, R]): Eff[member.Out, F[A]] =
    ChooseInterpretation.runChoose(e)(Alternative[F], member.aux)

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy