[go: up one dir, main page]
More Web Proxy on the site http://driver.im/ skip to main content
10.1145/1159803.1159840acmconferencesArticle/Chapter ViewAbstractPublication PagesicfpConference Proceedingsconference-collections
Article

Programming monads operationally with Unimo

Published: 16 September 2006 Publication History

Abstract

Monads are widely used in Haskell for modeling computational effects, but defining monads remains a daunting challenge. Since every part of a monad's definition depends on its computational effects, programmers cannot leverage the common behavior of all monads easily and thus must build from scratch each monad that models a new computational effect.I propose the Unimo framework which allows programmers to define monads and monad transformers in a modular manner. Unimo contains a heavily parameterized observer function which enforces the monad laws, and programmers define a monad by invoking the observer function with arguments that specify the computational effects of the monad. Since Unimo provides the common behavior of all monads in a reusable form, programmers no longer need to rebuild the semantic boilerplate for each monad and can instead focus on the more interesting and rewarding task of modeling the desired computational effects.

References

[1]
Koen Claessen. Functional Pearl: Parallel parsing processes. Journal of Functional Programming, 14(6):741--757, November 2004.
[2]
William Harrison and James Hook. Achieving information flow security through precise control of effects. In 18th IEEE Computer Security Foundations Workshop, pages 16--30, Los Alamitos, CA, USA, June 2005. IEEE Computer Society.
[3]
Ralf Hinze. Deriving backtracking monad transformers. In Proceedings of the Fifth ACM SIGPLAN International Conference on Functional Programming, pages 186--197, New York, NY, USA, September 2000. ACM Press.
[4]
John Hughes. The design of a pretty-printing library. In Johan Jeuring and Eric Meijer, editors, Advanced Functional Programming: First International Spring School on Advanced Functional Programming Techniques, volume 925 of LNCS, pages 53--96. Springer, May 1995.
[5]
John Hughes. Generalizing monads to arrows. Science of Computer Programming, 37:67--111, May 2000.
[6]
Simon Peyton Jones. Tackling the awkward squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell. In CAR Hoare, Manfred Broy, and Ralf Steinbruggen, editors, Engineering Theories of Software Construction, volume 180 of NATO Science Series: Computer & Systems Sciences, pages 47--96. IOS Press, 2001.
[7]
Simon Peyton Jones, editor. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, Cambridge, UK, May 2003.
[8]
Simon Peyton Jones and Mark Shields. Lexically scoped type variables. Submitted to ICFP 2004, March 2004.
[9]
Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Mark Shields. Practical type inference for arbitrary-rank types. Unpublished manuscript, July 2005.
[10]
Simon Peyton Jones, Geoffrey Washburn, and Stephanie Weirich. Wobbly types: type inference for generalized algebraic data types. Technical Report MS-CIS-05-26, University of Pennsylvania, July 2004.
[11]
Guy L. Steele Jr. and Richard P. Gabriel. The evolution of Lisp. ACM SIGPLAN Notices, 28(3):231--270, March 1993.
[12]
Gregor Kiczales, Erik Hilsdale, Jim Hugunin, Mik Kersten, Jeffrey Palm, and William G. Griswold. An overview of AspectJ. In ECOOP 2001 - Object-Oriented Programming: 15th European Conference, volume 2072 of LNCS, pages 327--353. Springer-Verlag, June 2001.
[13]
Gregor Kiczales, John Lamping, Anurag Mendhekar, Chris Maeda, Cristina Videira Lopes, Jean-Marc Loingtier, and John Irwin. Aspect-oriented programming. In Proceedings of the 11th European Conference on Object-Oriented Programming, volume 1241 of LNCS, pages 220--242. Springer-Verlag, June 1997.
[14]
Sheng Liang, Paul Hudak, and Mark P. Jones. Monad transformers and modular interpreters. In Proceedings of the 22nd ACMSIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 333--343, New York, NY, USA, January 1995. ACM Press.
[15]
Wolfgang De Meuter. Monads as a theoretical foundation for AOP. Position paper in ECOOP'97 Workshop on Aspect-Oriented Programming, June 1997.
[16]
Eugenio Moggi. Computational lambda-calculus and monads. In Proceedings of the Fourth Symposium on Logic in Computer Science, pages 14--23, Piscataway, NJ, USA, June 1989. IEEE Press.
[17]
Eugenio Moggi. Notions of computation and monads. Information And Computation, 93(1):55--92, July 1991.
[18]
Peter D. Mosses. Denotational semantics. In Handbook of Theoretical Computer Science, Volume B: Formal Models and Semantics, chapter 11, pages 575--631. MIT Press, December 1990.
[19]
Martin Reiser and Niklaus Wirth. Programming in Oberon: Steps Beyond Pascal and Modula. Addison Wesley, Reading, MA, USA, June 1992.
[20]
Niklaus Wirth. Project Oberon: The Design of an Operating System and Compiler. Addison-Wesley, Reading, MA, USA, November 1992.

Cited By

View all
  • (2019)Program extraction for mutable arraysScience of Computer Programming10.1016/j.scico.2019.102372(102372)Online publication date: Dec-2019
  • (2016)Generalized Deep Transfer Networks for Knowledge Propagation in Heterogeneous DomainsACM Transactions on Multimedia Computing, Communications, and Applications10.1145/299857412:4s(1-22)Online publication date: 18-Nov-2016
  • (2016)Deep Learning at Scale and at EaseACM Transactions on Multimedia Computing, Communications, and Applications10.1145/299646412:4s(1-25)Online publication date: 2-Nov-2016
  • Show More Cited By

Recommendations

Comments

Please enable JavaScript to view thecomments powered by Disqus.

Information & Contributors

Information

Published In

cover image ACM Conferences
ICFP '06: Proceedings of the eleventh ACM SIGPLAN international conference on Functional programming
September 2006
308 pages
ISBN:1595933093
DOI:10.1145/1159803
  • General Chair:
  • John Reppy,
  • Program Chair:
  • Julia Lawall
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 41, Issue 9
    Proceedings of the 2006 ICFP conference
    September 2006
    296 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1160074
    Issue’s Table of Contents
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

Sponsors

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 16 September 2006

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. haskell
  2. monad transformers
  3. monads
  4. unimo

Qualifiers

  • Article

Conference

ICFP06
Sponsor:

Acceptance Rates

Overall Acceptance Rate 333 of 1,064 submissions, 31%

Upcoming Conference

ICFP '25
ACM SIGPLAN International Conference on Functional Programming
October 12 - 18, 2025
Singapore , Singapore

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)12
  • Downloads (Last 6 weeks)2
Reflects downloads up to 14 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2019)Program extraction for mutable arraysScience of Computer Programming10.1016/j.scico.2019.102372(102372)Online publication date: Dec-2019
  • (2016)Generalized Deep Transfer Networks for Knowledge Propagation in Heterogeneous DomainsACM Transactions on Multimedia Computing, Communications, and Applications10.1145/299857412:4s(1-22)Online publication date: 18-Nov-2016
  • (2016)Deep Learning at Scale and at EaseACM Transactions on Multimedia Computing, Communications, and Applications10.1145/299646412:4s(1-25)Online publication date: 2-Nov-2016
  • (2016)Privacy-Preserving Multimedia Big Data Aggregation in Large-Scale Wireless Sensor NetworksACM Transactions on Multimedia Computing, Communications, and Applications10.1145/297857012:4s(1-19)Online publication date: 15-Sep-2016
  • (2016)Enhanced User Context-Aware Reputation Measurement of Multimedia ServiceACM Transactions on Multimedia Computing, Communications, and Applications10.1145/297856912:4s(1-18)Online publication date: 12-Oct-2016
  • (2016)Evaluating the Privacy Risk of User-Shared ImagesACM Transactions on Multimedia Computing, Communications, and Applications10.1145/297856812:4s(1-21)Online publication date: 15-Sep-2016
  • (2016)A Truthful Incentive Mechanism for Emergency Demand Response in Geo-Distributed Colocation Data CentersACM Transactions on Modeling and Performance Evaluation of Computing Systems10.1145/29500461:4(1-23)Online publication date: 21-Sep-2016
  • (2016)False-Positive Probability and Compression Optimization for Tree-Structured Bloom FiltersACM Transactions on Modeling and Performance Evaluation of Computing Systems10.1145/29403241:4(1-39)Online publication date: 21-Sep-2016
  • (2016)Principal type inference for GADTsACM SIGPLAN Notices10.1145/2914770.283766551:1(416-428)Online publication date: 11-Jan-2016
  • (2016)Principal type inference for GADTsProceedings of the 43rd Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages10.1145/2837614.2837665(416-428)Online publication date: 11-Jan-2016
  • Show More Cited By

View Options

Login options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media