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
* 0.5.0 - Update to Immutable 3.0. | |
* 0.4.6-0.4.7 - Maintenance releases. | |
* 0.4.5 - Update to Immutable 2.5. Make `TransactionContext` mutable. | |
* 0.4.4 - Update to Immutable 2.3. Add `Binding.toJS` method. | |
* 0.4.3 - Fix: Morearty.isChanged now checks equality with Sequence.equals. | |
* 0.4.2 - Moved browserify-shim transform to build script as it applies on each module require. | |
* 0.4.1 - Fix #22 (index.js and dist/morearty.js are not in npm package). | |
* 0.4.0 - Normalize dependencies (no need to pass React and Immutable around). New standalone build (thanks to Marat Bektimirov). Fixes #19. | |
* 0.3.6 - Fix incorrect behavior of `Binding.clear`. Correct `Context.isChanged` when rendering on requestAnimationFrame. Minor improvements. | |
* 0.3.5 - Fix caching issue. |
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 io.treev.eventsourcing | |
import cats.data.Xor | |
import enumeratum.{CirceEnum, Enum, EnumEntry} | |
import io.circe.Encoder | |
import io.circe.generic.auto._ | |
import io.treev.eventsourcing.model.Context | |
import io.treev.model._ | |
import monix.eval.Task |
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.rms.miu.common.db.slick | |
import java.time.{Duration, LocalDateTime} | |
import cats.{Monad, ~>} | |
object simple { | |
object common { |
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
define(['transit', 'immutable'], function (Transit, Imm) { | |
'use strict'; | |
var reader = Transit.reader('json', { | |
arrayBuilder: { | |
init: function () { return Imm.List.of().asMutable(); }, | |
add: function (ret, val) { return ret.push(val); }, | |
finalize: function (ret) { return ret.asImmutable(); }, | |
fromArray: function (arr) { return Imm.List(arr); } | |
}, |
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.{Monad, StackSafeMonad} | |
import cats.effect.{IO, LiftIO} | |
trait Session { | |
def close(): Unit | |
} | |
case class SessionContext[T](exec: Session => IO[T]) { | |
def runSession(newSession: () => Session): IO[T] = { |
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 org.reactivestreams.{Publisher, Subscriber, Subscription} | |
import scala.util.control.NonFatal | |
/** Iterator-based Reactive Streams publisher. | |
* @param iterator iterator | |
* @param onDone done callback */ | |
class CloseableIteratorPublisher[T](iterator: Iterator[T], onDone: () => Unit) | |
extends Publisher[T] { |
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 java.util.concurrent.atomic.AtomicReference | |
import java.util.function.UnaryOperator | |
import org.reactivestreams.{Publisher, Subscriber, Subscription} | |
import scala.concurrent.ExecutionContext.Implicits.global | |
import scala.concurrent.Future | |
import scala.util.control.NonFatal | |
class AsyncPublisher[T](next: () => Future[Option[T]], |
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.implicits._ | |
object CollectFirstM { | |
implicit class CollectFirstMSyntax[F[_], A](val xs: Seq[A]) extends AnyVal { | |
def collectFirstM[B, M[_]](f: A => M[Option[B]])(implicit M: Monad[M]): M[Option[B]] = | |
M.tailRecM(xs) { | |
case x +: rest => f(x).map { | |
case some@Some(_) => Right(some) |
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
implicit object TaskAsync extends korolev.Async[Task] { | |
override def pureStrict[A](value: A): Task[A] = Task.now(value) | |
override def pure[A](value: => A): Task[A] = Task.now(value) | |
override def fork[A](value: => A): Task[A] = Task(value) | |
override def unit: Task[Unit] = Task.unit | |
override def fromTry[A](value: => Try[A]): Task[A] = Task.fromTry(value) | |
override def promise[A]: korolev.Async.Promise[Task, A] = { | |
val promise = scala.concurrent.Promise[A]() | |
korolev.Async.Promise(Task.fromFuture(promise.future), a => { promise.complete(a); () }) | |
} |
OlderNewer