dunai: Generalised reactive framework supporting classic, arrowized and monadic FRP.

[ bsd3, frp, library, reactivity ] [ Propose Tags ]
This version is deprecated.

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).

Modules

[Last Documentation]

  • Control
    • Monad
      • Trans
        • Control.Monad.Trans.MSF
          • Control.Monad.Trans.MSF.Except
          • Control.Monad.Trans.MSF.List
          • Control.Monad.Trans.MSF.Maybe
          • Control.Monad.Trans.MSF.RWS
          • Control.Monad.Trans.MSF.Random
          • Control.Monad.Trans.MSF.Reader
          • Control.Monad.Trans.MSF.State
          • Control.Monad.Trans.MSF.Writer
  • Data
    • Data.MonadicStreamFunction
      • Data.MonadicStreamFunction.Async
      • Data.MonadicStreamFunction.Core
      • Instances
        • Data.MonadicStreamFunction.Instances.ArrowChoice
        • Data.MonadicStreamFunction.Instances.ArrowLoop
        • Data.MonadicStreamFunction.Instances.ArrowPlus
        • Data.MonadicStreamFunction.Instances.Num
        • Data.MonadicStreamFunction.Instances.VectorSpace
      • Data.MonadicStreamFunction.InternalCore
      • Data.MonadicStreamFunction.Parallel
      • Data.MonadicStreamFunction.ReactHandle
      • Data.MonadicStreamFunction.Util

Flags

Manual Flags

NameDescriptionDefault
test-hlint

Enable hlint test suite

Disabled
test-doc-coverage

Enable haddock coverage test suite

Disabled

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

Downloads

Note: This package has metadata revisions in the cabal description newer than included in the tarball. To unpack the package including the revisions, use 'cabal get'.

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.0.1.0, 0.1.0.0, 0.1.1.0, 0.2.0.0, 0.3.0.0, 0.4.0.0, 0.5, 0.5.1, 0.5.2, 0.5.2.1, 0.6.0, 0.7.0, 0.8.0, 0.8.1, 0.8.2, 0.8.3, 0.9.0, 0.9.1, 0.9.2, 0.10.0, 0.10.1, 0.11.0, 0.11.1, 0.11.2, 0.12.0, 0.12.1, 0.12.2, 0.12.3 (info)
Change log CHANGELOG
Dependencies base (>=4.6 && <5), MonadRandom (>=0.2 && <0.7), simple-affine-space (>=0.2 && <0.3), transformers (>=0.3 && <0.7), transformers-base (>=0.4 && <0.5), transformers-compat, void [details]
License BSD-3-Clause
Copyright Copyright (c) 2016 - Ivan Perez and Manuel Bärenz
Author Ivan Perez, Manuel Bärenz
Maintainer ivan.perez@keera.co.uk
Revised Revision 1 made by IvanPerez at 2023-02-22T02:34:20Z
Category Reactivity, FRP
Home page https://github.com/ivanperez-keera/dunai
Source repo head: git clone git@github.com:ivanperez-keera/dunai.git(dunai)
Uploaded by IvanPerez at 2023-02-22T02:23:58Z
Distributions
Reverse Dependencies 7 direct, 3 indirect [details]
Downloads 9997 total (126 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2023-02-22 [all 2 reports]