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

scalaz.MonadWriter.scala Maven / Gradle / Ivy

The newest version!
package org.specs2.internal.scalaz

trait MonadWriter[F[_, _], W] extends Monad[({type f[+x] = F[W, x]})#f] {
  implicit def W: Monoid[W]
  
  def writer[A](v: (W, A)): F[W, A]
  def tell(w: W): F[W, Unit] = writer((w, ()))

  val monadWriterSyntax = new org.specs2.internal.scalaz.syntax.MonadWriterSyntax[F, W]{}
}

object MonadWriter {
  def apply[F[+_, +_], W](implicit F: MonadWriter[F, W]) = F
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy