1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
/*
* SPDX-License-Identifier: MIT
* Copyright (c) 2023 - 2026. The DeepCausality Authors and Contributors. All Rights Reserved.
*/
// ----------------------------------------------------
// Effect Traits (Arity 3)
// ----------------------------------------------------
use crate::;
/// Effect3: The Bridge Trait for Arity 3 Type Constructors.
///
/// This trait is implemented by a user-defined **System Witness** (e.g., `MyEffect`)
/// to partially apply (fix) two of the three generic parameters of an `HKT3` type.
/// It serves as a crucial component in building type-encoded effect systems,
/// allowing for the explicit tracking and handling of two fixed effect types
/// (e.g., Error and Warning) while keeping the primary value type generic.
// ----------------------------------------------------
// Effect Traits (Arity 4)
// ----------------------------------------------------
/// 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.
// ----------------------------------------------------
// Effect Traits (Arity 5)
// ----------------------------------------------------
/// Effect5: The Bridge Trait for Arity 5 Type Constructors.
///
/// This trait is implemented by a user-defined **System Witness**
/// to partially apply (fix) four of the five generic parameters of an `HKT5` type.
/// It is designed for highly expressive effect systems that need to track four distinct fixed effect types
/// (e.g., Error, Warning, Counter, and Trace information) alongside the primary value type.