The dyna
is functional reactive programming (FRP) library for Haskell.
It implements classical FRP and provides easy to use interface to
write call-back heavy interactive applications. It takes an imperative
definition for event streams as a basis and
granted with Haskell power for abstractions builds elegant DSL on top of it.
Installation
The library can be installed with cabal
from hackage
> cabal install dyna --lib
Also it can be used with stack. We just need to list it in the extra-deps
of the stack.yaml
.
We recommend to start with tutorial on core concepts of the library
and then move on to the domain of your interests. With dyna
we can create animations (see dyna-gloss
or dyna-processing), terminal user interfaces
with dyna-brick.
The Paper
The paper Callback Heaven for FRP offers a good outline of the whole system and concepts behind
the dyna
library.
Dyna core FRP tutorial
- Introduction
- Event streams
- Game example
- Dynamic values
- Main FRP monad
- Control flow. Recursion and sharing
- How to make bindings
- Parser for event streams
- Conclusion
- Quick Reference
- Resources
Resources
- Hackage docs - docs for
dyna
library - Conal Elliott FRP publications - great papers from one of the inventors of FRP concept
- Ivan Perez FRP publications - great papers explainig the FRP concept and arrow style FRP
- Haskell FRP zoo - lists lots of examples in various FRP libraries