Base trait for custom instances of Error effect.
case object MyError extends ErrorEffect[String]
// optional:
type MyError = MyError.type
This effect covers both applicative-error and monadic-error. The behavior depends on:
- selected handler:
first
vs.all
- composition of computations: sequential (
flatMap
,zip
, etc.) vs. parallel (zipPar
, etc.).
Notice that ErrorEffectExt takes type 2 parameters. This abstraction enables ergonomic syntax of raise(e)
, which relieves the user from the necessity of wrapping e
in Nel
(raise(Nel(e))
), as in the standard Validated
applicative functor. For the simpler, single-parmeter version, see ErrorEffect.
Type parameters
- E
-
Accumulated error
- E1
-
Singular error added to the accumulator (commonly same as E)
Attributes
- See also
- Companion
- object
- Graph
-
- Supertypes
- Known subtypes
-
trait ErrorEffect[E]
- Self type
-
Members list
Value members
Concrete methods
Attributes
- Definition Classes
Alias of the default handler for this effect.
Alias of the default handler for this effect.
Defined as an extension, to allow custom redefinitions without restrictions imposed by overriding
Attributes
Attributes
- Definition Classes
Attributes
- Definition Classes
Deprecated methods
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Attributes
- Deprecated
- true
Inherited methods
API for defining custom handlers.
API for defining custom handlers.
Combines with another Effect instance, for the purpose of sharing an Interpreter.
Example of application: implement RWS
-alike handler for Reader &! Writer &! State
composition of effects.
Attributes
- Inherited from:
- Effect
API for defining custom effects.
API for defining custom effects.
Embeds an invocation of this Signature's method into the Computation monad. This provides mechanism for separation between syntax an semantics of effects.
Attributes
- Inherited from:
- Effect
API for defining custom effects.
Deprecated and Inherited methods
Attributes
- Deprecated
- true
- Inherited from:
- ErrorSignature
Inherited fields
API for defining custom handlers.
API for defining custom handlers.
Helper object providing type definitions to be used for implementing Interpreters for this effect.
Attributes
- Inherited from:
- Effect