Embedding effect systems in Haskell

Orchard, Dominic A. and Petricek, Tomas (2014) Embedding effect systems in Haskell. In: ACM SIGPLAN symposium on Haskell, 4-5 September 2014, Gothenburg, Sweden. (doi:https://doi.org/10.1145/2633357.2633368) (Full text available)

PDF - Author's Accepted Manuscript
Download (278kB) Preview
[img]
Preview
Official URL
http://doi.acm.org/10.1145/2633357.2633368

Abstract

Monads are now an everyday tool in functional programming for abstracting and delimiting effects. The link between monads and effect systems is well-known, but in their typical use, monads provide a much more coarse-grained view of effects. Effect systems capture fine-grained information about the effects, but monads provide only a binary view: effectful or pure. Recent theoretical work has unified fine-grained effect systems with monads using a monad-like structure indexed by a monoid of effect annotations (called parametric effect monads). This aligns the power of monads with the power of effect systems. This paper leverages recent advances in Haskell's type system (as provided by GHC) to embed this approach in Haskell, providing user-programmable effect systems. We explore a number of practical examples that make Haskell even better and safer for effectful programming. Along the way, we relate the examples to other concepts, such as Haskell's implicit parameters and coeffects.

Item Type: Conference or workshop item (Paper)
Divisions: Faculties > Sciences > School of Computing
Faculties > Sciences > School of Computing > Programming Languages and Systems Group
Depositing User: Dominic Orchard
Date Deposited: 05 May 2017 13:30 UTC
Last Modified: 08 Jun 2017 08:50 UTC
Resource URI: https://kar.kent.ac.uk/id/eprint/57487 (The current URI for this page, for reference purposes)
Orchard, Dominic A.: https://orcid.org/0000-0002-7058-7842
  • Depositors only (login required):

Downloads

Downloads per month over past year