skip to main content
article

String diagrams for free monads (functional pearl)

Published:04 September 2016Publication History
Skip Abstract Section

Abstract

We show how one can reason about free monads using their universal properties rather than any concrete implementation. We introduce a graphical, two-dimensional calculus tailor-made to accommodate these properties.

References

  1. R. Atkey and P. Johann. Interleaving data and effects. Journal of Functional Programming, 25:e20 (44 pages), 2015.Google ScholarGoogle Scholar
  2. M. Barr. Coequalizers and free triples. Mathematische Zeitschrift, 116(4): 307–322, 1970.Google ScholarGoogle ScholarCross RefCross Ref
  3. J. W. Barrett, C. Meusburger, and G. Schaumann. Gray categories with duals and their diagrams, 2016. To appear in Journal of Differential Geometry. F. Bartels. On Generalised Coinduction and Probabilistic Specification Formats: Distributive Laws in Coalgebraic Modelling. PhD thesis, Vrije Universiteit Amsterdam, 2004.Google ScholarGoogle Scholar
  4. J. Beck. Distributive laws. In B. Eckmann, editor, Seminar on Triples and Categorical Homology Theory, volume 80 of Lecture Notes in Mathematics, pages 119–140. Springer Berlin Heidelberg, 1969.Google ScholarGoogle Scholar
  5. J. M. Beck. Triples, Algebras and Cohomology. PhD thesis, Columbia University, 1967.Google ScholarGoogle Scholar
  6. R. Bird and O. de Moor. Algebra of Programming. Prentice-Hall, Inc., Upper Saddle River, NJ, USA, 1997. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. R. S. Bird and L. Meertens. Two exercises found in a book on algorithmics. In L. Meertens, editor, Program Specification and Transformation, pages 451–457. North-Holland, 1987. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. G. Brady and T. Trimble. A string diagram calculus for predicate logic and C. S. Peirces system beta, 1998.Google ScholarGoogle Scholar
  9. M. M. Fokkinga. Law and Order in Algorithmics. PhD thesis, University of Twente, Enschede, February 1992.Google ScholarGoogle Scholar
  10. R. Hinze and D. Marsden. Equational reasoning with lollipops, forks, cups, caps, snakes, and speedometers. Journal of Logical and Algebraic Methods in Programming, pages –, 2016. In press. M. Hyland, G. D. Plotkin, and J. Power. Combining effects: Sum and tensor. Theor. Comput. Sci., 357(1-3):70–99, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. A. Joyal, R. Street, and D. Verity. Traced monoidal categories. Mathematical Proceedings of the Cambridge Philosophical Society, 119:447–468, 1996.Google ScholarGoogle ScholarCross RefCross Ref
  12. G. M. Kelly. A unified treatment of transfinite constructions for free algebras, free monoids, colimits, associated sheaves, and so on. Bulletin of the Australian Mathematical Society, 22:1–83, 8 1980. ISSN 1755-1633.Google ScholarGoogle ScholarCross RefCross Ref
  13. J. Kock, A. Joyal, M. Batanin, and J.-F. Mascari. Polynomial functors and opetopes. Advances in Mathematics, 224:2690–2737, 2010.Google ScholarGoogle ScholarCross RefCross Ref
  14. C. Lüth and N. Ghani. Composing monads using coproducts. In M. Wand and S. L. P. Jones, editors, Proceedings of the Seventh ACM SIGPLAN International Conference on Functional Programming (ICFP ’02), Pittsburgh, Pennsylvania, USA, October 4-6, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. , pages 133–144. ACM, 2002.Google ScholarGoogle Scholar
  16. ISBN 1-58113-487-8. doi: 10.1145/581478.581492.Google ScholarGoogle Scholar
  17. E. Meijer, M. Fokkinga, and R. Paterson. Functional programming with bananas, lenses, envelopes and barbed wire. In Proceedings of the 5th ACM Conference on Functional Programming Languages and Computer Architecture, pages 124–144, New York, NY, USA, 1991. Springer-Verlag New York, Inc. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. E. Moggi. An Abstract View of Programming Languages. Technical report, Edinburgh University, 1989.Google ScholarGoogle Scholar
  19. T. Schrijvers, N. Wu, B. Desouter, and B. Demoen. Heuristics entwined with handlers combined. In PPDP 2014 : proceedings of the 16th international symposium on principles and practice of declarative programming, page 12. Association for Computing Machinery (ACM), 2014. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. P. Selinger. A survey of graphical languages for monoidal categories. In B. Coecke, editor, New Structures for Physics, pages 289–355. Springer Berlin Heidelberg, Berlin, Heidelberg, 2011.Google ScholarGoogle Scholar

Index Terms

  1. String diagrams for free monads (functional pearl)

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 51, Issue 9
      ICFP '16
      September 2016
      501 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/3022670
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP 2016: Proceedings of the 21st ACM SIGPLAN International Conference on Functional Programming
        September 2016
        501 pages
        ISBN:9781450342193
        DOI:10.1145/2951913

      Copyright © 2016 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 4 September 2016

      Check for updates

      Qualifiers

      • article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!