Monad transformers as monoid transformers

The incremental approach to modular monadic semantics constructs complex monads by using monad transformers to add computational features to a pre-existing monad. A complication of this approach is that the operations associated to the pre-existing monad need to be lifted to the new monad. In a companion paper by Jaskelioff, the lifting problem has been addressed in the setting of system [email protected] Here, we recast and extend those results in a category-theoretic setting. We abstract and generalize from monads to monoids (in a monoidal category), and from monad transformers to monoid transformers. The generalization brings more simplicity and clarity, and opens the way for lifting of operations with applicability beyond monads.

[1]  M. Barr,et al.  Toposes, Triples and Theories , 1984 .

[2]  Mauro Jaskelioff Monatron: An Extensible Monad Transformer Library , 2008, IFL.

[3]  Mauro Jaskelioff,et al.  Modular Monad Transformers , 2009, ESOP.

[4]  G. Kelly A unified treatment of transfinite constructions for free algebras, free monoids, colimits, associated sheaves, and so on , 1980, Bulletin of the Australian Mathematical Society.

[5]  Andrew M. Pitts,et al.  Semantics and Logics of Computation: List of Contributors , 1997 .

[6]  John R. Longley,et al.  Realizability toposes and language semantics , 1995 .

[7]  Philip Wadler,et al.  Comprehending monads , 1990, Mathematical Structures in Computer Science.

[8]  Eugenio Moggi,et al.  Notions of Computation and Monads , 1991, Inf. Comput..

[9]  Giuseppe Longo,et al.  Categories, types and structures - an introduction to category theory for the working computer scientist , 1991, Foundations of computing.

[10]  Sally Popkorn,et al.  A Handbook of Categorical Algebra , 2009 .

[11]  G. M. Kelly,et al.  Adjunctions whose counits are coequalizers, and presentations of finitary enriched monads , 1993 .

[12]  Chung-Kil Hur,et al.  On the construction of free algebras for equational systems , 2009, Theor. Comput. Sci..

[13]  J. Roger Hindley,et al.  To H.B. Curry: Essays on Combinatory Logic, Lambda Calculus, and Formalism , 1980 .

[14]  Thorsten Altenkirch,et al.  Foundations of Software Science and Computation Structures: 6th International Conference, FOSSACS 2003 Held as Part of the Joint European Conferences on Theory and Practice of Software, ETAPS 2003 Warsaw, Poland, April 7–11, 2003 Proceedings , 2003, Lecture Notes in Computer Science.

[15]  Paul Hudak,et al.  Monad transformers and modular interpreters , 1995, POPL '95.

[16]  Eugenio Moggi,et al.  Computational lambda-calculus and monads , 1989, [1989] Proceedings. Fourth Annual Symposium on Logic in Computer Science.

[17]  Michael Barr,et al.  Category theory for computing science (2. ed.) , 1995, Prentice Hall international series in computer science.

[18]  J. Davenport Editor , 1960 .

[19]  Robert Atkey,et al.  What is a Categorical Model of Arrows? , 2011, MSFP@ICALP.

[20]  Gordon D. Plotkin,et al.  Notions of Computation Determine Monads , 2002, FoSSaCS.

[21]  Christoph Lüth,et al.  Composing monads using coproducts , 2002, ICFP '02.

[22]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[23]  Andrew M. Pitts Tripos Theory in Retrospect , 2002, Math. Struct. Comput. Sci..

[24]  Ralf Hinze,et al.  Implementation and Application of Functional Languages , 2012, Lecture Notes in Computer Science.

[25]  Chris Heunen,et al.  Arrows, like Monads, are Monoids , 2006, MFPS.

[26]  John Hughes,et al.  Generalising monads to arrows , 2000, Sci. Comput. Program..

[27]  Gordon D. Plotkin,et al.  Semantics for Algebraic Operations , 2001, MFPS.

[28]  Neil Ghani Eta-Expansions in Fomega , 1996, CSL.

[29]  Gordon D. Plotkin,et al.  Combining effects: Sum and tensor , 2006, Theor. Comput. Sci..

[30]  Edmund Robinson,et al.  Premonoidal categories and notions of computation , 1997, Mathematical Structures in Computer Science.

[31]  Paul Hudak,et al.  Modular Denotational Semantics for Compiler Construction , 1996, ESOP.

[32]  Ernest G. Manes,et al.  Implementing collection classes with monads , 1998, Mathematical Structures in Computer Science.

[33]  J. Benabou Introduction to bicategories , 1967 .

[34]  Frank Pfenning,et al.  Natural Deduction for Intuitionistic Non-communicative Linear Logic , 1999, TLCA.

[35]  J. Lambek,et al.  Introduction to higher order categorical logic , 1986 .

[36]  Nick Benton,et al.  Monads and Effects , 2000, APPSEM.

[37]  Gordon D. Plotkin,et al.  Handlers of Algebraic Effects , 2009, ESOP.

[38]  Philip Wadler,et al.  The essence of functional programming , 1992, POPL '92.

[39]  D. van Dalen,et al.  A SMALL COMPLETE CATEGORY , 1988 .

[40]  Martin Hyland A small complete category , 1988, Ann. Pure Appl. Log..

[41]  R. Street,et al.  Review of the elements of 2-categories , 1974 .

[42]  S. Lane Categories for the Working Mathematician , 1971 .

[43]  Andrew M. Pitts,et al.  Metalanguages and Applications , 1997 .

[44]  John C. Mitchell,et al.  The Semantics of Second-Order Lambda Calculus , 1990, Inf. Comput..

[45]  Michael Barr,et al.  Category theory for computer science , 1995 .

[46]  Uday S. Reddy,et al.  Imperative functional programming , 1996, CSUR.