Skip to main content

Research Repository

Advanced Search

Supermonads: one notion to bind them all

Bracker, Jan; Nilsson, Henrik

Authors

Jan Bracker psxjb5@nottingham.ac.uk



Abstract

Several popular generalizations of monads have been implemented in Haskell. Unfortunately, because the shape of the associated type constructors do not match the standard Haskell monad interface, each such implementation provides its own type class and versions of associated library functions. Furthermore, simultaneous use of different monadic notions can be cumbersome as it in general is necessary to be explicit about which notion is used where. In this paper we introduce supermonads: an encoding of monadic notions that captures several different generalizations along with a version of the standard library of monadic functions that work uniformly with all of them. As standard Haskell type inference does not work for supermonads due to their generality, our supermonad implementation is accompanied with a language extension, in the form of a plugin for the Glasgow Haskell Compiler (GHC), that allows type inference for supermonads, obviating the need for manual annotations.

Citation

Bracker, J., & Nilsson, H. (2016). Supermonads: one notion to bind them all. In Haskell 2016: Proceedings of the 9th International Symposium on Haskell. https://doi.org/10.1145/2976002.2976012

Conference Name 9th International Symposium on Haskell (Haskell '16)
Start Date Sep 22, 2016
End Date Sep 23, 2016
Acceptance Date Jul 12, 2016
Publication Date Sep 23, 2016
Deposit Date Sep 1, 2016
Publicly Available Date Sep 23, 2016
Peer Reviewed Peer Reviewed
Book Title Haskell 2016: Proceedings of the 9th International Symposium on Haskell
ISBN 9781450344340
DOI https://doi.org/10.1145/2976002.2976012
Keywords Functional programming, Glasgow Haskell Compiler, Haskell, Monads, Syntactic support, Type checker plugin
Public URL http://eprints.nottingham.ac.uk/id/eprint/36156
Publisher URL http://dl.acm.org/citation.cfm?doid=2976002.2976012
Copyright Statement Copyright information regarding this work can be found at the following address: http://eprints.nottingham.ac.uk/end_user_agreement.pdf

Files


paper.pdf (349 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