Abstract
Graphical user interfaces (GUIs) mediate many of our interactions with computers. Functional Reactive Programming (FRP) is a promising approach to GUI design, providing high-level, declarative, compositional abstractions to describe user interactions and time-dependent computations. We present Elm, a practical FRP language focused on easy creation of responsive GUIs. Elm has two major features: simple declarative support for Asynchronous FRP; and purely functional graphical layout.
Asynchronous FRP allows the programmer to specify when the global ordering of event processing can be violated, and thus enables efficient concurrent execution of FRP programs; long-running computation can be executed asynchronously and not adversely affect the responsiveness of the user interface.
Layout in Elm is achieved using a purely functional declarative framework that makes it simple to create and combine text, images, and video into rich multimedia displays.
Together, Elm's two major features simplify the complicated task of creating responsive and usable GUIs.
- U. A. Acar, G. E. Blelloch, and R. Harper. Adaptive functional programming. In Proceedings of the 29th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 247--259, New York, NY, USA, 2002. ACM. Google ScholarDigital Library
- U. A. Acar, A. Ahmed, and M. Blume. Imperative self-adjusting computation. In Proceedings of the 35th Annual ACM SIGPLANSIGACT Symposium on Principles of Programming Languages, pages 309--322, New York, NY, USA, 2008. ACM. Google ScholarDigital Library
- U. A. Acar, G. E. Blelloch, K. Tangwongsan, and D. Türkoğlu. Robust kinetic convex hulls in 3D. In Proceedings of the 16th Annual European Symposium on Algorithms, pages 29--40, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarDigital Library
- H. Apfelmus. Reactive-banana. Haskell library available at http://www.haskell.org/haskellwiki/Reactive-banana, 2012.Google Scholar
- Z. M. Ariola and M. Felleisen. The call-by-need lambda calculus. Journal of Functional Programming, 7(3):265--301, May 1997. Google ScholarDigital Library
- E. Chailloux, G. Cousineau, and A. Suàrez. MLgraph. http://www.pps.univ-paris-diderot.fr/~cousinea/MLgraph/mlgraph.html, 1992.Google Scholar
- G. H. Cooper. Integrating Dataflow Evaluation into a Practical Higher-Order Call-by-Value Language. PhD thesis, Brown University, May 2008. Google ScholarDigital Library
- A. Courtney. Frappé: Functional reactive programming in Java. In Proceedings of the Third International Symposium on Practical Aspects of Declarative Languages, pages 29--44, London, UK, 2001. Springer-Verlag. Google ScholarDigital Library
- A. Courtney and C. Elliott. Genuinely functional user interfaces. In Proceedings of the 2001 ACM SIGPLAN Workshop on Haskell, pages 41--69, 2001.Google Scholar
- A. Courtney, H. Nilsson, and J. Peterson. The Yampa arcade. In Proceedings of the 2003 ACM SIGPLAN Workshop on Haskell, pages 7--18, New York, NY, 2003. ACM. Google ScholarDigital Library
- A. Demers, T. Reps, and T. Teitelbaum. Incremental evaluation for attribute grammars with application to syntax-directed editors. In Proceedings of the 8th ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, pages 105--116, New York, NY, USA, 1981. ACM. Google ScholarDigital Library
- C. Elliott. Push-pull functional reactive programming. In Proceedings of the 2nd ACM SIGPLAN Symposium on Haskell, pages 25--36, New York, NY, 2009. ACM. Google ScholarDigital Library
- C. Elliott and P. Hudak. Functional reactive animation. In Proceedings of the 2nd ACM SIGPLAN International Conference on Functional Programming, pages 263--273, New York, NY, 1997. ACM. Google ScholarDigital Library
- R. B. Findler and M. Flatt. Slideshow: functional presentations. In Proceedings of the Ninth ACM SIGPLAN International Conference on Functional Programming, pages 224--235, New York, NY, USA, 2004. ACM. Google ScholarDigital Library
- S. Finne and S. Peyton Jones. Pictures: A simple structured graphics model. In Proceedings of the Glasgow Functional Programming Workshop, 1995. Google ScholarDigital Library
- G. Giorgidze and H. Nilsson. Switched-on Yampa: declarative programming of modular synthesizers. In Proceedings of the 10th International Conference on Practical Aspects of Declarative Languages, pages 282--298, Berlin, Heidelberg, 2008. Springer-Verlag. Google ScholarDigital Library
- P. Henderson. Functional geometry. In Proceedings of the 1982 ACM Symposium on LISP and Functional Programming, pages 179--187, New York, NY, USA, 1982. ACM. Google ScholarDigital Library
- D. Ignatoff, G. H. Cooper, and S. Krishnamurthi. Crossing state lines: Adapting object-oriented frameworks to functional reactive languages. In Proceedings of the International Symposium on Functional and Logic Programming, 2006. Google ScholarDigital Library
- S. N. Kamin and D. Hyatt. A special-purpose language for picturedrawing. In Proceedings of the Conference on Domain-Specific Languages on Conference on Domain-Specific Languages (DSL), 1997, pages 23--23, Berkeley, CA, USA, 1997. USENIX Association. Google ScholarDigital Library
- H. Liu and P. Hudak. Plugging a space leak with an arrow. Electron. Notes Theor. Comput. Sci., 193:29--45, Nov. 2007. Google ScholarDigital Library
- H. Liu, E. Cheng, and P. Hudak. Causal commutative arrows and their optimization. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, pages 35--46, New York, NY, 2009. ACM. Google ScholarDigital Library
- J. Maraist, M. Odersky, and P. Wadler. The call-by-need lambda calculus. Journal of Functional Programming, 8(3):275--317, May 1998. Google ScholarDigital Library
- L. A. Meyerovich, A. Guha, J. Baskin, G. H. Cooper, M. Greenberg, A. Bromfield, and S. Krishnamurthi. Flapjax: a programming language for Ajax applications. In Proceedings of the 24th ACM SIGPLAN Conference on Object Oriented Programming Systems Languages and Applications, pages 1--20, New York, NY, 2009. ACM. Google ScholarDigital Library
- H. Nilsson. Dynamic optimization for functional reactive programming using generalized algebraic data types. In Proceedings of the 10th ACM SIGPLAN International Conference on Functional Programming, pages 54--65, New York, NY, 2005. ACM. Google ScholarDigital Library
- H. Nilsson, A. Courtney, and J. Peterson. Functional reactive programming, continued. In Proceedings of the 2002 ACM SIGPLAN Workshop on Haskell, pages 51--64, New York, NY, 2002. ACM. Google ScholarDigital Library
- J. Peterson, V. Trifonov, and A. Serjantov. Parallel functional reactive programming. In Proceedings of the Second International Workshop on Practical Aspects of Declarative Languages, pages 16--31, London, UK, 2000. Springer-Verlag. Google ScholarDigital Library
- J. H. Reppy. Concurrent programming in ML. Cambridge University Press, 1999. ISBN 9780521480895. Google ScholarDigital Library
- M. Sage. FranTk - a declarative GUI language for Haskell. In Proceedings of the 5th ACM SIGPLAN International Conference on Functional Programming, pages 106--117, New York, NY, 2000. Google ScholarDigital Library
- N. Sculthorpe and H. Nilsson. Safe functional reactive programming through dependent types. In Proceedings of the 14th ACM SIGPLAN International Conference on Functional Programming, pages 23--34, New York, NY, 2009. ACM. Google ScholarDigital Library
- Z. Wan, W. Taha, and P. Hudak. Real-time FRP. In Proceedings of the 6th ACM SIGPLAN International Conference on Functional Programming, pages 146--156, New York, NY, 2001. ACM. Google ScholarDigital Library
- Z. Wan, W. Taha, and P. Hudak. Event-driven FRP. In Proceedings of the 4th International Symposium on Practical Aspects of Declarative Languages, pages 155--172, London, UK, UK, 2002. Springer-Verlag. Google ScholarDigital Library
- D. N. Xu and S.-C. Khoo. Compiling real time functional reactive programming. In Proceedings of the ASIAN Symposium on Partial Evaluation and Semantics-Based Prog Google ScholarDigital Library
Index Terms
- Asynchronous functional reactive programming for GUIs
Recommendations
Functional reactive programming, refactored
Haskell '16Functional Reactive Programming (FRP) has come to mean many things. Yet, scratch the surface of the multitude of realisations, and there is great commonality between them. This paper investigates this commonality, turning it into a mathematically ...
Asynchronous functional reactive programming for GUIs
PLDI '13: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and ImplementationGraphical user interfaces (GUIs) mediate many of our interactions with computers. Functional Reactive Programming (FRP) is a promising approach to GUI design, providing high-level, declarative, compositional abstractions to describe user interactions ...
FranTk - a declarative GUI language for Haskell
ICFP '00: Proceedings of the fifth ACM SIGPLAN international conference on Functional programmingFranTk is a new high level library for programming Graphical User Interfaces (GUIs) in Haskell. It is based on Fran (Functional Reactive Animation), and uses the notions of Behaviors and Events to structure code. Behaviors are time-varying, reactive ...
Comments