Skip to content

Instantly share code, notes, and snippets.

Simão Martins Lasering

Block or report user

Report or block Lasering

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Lasering / ws.scala
Last active May 29, 2017
Http4s Websocket handleWithActor
View ws.scala
package org.http4s.akka
import scalaz.concurrent.Task
import{Exchange, Process, Sink, async}
import{Actor, ActorSystem, OneForOneStrategy, PoisonPill, Props, SupervisorStrategy, Terminated}
import org.http4s.server.websocket.{WS => Http4sWS}
import org.http4s.websocket.WebsocketBits.{Close, Text, WebSocketFrame}
import org.http4s.{Response, Status}
View typeInferanceProblem.scala
sealed trait TaskComapped[L <: HList, M <: HList]
object TaskComapped{
implicit def nil: TaskComapped[HNil, HNil] = new TaskComapped[HNil, HNil]{}
implicit def cons[Head, Tail <: HList, ResultsTail <: HList](implicit tc: TaskComapped[Tail, ResultsTail]) =
new TaskComapped[Task[Head] :: Tail, Head :: ResultsTail]{}
abstract class Task[R](value: R) {
def destination: Int
You can’t perform that action at this time.