@InProceedings{asyncrattus,
  author = {Bahr, Patrick
and Houlborg, Emil
and Rørdam, Gregers Thomas Skat},
  editor = {Gebser, Martin
and Sergey, Ilya},
  title = {Asynchronous Reactive Programming with Modal Types in Haskell},
  booktitle = {Practical Aspects of Declarative Languages},
  year = {2024},
  publisher = {Springer Nature Switzerland},
  pages = {18--36},
  isbn = {978-3-031-52038-9},
  url = {https://link.springer.com/chapter/10.1007/978-3-031-52038-9_2},
  doi = {10.1007/978-3-031-52038-9_2},
  abstract = {The implementation of asynchronous systems, in particular graphical
  user interfaces, is traditionally based on an imperative model that
  uses shared mutable state and callbacks. While efficient, the
  combination of shared mutable state and callbacks is notoriously
  difficult to reason about and prone to errors. Functional reactive
  programming (FRP) provides an elegant alternative and recent
  theoretical advances in modal FRP suggest that it can be efficient
  as well.

  In this paper, we present \textsf{Async Rattus}, an FRP language embedded in
  Haskell. The distinguishing feature of \textsf{Async Rattus} is a modal type
  constructor that enables the composition of asynchronous subsystems
  by keeping track of each subsystem's clock at compile time which in
  turn enables dynamically changing clocks at runtime. The central
  component of our implementation is a Haskell compiler plugin that,
  among other aspects, checks the stricter typing rules of
  \textsf{Async Rattus} and infers compile-time clocks. This is the first
  implementation of an asynchronous modal FRP language. By embedding
  the language in Haskell we can exploit the existing language and
  library ecosystem as well as rapidly experiment with new language
  features and library design. We hope that such experimentation with
  \textsf{Async Rattus} sparks further research in modal FRP and its
  applications.
},
  month = jan,
  keywords = {functional reactive programming, modal types, type systems, Haskell}
}