EnumeratorPis one attempt to address this—you define an
EnumeratorP[E, F]and then you can apply it to get an
EnumeratorTfor any larger monad.
Hello everyone. I’m getting strange runtime errors from monix+iteratee+circe combination, and it’s probably the binary incompatibility between those. I have the following now:
val monixVersion = "2.0.4" libraryDependencies ++= Seq( "io.monix" %% "monix", "io.monix" %% "monix-cats" ).map(_ % monixVersion) val circeVersion = "0.5.3" libraryDependencies ++= Seq( "io.circe" %% "circe-core", "io.circe" %% "circe-generic", "io.circe" %% "circe-parser", "io.circe" %% "circe-streaming", "io.circe" %% "circe-literal" ).map(_ % circeVersion) val iterateeVersion = "0.6.1" libraryDependencies ++= Seq( "io.iteratee" %% "iteratee-files", "io.iteratee" %% "iteratee-core", "io.iteratee" %% "iteratee-monix" ).map(_ % iterateeVersion)
Are these supposed to work together?
r.close()here be properly captured? Is there really a need to do a
NonFatalpattern matching considering that any adequate monad shouldn't catch fatal exception? And is non-exhaustive matching intentional?
catchNonFatalshould be used only for side-effect free functions that can throw exceptions (e.g. they might divide by zero but shouldn't do
println) AFAIU, since it does
pure(a)which is strict in its argument and therefore executes whatever side-effects
a: => Amight have.
tailRecMisn't necessary stack safe when you have thousands of iteratees sequenced on a single chunk if the underlying
flatMapisn't stack-safe: #142. it's fixed in #141, but I'm not planning to backport it to an 0.6.2 unless someone is particularly interested, since it's somewhat unlikely people will run into this.
io.iteratee.files.SuspendableFileModule#readBytesFromStreamare not supposed to be consumed multiple times, right? I.e. if I create an
Enumeratorinstance and consume it in a certain way (e.g. taking
headof it), it doesn’t make sense to keep that instance, because I’ll not be able to consume it again.
Seq[Char]s all over the place.
Evalfor effect capture? suspicious eyes