Effect4

Trait Effect4 

Source
pub trait Effect4 {
    type Fixed1;
    type Fixed2;
    type Fixed3;
    type HktWitness: HKT4<Self::Fixed1, Self::Fixed2, Self::Fixed3> + HKT;
}
Expand description

Re-exports the Effect4 trait for arity-4 type-encoded effect systems. Effect4: The Bridge Trait for Arity 4 Type Constructors.

Similar to Effect3, this trait is implemented by a user-defined System Witness to partially apply (fix) three of the four generic parameters of an HKT4 type. It is used for effect systems that need to track three distinct fixed effect types (e.g., Error, Warning, and a Counter) alongside the primary value type.

Required Associated Types§

Source

type Fixed1

The fixed type for the first parameter of the HKT4 type (e.g., an Error type).

Source

type Fixed2

The fixed type for the second parameter of the HKT4 type (e.g., a Log type).

Source

type Fixed3

The fixed type for the third parameter of the HKT4 type (e.g., a Counter type).

Source

type HktWitness: HKT4<Self::Fixed1, Self::Fixed2, Self::Fixed3> + HKT

The concrete witness type that implements HKT4 with the three fixed types (Fixed1, Fixed2, Fixed3). This witness type MUST also implement HKT to be compatible with Functor and Monad traits.

Implementors§