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
import scala.util.Random | |
import scala.concurrent.duration._ | |
import cats.effect.{ExitCode, IOApp, IO} | |
import cats.effect.concurrent.MVar | |
import cats.instances.list._ | |
import cats.syntax.apply._ | |
import cats.syntax.parallel._ | |
object ConsensusApp extends IOApp { |
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
import cats.syntax.functor._ | |
sealed trait Foo | |
@ElementCodec | |
case class Bar(a: Int) extends Foo | |
@ElementCodec | |
case class Qux(b: String) extends Foo | |
object Foo { | |
implicit val fooDecoder: ElementDecoder[Foo] = ElementDecoder[Foo] { |