The dunai package

[ Tags: bsd3, frp, library, reactivity ] [ Propose Tags ]

Dunai is a DSL for strongly-typed CPS-based composable transformations.

Dunai is based on a concept of Monadic Stream Functions (MSFs). MSFs are transformations defined by a function unMSF :: MSF m a b -> a -> m (b, MSF m a b) that executes one step of a simulation, and produces an output in a monadic context, and a continuation to be used for future steps.

MSFs are a generalisation of the implementation mechanism used by Yampa, Wormholes and other FRP and reactive implementations.

When combined with different monads, they produce interesting effects. For example, when combined with the Maybe monad, they become transformations that may stop producing outputs (and continuations). The Either monad gives rise to MSFs that end with a result (akin to Tasks in Yampa, and Monadic FRP).

Flattening, that is, going from some structure MSF (t m) a b to MSF m a b for a specific transformer t often gives rise to known FRP constructs. For instance, flattening with EitherT gives rise to switching, and flattening with ListT gives rise to parallelism with broadcasting.

MSFs can be used to implement many FRP variants, including Arrowized FRP, Classic FRP, and plain reactive programming. Arrowized and applicative syntax are both supported.

For a very detailed introduction to MSFs, see: http://dl.acm.org/citation.cfm?id=2976010 (mirror: http://www.cs.nott.ac.uk/~psxip1/#FRPRefactored).

Properties

Versions 0.0.1.0, 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.3.0.0, 0.4.0.0
Dependencies base (>=4.6 && <5), MonadRandom, transformers, transformers-base [details]
License BSD3
Author Ivan Perez, Manuel Bärenz
Maintainer ivan.perez@keera.co.uk
Category Reactivity, FRP
Home page https://github.com/ivanperez-keera/dunai
Source repository head: git clone git@github.com:ivanperez-keera/dunai.git
Uploaded Mon Dec 4 12:51:49 UTC 2017 by keera_studios_ci
Distributions NixOS:0.4.0.0
Downloads 952 total (671 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2017-12-04 [all 1 reports]
Hackage Matrix CI

Modules

[Index]

Flags

NameDescriptionDefaultType
test-hlint

Enable hlint test suite

DisabledManual
test-doc-coverage

Enable haddock coverage test suite

DisabledManual

Use -f <flag> to enable a flag, or -f -<flag> to disable that flag. More info

Downloads

Maintainer's Corner

For package maintainers and hackage trustees