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

wei-k.httpz_2.10.0.5.1.source-code.Interpreter.scala Maven / Gradle / Ivy

The newest version!
package httpz

import scalaz.{One => _, Two => _, _}

abstract class Interpreter[F[_]: Monad] {
  final val interpreter: InterpreterF[F] =
    new InterpreterF[F] {
      def apply[A](a: RequestF[A]) = go(a)
    }

  protected[this] def go[A](a: RequestF[A]): F[A]

  final def run[E, A](a: ActionE[E, A]): F[E \/ A] =
    a.run.foldMap(interpreter)
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy