A new minor release of Effect has gone out, with some big changes we wanted to let you know about:
Effect<R, E, A> has been changed to Effect<A, E = never, R = never>. This change makes for cleaner type signatures (Effect<void>) and ensures types are ordered by importance. The full list of types that got updated with the same change: Effect, Stream, STM, STMGen, Layer, Exit, Take, Fiber, FiberRuntime, Request, Resource, TExit, Deferred, TDeferred, Pool.
The following should be used:
instead of:
For this inhuman work we have to thank deeply Giulio Canti, who’s now officially known as <Canti, Giulio = never>!
Context.Tag has been renamed to Context.GenericTag, string identifiers are now mandatory.
The following should be used:
instead of:
A new Context.Tag base class has been added. The added class approach assists with creating unique tag identifiers, making use of the opaque type that you get for free using a class.
For example:
For the changes above, a code-mod has been released to make migration as easy as possible.
You can run it by executing:
It might not be perfect - if you encounter issues, let us know! Also make sure you commit any changes before running it, in case you need to revert anything.
@effect/platform has been refactored to remove re-exports from the base package.
You will now need to install both @effect/platform & the corresponding @effect/platform-* package to make use of platform specific implementations.