The notion of generic effects is encountered in Plotkin and Power's theory of algebraic effects.
The concept is best explained by example. It is possible to add the effect of nondeterminism to a functional language by adding a construct
at every type . The operational semantics of this is nondeterministic, in the sense that can reduce to either or , effectively making a nondeterministic choice. This is the style of algebraic operations.
However, if we also have a type of Boolean values, the same effect can be introduced by a single constant
which arbitrarily reduces to either or . This is the style of generic effects.
If we have nondeterminism as an algebraic effect () then we can define the corresponding generic effect by
Vice versa, if we have the generic effect we can define the algebraic operation by
Plotkin and Power [2003] have shown that, for an appropriate general definition of algebraic effect, the two presentations coincide.
Plotkin, Gordon, and John Power. 2001. ‘Semantics for Algebraic Operations’. Electronic Notes in Theoretical Computer Science 45: 332–45. https://doi.org/10.1016/S1571-0661(04)80970-8. [pdf]
@article{plotkin_2001,
title = {Semantics for {Algebraic} {Operations}},
volume = {45},
issn = {15710661},
doi = {10.1016/S1571-0661(04)80970-8},
journal = {Electronic Notes in Theoretical Computer Science},
author = {Plotkin, Gordon and Power, John},
year = {2001},
pages = {332--345}
}
Plotkin, Gordon, and John Power. 2003. ‘Algebraic Operations and Generic Effects’. Applied Categorical Structures 11 (1): 69–94. https://doi.org/10.1023/A:1023064908962. [pdf]
@article{plotkin_2003,
title = {Algebraic operations and generic effects},
volume = {11},
doi = {10.1023/A:1023064908962},
number = {1},
journal = {Applied Categorical Structures},
author = {Plotkin, Gordon and Power, John},
year = {2003},
pages = {69--94}
}