Changelog for fused-effects-0.3.0.0
0.3.0.0
Backwards-incompatible changes
- Adds
Monad
as a superclass ofCarrier
, obviating the need for a lot of constraints, andMonad
instances for all carrier types. This is a backwards-incompatible change, as any carriers users have defined now requireMonad
instances. Note that in many cases carriers can be composed out of existing carriers and monad transformers, and thus these instances can often be derived using-XGeneralizedNewtypeDeriving
. We also recommend compiling with-Wredundant-constraints
as many of these can now be removed. - Replaces
AltC
with a new carrier,NonDetC
, based on Ralf Hinze’s work in Deriving Backtracking Monad Transformers. This is a backwards-incompatible change.AltC
was equivalent to theListT
monad transformer, and had the same well-known limitation to commutative monads. Therefore, the elimination ofEff
required a more durable approach. - Removes
Branch
. This is a backwards-incompatible change, but was necessitated by the difficulty of implementing correctApplicative
&Monad
instances for carriers which used it. Carriers which were employingBranch
internally should be reimplemented usingNonDetC
or a similar approach; seeCutC
andCullC
for examples. - Renames
Control.Effect.Void
,Void
, andVoidC
toControl.Effect.Pure
,Pure
, andPureC
respectively. This is a backwards-incompatible change for code mentioningVoidC
; it should be updated to referencePureC
instead.
Deprecations
Eff
andinterpret
, in favour of computing directly in the carriers. This enables the compiler to perform significant optimizations; see the benchmarks for details. Handlers can simply remove theEff
wrapping the carrier type & any use ofinterpret
. As above, we also recommend compiling with-Wredundant-constraints
as many of these can now be removed.ret
, in favor ofpure
orreturn
.handleEither
,handleReader
,handleState
,handleSum
, andhandleTraversable
in favour of composing carrier types directly. Carriers can be composed from other carriers andeff
defined withhandleCoercible
; and other definitions can usehandlePure
&handle
directly.
All deprecated APIs will be removed in the next release.
Other changes
- Adds a lazy
State
carrier inControl.Effect.State.Lazy
- Rewrites
CutC
using an approach related toNonDetC
, with the addition of a continuation to distinguishempty
fromcutfail
. - Rewrites
CullC
usingListC
andReaderC
. - Moves
OnceC
fromControl.Effect.NonDet
toControl.Effect.Cull
to avoid cyclic dependencies. - Adds a
runCutAll
handler forCut
effects, returning a collection of all results.
0.2.0.2
- Loosens the bounds on QuickCheck to accommodate 2.x.
0.2.0.1
- Fixes the benchmarks, and builds them in CI to avoid regressing them again.
0.2.0.0
- Adds
listen
,listens
, andcensor
operations toWriter
. - Provides explicit type parameters to
run
-style functions inState
,Reader
,Writer
, andError
. This is a backwards-incompatible change for clients using these functions in combination with visible type applications. - Adds benchmarks of
WriterC
/VoidC
wrapped withEff
against their unwrapped counterparts. - Adds
Functor
,Applicative
, andMonad
instances forWriterC
. - Adds
Functor
,Applicative
, andMonad
instances forVoidC
. - Fixes a space leak with
WriterC
. - Removes the
Functor
constraint onasks
andgets
. - Adds
bracketOnError
,finally
, andonException
toResource
. - Adds
sendM
toLift
.
0.1.2.1
- Loosens the bounds on QuickCheck to accommodate 0.12.
0.1.2.0
- Adds support for ghc 8.6.2, courtesy of @jkachmar.
- Adds a
Cut
effect which adds committed choice to nondeterminism. - Adds a
Cull
effect which adds pruning to nondeterminism. - Adds an example of using
NonDet
,Cut
, and a character parser effect to define parsers. - Fixes the table of contents links in the README.
0.1.1.0
- Adds a
runNonDetOnce
handler which terminates immediately upon finding a solution.
0.1.0.0
Initial release.