Effect capabilities for Haskell: Taming effect interference in monadic programming

Abstract : Computational effects complicate the tasks of reasoning about and maintaining software, due to the many kinds of interferences that can occur. While different proposals have been formulated to alleviate the fragility and burden of dealing with specific effects, such as state or exceptions, there is no prevalent robust mechanism that addresses the general interference issue. Building upon the idea of capability-based security, we propose effect capabilities as an effective and flexible manner to control monadic effects and their interferences. Capabil- ities can be selectively shared between modules to establish secure effect-centric coordination. We further refine capabilities with type-based permission lattices to allow fine-grained decomposition of authority. We provide an implementa- tion of effect capabilities in Haskell, using type classes to establish a way to statically share capabilities between modules, as well as to check proper access permissions to effects at compile time. We first exemplify how to tame effect interferences using effect capabilities by treating state and exceptions. Then we focus on taming I/O by proposing a fine-grained lattice of I/O permissions based on the current classification of its operations. Finally, we show that inte- grating effect capabilities with modern tag-based monadic mechanisms provides a practical, modular and safe mechanism for monadic programming in Haskell.
Type de document :
Article dans une revue
Science of Computer Programming, Elsevier, 2016, 119, pp.3-30. 〈10.1016/j.scico.2015.11.010〉
Liste complète des métadonnées

https://hal.inria.fr/hal-01400002
Contributeur : Nicolas Tabareau <>
Soumis le : lundi 21 novembre 2016 - 12:01:12
Dernière modification le : vendredi 22 juin 2018 - 09:34:55

Identifiants

Citation

Ismael Figueroa, Nicolas Tabareau, Éric Tanter. Effect capabilities for Haskell: Taming effect interference in monadic programming. Science of Computer Programming, Elsevier, 2016, 119, pp.3-30. 〈10.1016/j.scico.2015.11.010〉. 〈hal-01400002〉

Partager

Métriques

Consultations de la notice

271