This file contains hidden or 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 fs2._ | |
import cats.effect._ | |
import fs2.async.mutable.Signal | |
import scala.concurrent.ExecutionContext.Implicits.global | |
implicit val ioInstance = Effect[IO] | |
val input = Stream.range(1,20).covary[IO] // <-- try changing this to range(1,2), result is empty! | |
val output : Stream[IO,Signal[IO,Option[Int]]] = | |
Stream eval async.signalOf[IO,Option[Int]](Some(0)) flatMap { sig => |
This file contains hidden or 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
// This does the conversion from enum to char and vice-versa. | |
abstract class JDBCCharEnumeration extends Enumeration { | |
import slick.jdbc.HsqldbProfile.api._ //from what I recall changing this to JDBCProfile does *not* work. Must use specific driver. | |
import slick.jdbc.HsqldbProfile.MappedJdbcType | |
implicit def enumMapper = MappedJdbcType.base[Value,Char](_.id.toChar, this(_)) | |
} | |
// The enumeration | |
object OrderExpiry extends JDBCCharEnumeration { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.