Maintainer | Ertugrul Soeylemez <es@ertes.de> |
---|
Arrowized FRP implementation for networking applications. The aim of this library is to provide a convenient FRP implementation, which should enable you to write entirely pure network sessions.
- data Wire
- type Event = Maybe
- type Output = Either SomeException
- type Time = Double
- data Session a b
- stepWire :: a -> Session a b -> IO (Output b)
- stepWireDelta :: NominalDiffTime -> a -> Session a b -> IO (Output b)
- stepWireTime :: UTCTime -> a -> Session a b -> IO (Output b)
- withWire :: Wire IO a b -> (Session a b -> IO c) -> IO c
- type SF = Wire Identity
- stepSF :: Time -> a -> SF a b -> (Output b, SF a b)
- stepWirePure :: Monad m => Time -> a -> Wire m a b -> m (Output b, Wire m a b)
- module FRP.NetWire.Analyze
- module FRP.NetWire.Calculus
- module FRP.NetWire.Concurrent
- module FRP.NetWire.Event
- module FRP.NetWire.IO
- module FRP.NetWire.Random
- module FRP.NetWire.Request
- module FRP.NetWire.Switch
- module FRP.NetWire.Tools
- module Data.Functor.Identity
Wires
A wire is a network of signal transformers.
Events are signals, which can be absent. They usually denote discrete occurences of certain events.
type Output = Either SomeExceptionSource
The output of a wire. When the wire inhibits, then this will be a
Left
value with an exception.
Reactive sessions
stepWire :: a -> Session a b -> IO (Output b)Source
Feed the given input value into the reactive system performing the next instant using real time.
stepWireDelta :: NominalDiffTime -> a -> Session a b -> IO (Output b)Source
Feed the given input value into the reactive system performing the next instant using the given time delta.
stepWireTime :: UTCTime -> a -> Session a b -> IO (Output b)Source
Feed the given input value into the reactive system performing the next instant, which is at the given time. This function is thread-safe.
withWire :: Wire IO a b -> (Session a b -> IO c) -> IO cSource
Initialize a reactive session and pass it to the given continuation.
Pure wires
stepSF :: Time -> a -> SF a b -> (Output b, SF a b)Source
Perform the next instant of a pure wire over the identity monad.
stepWirePure :: Monad m => Time -> a -> Wire m a b -> m (Output b, Wire m a b)Source
Perform the next instant of a pure wire.
Netwire Reexports
module FRP.NetWire.Analyze
module FRP.NetWire.Calculus
module FRP.NetWire.Concurrent
module FRP.NetWire.Event
module FRP.NetWire.IO
module FRP.NetWire.Random
module FRP.NetWire.Request
module FRP.NetWire.Switch
module FRP.NetWire.Tools
Other convenience reexports
module Data.Functor.Identity