The original formulation of functional reactive programming can be found in the ICFP 97 paper Functional Reactive Animation by Conal Elliott and Paul Hudak. FRP has taken many forms since its introduction in 1997. One axis of diversity is discrete vs. continuous semantics. Another axis is how FRP systems can be changed dynamically.
Continuous
The earliest formulation of FRP used continuous semantics, aiming to abstract over many operational details that are not important to the meaning of a program. The key properties of this formulation are:
Modeling values that vary over continuous time, called "behaviors" and later "signals".
Modeling "events" which have occurrences at discrete points in time.
The system can be changed in response to events, generally termed "switching."
The separation of evaluation details such as sampling rate from the reactive model.
Formulations such as Event-Driven FRP and versions of Elm prior to 0.17 require that updates are discrete and event-driven. These formulations have pushed for practical FRP, focusing on semantics that have a simple API that can be implemented efficiently in a setting such as robotics or in a web-browser. In these formulations, it is common that the ideas of behaviors and events are combined into signals that always have a current value, but change discretely.
Interactive FRP
It has been pointed out that the ordinary FRP model, from inputs to outputs, is poorly suited to interactive programs. Lacking the ability to "run" programs within a mapping from inputs to outputs may mean one of the following solutions has to be used:
Create a data structure of actions which appear as the outputs. The actions must be run by an external interpreter or environment. This inherits all of the difficulties of the original stream I/O system of Haskell.
Use Arrowized FRP and embed arrows which are capable of performing actions. The actions may also have identities, which allows them to maintain separate mutable stores for example. This is the approach taken by the Fudgets library and, more generally, Monadic Stream Functions.
The novel approach is to allow actions to be run now but defer the receipt of their results until later. This makes use of an interaction between the Event and IO monads, and is compatible with a more expression-oriented FRP:
planNow :: Event -> IO
Implementation issues
There are two types of FRP systems, push-based and pull-based. Push-based systems take events and push them through a signal network to achieve a result. Pull-based systems wait until the result is demanded, and work backwards through the network to retrieve the value demanded. Some FRP systems such as Yampa use sampling, where samples are pulled by the signal network. This approach has a drawback: the network has to wait up to the duration of one computation step to find out about changes to the input. Sampling is an example of pull-based FRP. The Reactive and Etage libraries on Hackage introduced an approach called push-pull FRP. In this approach, only when the next event on a purely defined stream is demanded, that event is constructed. These purely defined streams act like lazy lists in Haskell. That is the pull-based half. The push-based half is used when events external to the system are brought in. The external events are pushed to consumers, so that they can find out about an event the instant it is issued.
Implementations
is an arrowized, efficient, pure Haskell implementation with SDL, SDL2, OpenGL and HTML DOM support.
The programming language Elm used to support FRP but has since replaced it with a different pattern
is an efficient push/pull FRP implementation in Haskell with hosts for browser/DOM, SDL and Gloss.
is a target agnostic push FRP implementation in Haskell.
and are arrowized, pull FRP implementations in Haskell.
is an OCaml module for functional reactive programming.
is a push FRP implementation independent of a specific UI framework for several programming languages, such as Java, TypeScript and C#.
ReactiveX, popularized by its JavaScript implementation , is a comprehensive cross-platform paradigm for implementing functional reactive programming by treating data as streams of observables.
is a fast implementation in Haskell using Monadic Stream Functions that supports Classic and Arrowized FRP.
Use in industry
Functional reactive programming has been used to create mobile applications for Android and iOS.