Rhine - FRP with type-level clocks

Let signals and streams flow together at the correct speed
Publication status
Work type

This article presents Rhine, an FRP library written in Haskell. Both article and implementation are still work in progress, and expected to be finished somewhere in 2017.


Rhine is a library for synchronous and asynchronous Functional Reactive Programming (FRP). It separates the aspects of clocking, scheduling and resampling from each other, and ensures clock-safety on the type level.

A general-purpose framework is presented that can be used for game development, media applications, GUIs and embedded systems. It offers a flexible API with many reusable components. Side effects can be reasoned about at the type level, allowing for deterministic scheduling.
Through the generality of clocks in Rhine, events and behaviours can be unified, and easily resampled.
Concurrent communication is encapsulated safely.

Diverse reactive subsystems can be combined in a coherent, declarative data flow framework, while the interoperability of the different data rates is guaranteed by type level clocks.

Rhine.pdf447.09 KB