netwire-5.0.3: Functional reactive programming library

Copyright | (c) 2013 Ertugrul Soeylemez
License | BSD3
Maintainer | Ertugrul Soeylemez <es@ertes.de>
Safe Haskell | None
Language | Haskell2010

FRP.Netwire

Contents

- Netwire reexports
- Additional wires
- External

Description

Synopsis

- data Wire s e (m :: Type -> Type) a b
- type WireP s e = Wire s e Identity
- type SimpleWire = Wire (Timed NominalDiffTime ()) () Identity
- delay :: forall a s e (m :: Type -> Type). a -> Wire s e m a a
- evalWith :: forall a s e (m :: Type -> Type). Strategy a -> Wire s e m a a
- force :: forall s e (m :: Type -> Type) a. Wire s e m a a
- forceNF :: forall a s e (m :: Type -> Type). NFData a => Wire s e m a a
- module Control.Wire.Event
- module Control.Wire.Interval
- module Control.Wire.Run
- module Control.Wire.Session
- module Control.Wire.Switch
- module Control.Wire.Time
- module FRP.Netwire.Analyze
- module FRP.Netwire.Move
- module FRP.Netwire.Noise
- module Control.Applicative
- module Control.Arrow
- module Control.Category
- module Data.Semigroup

# Netwire reexports

data Wire s e (m :: Type -> Type) a b Source #

A wire is a signal function. It maps a reactive value to another reactive value.

#### Instances

Instances details

Monad m => Category (Wire s e m :: Type -> Type -> Type) Source # |
Instance details Defined in Control.Wire.Core Methods id :: Wire s e m a a Source # (.) :: Wire s e m b c -> Wire s e m a b -> Wire s e m a c Source #
Monad m => Arrow (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods arr :: (b -> c) -> Wire s e m b c Source # first :: Wire s e m b c -> Wire s e m (b, d) (c, d) Source # second :: Wire s e m b c -> Wire s e m (d, b) (d, c) Source # (***) :: Wire s e m b c -> Wire s e m b' c' -> Wire s e m (b, b') (c, c') Source # (&&&) :: Wire s e m b c -> Wire s e m b c' -> Wire s e m b (c, c') Source #
(Monad m, Monoid e) => ArrowChoice (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods left :: Wire s e m b c -> Wire s e m (Either b d) (Either c d) Source # right :: Wire s e m b c -> Wire s e m (Either d b) (Either d c) Source # (+++) :: Wire s e m b c -> Wire s e m b' c' -> Wire s e m (Either b b') (Either c c') Source # (|||) :: Wire s e m b d -> Wire s e m c d -> Wire s e m (Either b c) d Source #
MonadFix m => ArrowLoop (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods loop :: Wire s e m (b, d) (c, d) -> Wire s e m b c Source #
(Monad m, Monoid e) => ArrowPlus (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods (<+>) :: Wire s e m b c -> Wire s e m b c -> Wire s e m b c Source #
(Monad m, Monoid e) => ArrowZero (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods zeroArrow :: Wire s e m b c Source #
(Monad m, Monoid e) => Choice (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods left' :: Wire s e m a b -> Wire s e m (Either a c) (Either b c) Source # right' :: Wire s e m a b -> Wire s e m (Either c a) (Either c b) Source #
(Monad m, Monoid e) => Strong (Wire s e m) Source # |
Instance details Defined in Control.Wire.Core Methods first' :: Wire s e m a b -> Wire s e m (a, c) (b, c) Source # second' :: Wire s e m a b -> Wire s e m (c, a) (c, b) Source #
Monad m => Profunctor (Wire s e m) Source # |

Instance details

Defined in Control.Wire.Core

Methods

dimap :: (a -> b) -> (c -> d) -> Wire s e m b c -> Wire s e m a d Source #

lmap :: (a -> b) -> Wire s e m b c -> Wire s e m a c Source #

rmap :: (b -> c) -> Wire s e m a b -> Wire s e m a c Source #

(#.) :: forall a b c q. Coercible c b => q b c -> Wire s e m a b -> Wire s e m a c Source #

(.#) :: forall a b c q. Coercible b a => Wire s e m b c -> q a b -> Wire s e m a c Source #

(Monad m, Monoid e) => Alternative (Wire s e m a) Source # |
Instance details Defined in Control.Wire.Core Methods empty :: Wire s e m a a0 Source # (<|>) :: Wire s e m a a0 -> Wire s e m a a0 -> Wire s e m a a0 Source # some :: Wire s e m a a0 -> Wire s e m a [a0] Source # many :: Wire s e m a a0 -> Wire s e m a [a0] Source #
Monad m => Applicative (Wire s e m a) Source # |
Instance details Defined in Control.Wire.Core Methods pure :: a0 -> Wire s e m a a0 Source # (<*>) :: Wire s e m a (a0 -> b) -> Wire s e m a a0 -> Wire s e m a b Source # liftA2 :: (a0 -> b -> c) -> Wire s e m a a0 -> Wire s e m a b -> Wire s e m a c Source # (*>) :: Wire s e m a a0 -> Wire s e m a b -> Wire s e m a b Source # (<*) :: Wire s e m a a0 -> Wire s e m a b -> Wire s e m a a0 Source #
Monad m => Functor (Wire s e m a) Source # |
Instance details Defined in Control.Wire.Core Methods fmap :: (a0 -> b) -> Wire s e m a a0 -> Wire s e m a b Source # (<$) :: a0 -> Wire s e m a b -> Wire s e m a a0 Source #
(Monad m, Monoid b) => Monoid (Wire s e m a b) Source # |
Instance details Defined in Control.Wire.Core Methods mempty :: Wire s e m a b Source # mappend :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source # mconcat :: [Wire s e m a b] -> Wire s e m a b Source #
(Monad m, Semigroup b) => Semigroup (Wire s e m a b) Source # |
Instance details Defined in Control.Wire.Core Methods (<>) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source # sconcat :: NonEmpty (Wire s e m a b) -> Wire s e m a b Source # stimes :: Integral b0 => b0 -> Wire s e m a b -> Wire s e m a b Source #
(Monad m, IsString b) => IsString (Wire s e m a b) Source # |
Instance details Defined in Control.Wire.Core Methods fromString :: String -> Wire s e m a b Source #
(Monad m, Floating b) => Floating (Wire s e m a b) Source # |

Instance details

Defined in Control.Wire.Core

Methods

pi :: Wire s e m a b Source #

exp :: Wire s e m a b -> Wire s e m a b Source #

log :: Wire s e m a b -> Wire s e m a b Source #

sqrt :: Wire s e m a b -> Wire s e m a b Source #

(**) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source #

logBase :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source #

sin :: Wire s e m a b -> Wire s e m a b Source #

cos :: Wire s e m a b -> Wire s e m a b Source #

tan :: Wire s e m a b -> Wire s e m a b Source #

asin :: Wire s e m a b -> Wire s e m a b Source #

acos :: Wire s e m a b -> Wire s e m a b Source #

atan :: Wire s e m a b -> Wire s e m a b Source #

sinh :: Wire s e m a b -> Wire s e m a b Source #

cosh :: Wire s e m a b -> Wire s e m a b Source #

tanh :: Wire s e m a b -> Wire s e m a b Source #

asinh :: Wire s e m a b -> Wire s e m a b Source #

acosh :: Wire s e m a b -> Wire s e m a b Source #

atanh :: Wire s e m a b -> Wire s e m a b Source #

log1p :: Wire s e m a b -> Wire s e m a b Source #

expm1 :: Wire s e m a b -> Wire s e m a b Source #

log1pexp :: Wire s e m a b -> Wire s e m a b Source #

log1mexp :: Wire s e m a b -> Wire s e m a b Source #

(Monad m, Num b) => Num (Wire s e m a b) Source # |

Instance details

Defined in Control.Wire.Core

Methods

(+) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source #

(-) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source #

(*) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source #

negate :: Wire s e m a b -> Wire s e m a b Source #

abs :: Wire s e m a b -> Wire s e m a b Source #

signum :: Wire s e m a b -> Wire s e m a b Source #

fromInteger :: Integer -> Wire s e m a b Source #

(Monad m, Fractional b) => Fractional (Wire s e m a b) Source # |
Instance details Defined in Control.Wire.Core Methods (/) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b Source # recip :: Wire s e m a b -> Wire s e m a b Source # fromRational :: Rational -> Wire s e m a b Source #

type WireP s e = Wire s e Identity Source #

Pure wires.

type SimpleWire = Wire (Timed NominalDiffTime ()) () Identity Source #

Simple wires with time.

delay :: forall a s e (m :: Type -> Type). a -> Wire s e m a a Source #

This wire delays its input signal by the smallest possible (semantically infinitesimal) amount of time. You can use it when you want to use feedback (`ArrowLoop`): If the user of the feedback depends on now, delay the value before feeding it back. The argument value is the replacement signal at the beginning.

- Depends: before now.

evalWith :: forall a s e (m :: Type -> Type). Strategy a -> Wire s e m a a Source #

Evaluate the input signal using the given `Strategy` here. This wire evaluates only produced values.

- Depends: now.

force :: forall s e (m :: Type -> Type) a. Wire s e m a a Source #

Force the input signal to WHNF here. This wire forces both produced values and inhibition values.

- Depends: now.

forceNF :: forall a s e (m :: Type -> Type). NFData a => Wire s e m a a Source #

Force the input signal to NF here. This wire forces only produced values.

- Depends: now.

module Control.Wire.Event

module Control.Wire.Interval

module Control.Wire.Run

module Control.Wire.Session

module Control.Wire.Switch

module Control.Wire.Time

# Additional wires

module FRP.Netwire.Analyze

module FRP.Netwire.Move

module FRP.Netwire.Noise

# External

module Control.Applicative

module Control.Arrow

module Control.Category

module Data.Semigroup