Skip to main content

Research Repository

Advanced Search

Polymonad programming in Haskell

Bracker, Jan; Nilsson, Henrik

Polymonad programming in Haskell Thumbnail


Authors

Jan Bracker

Henrik Nilsson



Abstract

Polymonads were recently introduced by Hicks et al. as a unified approach to programming with different notions of monads. Their work was mainly focussed on foundational aspects of the approach. In this article, we show how to incorporate the notion of polymonads into Haskell, which is the first time this has been done in a full-scale language. In particular, we show how polymonads can be represented in Haskell, give a justification of the representation through proofs in Agda, and provide a plugin for the Glasgow Haskell Compiler (GHC) that enables their use in practice. Finally, we demonstrate the utility of our system by means of examples concerned with session types and the parameterized effect monad. This work provides a common representation of a number of existing approaches to generalized monads in Haskell.

Citation

Bracker, J., & Nilsson, H. (2015, September). Polymonad programming in Haskell. Presented at 27th 2015 International Symposium on Implementation and Application of Functional Languages - IFL 2015

Conference Name 27th 2015 International Symposium on Implementation and Application of Functional Languages - IFL 2015
Start Date Sep 14, 2015
End Date Sep 16, 2015
Acceptance Date Jan 31, 2016
Publication Date Sep 14, 2015
Deposit Date Apr 19, 2016
Publicly Available Date Apr 19, 2016
Publisher Association for Computing Machinery (ACM)
Peer Reviewed Peer Reviewed
ISBN 978-1-4503-4273-5
DOI https://doi.org/10.1145/2897336.2897340
Keywords Glasgow Haskell Compiler; Haskell; Monad; Polymonad; Syntactic support; Type checker plugin
Public URL https://nottingham-repository.worktribe.com/output/771142
Publisher URL http://dx.doi.org/10.1145/2897336.2897340
Related Public URLs http://www.cs.nott.ac.uk/~psznhn
http://www.cs.nott.ac.uk/~pszjb5
Additional Information Published in: IFL '15 Proceedings of the 27th Symposium on the Implementation and Application of Functional Programming Languages ACM New York, NY, USA ©2015
978-1-4503-4273-5
Contract Date Apr 19, 2016

Files





Downloadable Citations