Releases: atnos-org/eff
eff 4.3.0
Maintenance version
Improvements
- do not memoize failed values for tasks, futures and safe effects
- added a note in the user guide about effects not covered by the
all._
import #90
Fixes
- always pass
onNone
action when executing a continuation to make sureSafe.thenFinally
always executes - changed some
Option()
calls toSome
to preserve user nulls #91
eff 4.2.0
API change
- the
Eff.detach
method now requires aMonadError
instance to properly trigger with "last" actions
Documentation improvements
- bring
Translate
docs closer toTransform
docs - changed the smart constructor names for the
KVStore
effect in the tutorial - moved imports in the "create effects" section so they appear on the user guide
eff 4.1.0
Tasks fixes (and slight API changes).
-
fixed the forking of scalaz
Task
effects, they should not use an implicit globalExecutorService
-
removed the
taskForkStrategy
method to create scalazTask
effect with a specificExecutorService
(and not aStrategy
as the name was implying)
now all methods for forking aretaskFork
but with different possible arguments, with or withoutExecutorServices
, with or
withoutTimeout
-
the
run
methods for scalazTimedTasks
now take an impliciteff.ExecutorServices
-
remove the use of an implicit
Strategy
to create forkedfs2
task effects
eff 4.0.2
Correctness fix.
The new incarnation of the generic interpret had an embarrassing bug for applicative calls.
It is fixed now.
eff 4.0.1
Stack-safety fixes.
The stack-safety sage continues.
- fixed a stack-safety issue when running a interpreting pure values
- fixed a stack-safety issue when injecting an effect into a larger stack with
into
eff 4.0.0
New interpreters!
This version provides a generic interpreter "loop" to interpret Eff
values. You just need to provide an Interpreter
trait with appropriate definitions for:
- interpreting pure values
- interpreting an effect of type
M[X]
- interpreting a list of effects
T[M[X]]
(the "applicative" case) whereT
has aTraverse
instance - interpreting a "last" effect, in case of having side-effects to finalize resources (see
SafeEffect.thenFinally
)
This new org.atnos.eff.interpret.interpret
method is stack-safe provided that you never call continuations directly
but always with Eff.impure(x, continuation)
(see the various effects interpreters for examples).
There are also simpler traits like Recurser
or Translate
, please read the scaladoc for the Interpret trait.
Changes
There are only low-level API changes
-
many of the
Interpret
trait method have changed (interpret
,intercept
,...) or been removed. Please use
the gitter channel if you have any questions -
the "continuation" type inside an
Eff
value has been renamedContinuation
to help newcomers understand the library better
Improvements
Eff.tailRecM
is now stack-safe- the
catbird
andtwitter-util
dependencies have been updated (thanks to Chris Vale) EitherEffect.attemptEither
will attempt anEither
effect and returnE Either A
EitherEffect.runEitherCatchLeft
will run anEither
effect and handle the resultingE Either A
value in case of a
failure
eff 3.1.0
This version brings some breaking API changes for async effects in order to make them compatible with ScalaJS.
Changes
-
TimedFuture
,TwitterTimedFuture
, scalazTimedTask
, fs2TimedTask
now use aorg.atnos.eff.Scheduler
instead of aScheduledExecutorService
to
timeout computations -
a
Scheduler
can be created from aScheduledExecutorService
with theExecutorServices.schedulerFromScheduledExecutorService
method for the JVM -
a
Scheduler
can be created with theorg.atnos.eff.Schedulers.default
method for ScalaJS -
the monix
Task
effect is now directly using themonix.eval.Task
type instead of using aTimedTask
type before.
The API stays the same except for stacks declarations which are nowFx.fx1[Task]
instead ofFx.fx1[TimedTask]
eff 3.0.4
Maintenance version
Improvements
- made the
runAsync
methods more generic by accepting any stack which can be translated toFx1[M]
- added a convenience method to shutdown the execution services on a future completion
Fixes
- fixed a possible deadlock when shutting down
ExecutorServices
eff 3.0.3
Maintenance version
Fixes
- the memoization of tasks and future effects was broken after the
3.0.0
upgrade, this version fixes it
eff 3.0.2
Super important maintenance version!!!
This version contains some important fixes to Member
implicits. You should definitely not use 3.0.0 or 3.0.1 because
those versions contain the possibility to throw ClassCastExceptions
depending on the effect stack you use.
Improvements
- added objects to import creation / interpretation methods for task and future effects
org.atnos.eff.addon.scalaz.task._
org.atnos.eff.addon.monix.task._
org.atnos.eff.addon.fs2.task._
org.atnos.eff.addon.twitter.future._
- added objects to import syntax methods for task and future effects
org.atnos.eff.syntax.addon.scalaz.task._
org.atnos.eff.syntax.addon.monix.task._
org.atnos.eff.syntax.addon.fs2.task._
org.atnos.eff.syntax.addon.twitter.future._
Fixes:
- possible
ClassCastException
when running stacks of 4 effects