This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
trait Unifiable[A] { | |
??? | |
} | |
def symbol[A: Unifiable]: Symbol[A] = ??? | |
def pred[A: Unifiable](a: Symbol[A])(f: => Set[Fact]): Predicate1[A] = ??? | |
def pred[A: Unifiable, B: Unifiable](a: Symbol[A], b: Symbol[B])(f: => Set[Fact]): Predicate2[A, B] = ??? | |
lazy val factorial: Predicate2[Int, Int] = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def ???: Nothing = sys.error("TODO") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
scala> val M = implicitly[Monad[Task]] | |
M: scalaz.Monad[scalaz.concurrent.Task] = scalaz.concurrent.Task$$anon$1@d55df51 | |
scala> var x = 0 | |
x: Int = 0 | |
scala> M point { x += 1 } | |
res0: scalaz.concurrent.Task[Unit] = scalaz.concurrent.Task@3f4898c5 | |
scala> x |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codecommit.misc | |
import scalaz._ | |
import scalaz.concurrent.Task | |
import scalaz.iteratee._ | |
import scalaz.stream._ | |
object conversion { | |
// TODO generalize to EmitterT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
unmanagedSourceDirectories in Compile += (sourceDirectory in Compile).value / s"scala-${scalaBinaryVersion.value}", | |
unmanagedSourceDirectories in Test += (sourceDirectory in Test).value / s"scala-${scalaBinaryVersion.value}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rr.sinks | |
package util | |
import com.typesafe.scalalogging.slf4j.{Logger => SLFLogger} | |
import org.slf4j.LoggerFactory | |
import scalaz.concurrent.Task | |
import scala.reflect.ClassTag |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var closure = 1 | |
val generator = Task { | |
if (closure > 5) { | |
throw Process.End | |
} | |
val back = closure | |
closure += 1 | |
back | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
object FakeProducts { | |
implicit def convert2A[A, B](pair: (A, B)): A = pair._1 | |
implicit def convert2B[A, B](pair: (A, B)): B = pair._2 | |
implicit def convert3A[A, B, C](triple: (A, B, C)): A = triple._1 | |
implicit def convert3B[A, B, C](triple: (A, B, C)): B = triple._2 | |
implicit def convert3C[A, B, C](triple: (A, B, C)): C = triple._3 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.rr.sinks | |
package object util { | |
/** | |
* Convenient workaround for soul-sucking exception | |
* swallowing code like Netty's futures. | |
*/ | |
def catchLogThrow[A](body: => A): A = { | |
try { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.codecommit.scatter | |
import scodec._ | |
import scalaz._ | |
import scalaz.stream._ | |
trait Server[Key, Value] { | |
import Server._ |
OlderNewer