Summary
In this chapter, we have worked with three different approaches to FRP: Elerea, with its safe monadic interface and discrete-only signals; Yampa and its first-class signal functions; and finally, Reactive-banana and its safe and simple hybrid semantics. Implementation differences are rather radical, but the theoretical FRP basis is still the same: model values as functions of time and include discrete events. It's also characteristic that interaction with the outside world, input and output, is more or less separated from application logic. Recursion is an important technique in FRP. For proper value recursion of monadically retrieved values in Haskell, the MonadFix
class along with mfix
or RecursiveDo
is a must and often encountered in Haskell FRP code.
The next and final chapter will comprise a collection of robust, extensively tested and production-ready Haskell libraries for more different and less general use. It's an unfortunate fact in the Haskell ecosystem that...