Monadic Functional Reactive Programming

A. J. Van Der Ploeg 1
1 ATEAMS - Analysis and Transformation based on rEliAble tool coMpositionS
Inria Lille - Nord Europe, CWI - Centrum Wiskunde & Informatica
Abstract : Functional Reactive Programming (FRP) is a way to program reactive systems in functional style, eliminating many of the problems that arise from imperative techniques. In this paper, we present an alternative FRP formulation that is based on the notion of a reactive computation: a monadic computation which may require the occurrence of external events to continue. A signal computation is a reactive computation that may also emit values. In contrast to signals in other FRP formulations, signal computations can end, leading to a monadic interface for sequencing signal phases. This interface has several advantages: routing is implicit, sequencing signal phases is easier and more intuitive than when using the switching combinators found in other FRP approaches, and dynamic lists require much less boilerplate code. In other FRP approaches, either the entire FRP expression is re-evaluated on each external stimulus, or impure techniques are used to prevent redundant re-computations. We show how Monadic FRP can be implemented straightforwardly in a purely functional way while preventing redundant re-computations.
Type de document :
Communication dans un congrès
Shan, C. Proceedings of the ACM SIGPLAN Haskell Symposium , 2013, Unknown, 2013
Liste complète des métadonnées

https://hal.inria.fr/hal-00923382
Contributeur : Tijs Van Der Storm <>
Soumis le : jeudi 2 janvier 2014 - 17:05:44
Dernière modification le : mercredi 29 novembre 2017 - 15:05:44

Identifiants

  • HAL Id : hal-00923382, version 1

Collections

Citation

A. J. Van Der Ploeg. Monadic Functional Reactive Programming. Shan, C. Proceedings of the ACM SIGPLAN Haskell Symposium , 2013, Unknown, 2013. 〈hal-00923382〉

Partager

Métriques

Consultations de la notice

254