In the context of algebraic effects and handlers, it is easy to see that handlers have two purposes:
The theory and practice of scoped effects is about decomposing these two aspects.
There seem to be two approaches to the semantics of scoped effects, viz.
Wu, Nicolas, Tom Schrijvers, and Ralf Hinze. “Effect Handlers in Scope.” In Proceedings of the 2014 ACM SIGPLAN Symposium on Haskell. Association for Computing Machinery, 2014. https://doi.org/10.1145/2633357.2633358.
@inproceedings{wu_effect_2014,
title = {Effect handlers in scope},
doi = {10.1145/2633357.2633358},
booktitle = {Proceedings of the 2014 {ACM} {SIGPLAN} Symposium on Haskell},
publisher = {Association for Computing Machinery},
author = {Wu, Nicolas and Schrijvers, Tom and Hinze, Ralf},
date = {2014}
}
Piróg, Maciej, Tom Schrijvers, Nicolas Wu, and Mauro Jaskelioff. “Syntax and Semantics for Operations with Scopes.” In Proceedings of the 33rd Annual ACM/IEEE Symposium on Logic in Computer Science, 809–18. Association for Computing Machinery, 2018. https://doi.org/10.1145/3209108.3209166.
@inproceedings{pirog_2018,
title = {Syntax and Semantics for Operations with Scopes},
doi = {10.1145/3209108.3209166},
pages = {809--818},
booktitle = {Proceedings of the 33rd Annual {ACM}/{IEEE} Symposium on Logic in Computer Science},
publisher = {Association for Computing Machinery},
author = {Piróg, Maciej and Schrijvers, Tom and Wu, Nicolas and Jaskelioff, Mauro},
date = {2018},
}
Yang, Zhixuan, Marco Paviotti, Nicolas Wu, Birthe Van Den Berg, and Tom Schrijvers. “Structured Handling of Scoped Effects.” In Programming Languages and Systems, edited by Ilya Sergey, 13240:462–91. Lecture Notes in Computer Science. Cham: Springer International Publishing, 2022. https://doi.org/10.1007/978-3-030-99336-8_17.
@inproceedings{yang_2022,
location = {Cham},
title = {Structured Handling of Scoped Effects},
volume = {13240},
doi = {10.1007/978-3-030-99336-8_17},
series = {Lecture Notes in Computer Science},
pages = {462--491},
booktitle = {Programming Languages and Systems},
publisher = {Springer International Publishing},
author = {Yang, Zhixuan and Paviotti, Marco and Wu, Nicolas and Van Den Berg, Birthe and Schrijvers, Tom},
editor = {Sergey, Ilya},
date = {2022},
}