Abstract
Monads and applicative functors are two ways that Haskell programmers bundle effectful primitives into effectful program fragments. In this paper, we investigate using monads and applicative functors to bundle remote effectful primitives, specifically aiming to amortize the cost of remote communications using bundling. We look at several ways of maximizing the bundling of primitives, drawing from the remote monad design pattern and Haxl system, and provide a taxonomy of mechanism for amortization, with examples. The result of this investigation is that monadic fragments can be efficiently bundled into packets, almost for free, when given a user-supplied packet transportation mechanism, and the primitives obey some simple pre- and post-conditions.
- Peter Achten and Rinus Plasmeijer. 1995. Concurrent interactive processes in a pure functional language. In Proceedings Computing Science in the Netherlands, CSN, Vol. 95. 27–28.Google Scholar
- Heinrich Apfelmus. 2010. The Operational Monad Tutorial. The Monad.Reader 15 (2010), 37–55.Google Scholar
- Paolo Capriotti and Ambrus Kaposi. 2014. Free applicative functors. arXiv preprint arXiv:1403.0749 (2014).Google Scholar
- Manuel MT Chakravarty, Gabriele Keller, Sean Lee, Trevor L McDonell, and Vinod Grover. 2011. Accelerating Haskell array codes with multicore GPUs. In Proceedings of the sixth workshop on Declarative aspects of multicore programming. ACM, 3–14. Google Scholar
Digital Library
- Conal Elliott, Sigbjørn Finne, and Oege de Moor. 2003. Compiling Embedded Languages. Journal of Functional Programming 13, 3 (2003), 455–481. Google Scholar
Digital Library
- Jeff Epstein, Andrew P Black, and Simon Peyton Jones. 2011. Towards Haskell in the cloud. In Haskell Symposium. 118–129. Google Scholar
Digital Library
- Jeremy Gibbons. 2016. Free Delivery (functional pearl). In Haskell Symposium. ACM. Google Scholar
Digital Library
- Andy Gill. 2014. Domain-specific languages and code synthesis using Haskell. Queue 12, 4 (2014), 30. Google Scholar
Digital Library
- Andy Gill, Neil Sculthorpe, Justin Dawson, Aleksander Eskilson, Andrew Farmer, Mark Grebe, Jeffrey Rosenbluth, Ryan Scott, and James Stanton. 2015. The Remote Monad Design Pattern. In Proceedings of the 8th ACM SIGPLAN Symposium on Haskell. ACM, New York, NY, USA, 59–70. DOI: Google Scholar
Digital Library
- Mark Grebe and Andy Gill. 2016. Haskino: A Remote Monad for Programming the Arduino. In Practical Aspects of Declarative Languages. Springer, 153–168.Google Scholar
- Mark Grebe and Andy Gill. 2016. Threading the Arduino with Haskell. In Trends in Functional Programming. Springer.Google Scholar
- Philipp Haller and Heather Miller. 2016. Distributed Programming via Safe Closure Passing. arXiv preprint arXiv:1602.03598 (2016).Google Scholar
- Paul Hudak. 1998. Modular Domain Specific Languages and Tools. In International Conference on Software Reuse. IEEE Press, 134–142. Google Scholar
Digital Library
- Oleg Kiselyov. 2016. Semi-implicit batched remote code execution as staging. Technical Report. http://okmij.org/ftp/meta-future/Google Scholar
- Saunders Mac Lane. 1978. Categories for the working mathematician Vol. 5. Springer Science & Business Media.Google Scholar
- Daan Leijen and Erik Meijer. 1999. Domain Specific Embedded Compilers. In Conference on Domain-Specific Languages. ACM, 109–122. Google Scholar
Digital Library
- Jason Maassen, Rob Van Nieuwpoort, Ronald Veldema, Henri Bal, Thilo Kielmann, Ceriel Jacobs, and Rutger Hofman. 2001. Efficient Java RMI for parallel programming. ACM Transactions on Programming Languages and Systems 23, 6 (2001), 747–775. Google Scholar
Digital Library
- Simon Marlow, Louis Brandy, Jonathan Coens, and Jon Purdy. 2014. There is No Fork: An Abstraction for Efficient, Concurrent, and Concise Data Access. In International Conference on Functional Programming. ACM, 325–337. Google Scholar
Digital Library
- Heather Miller, Philipp Haller, and Martin Odersky. 2014. Spores: A type-based foundation for closures in the age of concurrency and distribution. In European Conference on Object-Oriented Programming. Springer, 308–333. Google Scholar
Digital Library
- Eugenio Moggi. 1991. Notions of Computation and Monads. Information and Computation 93, 1 (1991), 55–92. citeseer.nj.nec.com/moggi89notions.html Google Scholar
Digital Library
- Simon Peyton Jones, Dimitrios Vytiniotis, Stephanie Weirich, and Geoffrey Washburn. 2006. Simple unification-based type inference for GADTs. In ICFP ’06: Proceedings of the eleventh ACM SIGPLAN International Conference on Functional Programming. ACM, New York, NY, USA, 50–61. DOI: Google Scholar
Digital Library
- Esmond Pitt and Kathy McNiff. 2001. Java. rmi: The Remote Method Invocation Guide. Addison-Wesley Longman Publishing Co., Inc. Google Scholar
Digital Library
- Brian Rabern. 2016. The History of the Use of {{.}}-Notation in Natural Language Semantics. Semantics and Pragmatics 9, 12 (2016).Google Scholar
- Wouter Swierstra. 2008. Data types à la carte. Journal of functional programming 18, 04 (2008), 423–436. Google Scholar
Digital Library
- Arie Van Deursen, Paul Klint, and Joost Visser. 2000. Domain-Specific Languages: An Annotated Bibliography. Sigplan Notices 35, 6 (2000), 26–36. Google Scholar
Digital Library
- Arjen Van Weelden and Rinus Plasmeijer. 2002. Towards a strongly typed functional operating system. In Symposium on Implementation and Application of Functional Languages. Springer, 215–231. Google Scholar
Digital Library
- P. Wadler. 1997. How to declare an imperative. Comput. Surveys 29, 3 (1997), 240–263. Google Scholar
Digital Library
Index Terms
Composable network stacks and remote monads
Recommendations
Composable network stacks and remote monads
Haskell 2017: Proceedings of the 10th ACM SIGPLAN International Symposium on HaskellMonads and applicative functors are two ways that Haskell programmers bundle effectful primitives into effectful program fragments. In this paper, we investigate using monads and applicative functors to bundle remote effectful primitives, specifically ...
Coproducts of Monads on Set
LICS '12: Proceedings of the 2012 27th Annual IEEE/ACM Symposium on Logic in Computer ScienceCoproducts of monads on $\Set$ have arisen in both the study of computational effects and universal algebra. We describe coproducts of consistent monads on $\Set$ by an initial algebra formula, and prove also the converse: if the coproduct exists, so do ...
Idioms are Oblivious, Arrows are Meticulous, Monads are Promiscuous
We revisit the connection between three notions of computation: Moggi s monads, Hughes s arrows and McBride and Paterson s idioms (also called applicative functors). We show that idioms are equivalent to arrows that satisfy the type isomorphism A B 1 (A ...







Comments