Polymonad programming in Haskell

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 tim...

Full description

Bibliographic Details
Main Authors: Bracker, Jan, Nilsson, Henrik
Format: Conference or Workshop Item
Published: 2016
Subjects:
Online Access:https://eprints.nottingham.ac.uk/32826/
_version_ 1848794498371420160
author Bracker, Jan
Nilsson, Henrik
author_facet Bracker, Jan
Nilsson, Henrik
author_sort Bracker, Jan
building Nottingham Research Data Repository
collection Online Access
description 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.
first_indexed 2025-11-14T19:17:09Z
format Conference or Workshop Item
id nottingham-32826
institution University of Nottingham Malaysia Campus
institution_category Local University
last_indexed 2025-11-14T19:17:09Z
publishDate 2016
recordtype eprints
repository_type Digital Repository
spelling nottingham-328262020-05-04T17:29:20Z https://eprints.nottingham.ac.uk/32826/ Polymonad programming in Haskell Bracker, Jan Nilsson, Henrik 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. 2016-01-31 Conference or Workshop Item PeerReviewed Bracker, Jan and Nilsson, Henrik (2016) Polymonad programming in Haskell. In: 27th 2015 International Symposium on Implementation and Application of Functional Languages - IFL 2015, 14-16 Sep 2015, Koblenz, Germany. Glasgow Haskell Compiler; Haskell; Monad; Polymonad; Syntactic support; Type checker plugin http://dx.doi.org/10.1145/2897336.2897340
spellingShingle Glasgow Haskell Compiler; Haskell; Monad; Polymonad; Syntactic support; Type checker plugin
Bracker, Jan
Nilsson, Henrik
Polymonad programming in Haskell
title Polymonad programming in Haskell
title_full Polymonad programming in Haskell
title_fullStr Polymonad programming in Haskell
title_full_unstemmed Polymonad programming in Haskell
title_short Polymonad programming in Haskell
title_sort polymonad programming in haskell
topic Glasgow Haskell Compiler; Haskell; Monad; Polymonad; Syntactic support; Type checker plugin
url https://eprints.nottingham.ac.uk/32826/
https://eprints.nottingham.ac.uk/32826/