Domain-specific language embedded in Haskell for programming hybrid (mixed discrete-time and continuous-time) systems. Yampa is based on the concepts of Functional Reactive Programming (FRP) and is structured using arrow combinators.
This is a new version of Yampa. Although the old API is mainly respected, the code has been reorganised to facilitate understanding and documentation. The API is not fully backwards compatible, but most projects should work without changes or with minimal adaptations. If that is not the case, please let us know. Also, if you are FRP savvy, please take a look around and tell us whether there's anything you'd change. The documentation is available at: http://ivanperez-keera.github.io/haddock/Yampa/FRP-Yampa.html
Yampa is available on hackage: http://hackage.haskell.org/package/Yampa.
$ cabal sandbox init # Optional, but recommended
$ cabal update
$ cabal install Yampa
There are many programs written in Yampa. See the following examples:
- Haskanoid: a game that uses SDL multimedia, wiimote and kinect. https://github.com/ivanperez-keera/haskanoid http://hackage.haskell.org/package/haskanoid
- Space invaders: a demonstration game used for a paper. https://hackage.haskell.org/package/SpaceInvaders
- Frag: a 3D first person shooting game. https://hackage.haskell.org/package/frag
A more comprehensive list can be obtained using the reverse dependency finder (http://packdeps.haskellers.com/reverse/Yampa), but only programs uploaded to hackage are listed.
Yampa is backend agnostic, you can ultimately connect it to any backend you want. Existing backends include:
- SDL
- OpenGL / GLUT
- WX (see wxHaskell)
- Keera Studios is using it for several Haskell games for Android including a game currently available on Google Play. See:
The distribution of Yampa comes with subtantial haddock documentation, which you can build using haddock or just read online. To build a local copy, do:
$ cabal unpack Yampa ## Or git clone this-repo
$ cd Yampa-*
$ cabal init
$ cabal install --only-dependencies
$ cabal configure && cabal haddock --internal
Documentation is also available online: https://wiki.haskell.org/Yampa
For a list of Yampa-related papers, see:
See also PhD technical report, chapter 3. http://www.cs.nott.ac.uk/~ixp/ which includes a review of FRP and outlines some existing issues.
You can collaborate at least in three ways:
-
File an issue (https://github.com/ivanperez-keera/Yampa/issues).
-
Write documentation (send a link and/or a pull request).
-
Research: we are constantly trying to improve Yampa. We'd be glad to have collaborators. If you are working on this, please, let us know.
(Interactivity and FRP is the main topic of my (ongoing) PhD studies, so I'll keep working on this for quite some time. -- Ivan Perez)
- Henrik Nilsson
- Antony Courtney
- Ivan Perez