Skip to main content

Research Repository

Advanced Search

Polymonad programming in Haskell

Bracker, Jan; Nilsson, Henrik

Authors

Jan Bracker psxjb5@nottingham.ac.uk



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.

Start Date Sep 14, 2015
Publication Date Sep 14, 2015
Publisher Association for Computing Machinery (ACM)
Peer Reviewed Peer Reviewed
ISBN 978-1-4503-4273-5
APA6 Citation Bracker, J., & Nilsson, H. (2015). Polymonad programming in Haskell. https://doi.org/10.1145/2897336.2897340
DOI https://doi.org/10.1145/2897336.2897340
Keywords Glasgow Haskell Compiler; Haskell; Monad; Polymonad; Syntactic support; Type checker plugin
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
Copyright Statement Copyright information regarding this work can be found at the following address: http://eprints.nottingh.../end_user_agreement.pdf
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

Files

paper.pdf (262 Kb)
PDF

Copyright Statement
Copyright information regarding this work can be found at the following address: http://eprints.nottingham.ac.uk/end_user_agreement.pdf





You might also like



Downloadable Citations

;