Practical principled FRP: forget the past, change the future, FRPNow!

We present a new interface for practical Functional Reactive Programming (FRP) that (1) is close in spirit to the original FRP ideas, (2) does not have the original space-leak problems, without using arrows or advanced types, and (3) provides a simple and expressive way for performing IO actions from FRP code. We also provide a denotational semantics for this new interface, and a technique (using Kripke logical relations) for reasoning about which FRP functions may "forget their past", i.e. which functions do not have an inherent space-leak. Finally, we show how we have implemented this interface as a Haskell library called FRPNow.

[1]  Gergely Patai,et al.  Efficient and Compositional Higher-Order Streams , 2010, WFLP.

[2]  Nicolas Halbwachs,et al.  LUSTRE: a declarative language for real-time programming , 1987, POPL '87.

[3]  Gérard Berry,et al.  The Esterel Synchronous Programming Language: Design, Semantics, Implementation , 1992, Sci. Comput. Program..

[4]  Simon L. Peyton Jones,et al.  Lazy functional state threads , 1994, PLDI '94.

[5]  Stephen Chong,et al.  Asynchronous functional reactive programming for GUIs , 2013, PLDI.

[6]  Simon L. Peyton Jones,et al.  Stretching the Storage Manager: Weak Pointers and Stable Names in Haskell , 1999, IFL.

[7]  Atze van der Ploeg Monadic functional reactive programming , 2013, Haskell '13.

[8]  Paul Hudak,et al.  Lambda in Motion: Controlling Robots with Haskell , 1999, PADL.

[9]  Henrik Nilsson,et al.  Functional reactive programming, continued , 2002, Haskell '02.

[10]  Paul Hudak,et al.  Functional reactive animation , 1997, ICFP '97.

[11]  Conal Elliott,et al.  Push-pull functional reactive programming , 2009, Haskell.

[12]  Marc Pouzet Lucid Synchrone: tutorial and reference manual , 2001 .

[13]  Conor McBride,et al.  Applicative programming with effects , 2008, J. Funct. Program..

[14]  Paul Hudak,et al.  Virtualizing Real-World Objects in FRP , 2012, PADL.

[15]  Simon Peyton Jones,et al.  A monad for deterministic parallelism , 2012 .

[16]  Wolfgang Jeltsch Signals, Not Generators! , 2009, Trends in Functional Programming.

[17]  Marc Pouzet,et al.  Towards a higher-order synchronous data-flow language , 2004, EMSOFT '04.

[18]  Neelakantan R. Krishnaswami,et al.  Higher-order functional reactive programming without spacetime leaks , 2013, ICFP.

[19]  Simon Peyton Jones,et al.  Tackling the Awkward Squad: monadic input/output, concurrency, exceptions, and foreign-language calls in Haskell , 2005 .

[20]  Antony Courtney,et al.  Genuinely Functional User Interfaces , 2001 .