netwire-5.0.2: Functional reactive programming library

FRP.Netwire

Description

Synopsis

# Netwire reexports

data Wire s e m a b Source #

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

Instances

 Monad m => Category * (Wire s e m) Source # Methodsid :: cat a a #(.) :: cat b c -> cat a b -> cat a c # Monad m => Arrow (Wire s e m) Source # Methodsarr :: (b -> c) -> Wire s e m b c #first :: Wire s e m b c -> Wire s e m (b, d) (c, d) #second :: Wire s e m b c -> Wire s e m (d, b) (d, c) #(***) :: Wire s e m b c -> Wire s e m b' c' -> Wire s e m (b, b') (c, c') #(&&&) :: Wire s e m b c -> Wire s e m b c' -> Wire s e m b (c, c') # (Monad m, Monoid e) => ArrowZero (Wire s e m) Source # MethodszeroArrow :: Wire s e m b c # (Monad m, Monoid e) => ArrowPlus (Wire s e m) Source # Methods(<+>) :: Wire s e m b c -> Wire s e m b c -> Wire s e m b c # (Monad m, Monoid e) => ArrowChoice (Wire s e m) Source # Methodsleft :: Wire s e m b c -> Wire s e m (Either b d) (Either c d) #right :: Wire s e m b c -> Wire s e m (Either d b) (Either d c) #(+++) :: Wire s e m b c -> Wire s e m b' c' -> Wire s e m (Either b b') (Either c c') #(|||) :: Wire s e m b d -> Wire s e m c d -> Wire s e m (Either b c) d # MonadFix m => ArrowLoop (Wire s e m) Source # Methodsloop :: Wire s e m (b, d) (c, d) -> Wire s e m b c # (Monad m, Monoid e) => Choice (Wire s e m) Source # Methodsleft' :: Wire s e m a b -> Wire s e m (Either a c) (Either b c) #right' :: Wire s e m a b -> Wire s e m (Either c a) (Either c b) # (Monad m, Monoid e) => Strong (Wire s e m) Source # Methodsfirst' :: Wire s e m a b -> Wire s e m (a, c) (b, c) #second' :: Wire s e m a b -> Wire s e m (c, a) (c, b) # Monad m => Profunctor (Wire s e m) Source # Methodsdimap :: (a -> b) -> (c -> d) -> Wire s e m b c -> Wire s e m a d #lmap :: (a -> b) -> Wire s e m b c -> Wire s e m a c #rmap :: (b -> c) -> Wire s e m a b -> Wire s e m a c #(#.) :: Coercible * c b => (b -> c) -> Wire s e m a b -> Wire s e m a c #(.#) :: Coercible * b a => Wire s e m b c -> (a -> b) -> Wire s e m a c # Monad m => Functor (Wire s e m a) Source # Methodsfmap :: (a -> b) -> Wire s e m a a -> Wire s e m a b #(<\$) :: a -> Wire s e m a b -> Wire s e m a a # Monad m => Applicative (Wire s e m a) Source # Methodspure :: a -> Wire s e m a a #(<*>) :: Wire s e m a (a -> b) -> Wire s e m a a -> Wire s e m a b #(*>) :: Wire s e m a a -> Wire s e m a b -> Wire s e m a b #(<*) :: Wire s e m a a -> Wire s e m a b -> Wire s e m a a # (Monad m, Monoid e) => Alternative (Wire s e m a) Source # Methodsempty :: Wire s e m a a #(<|>) :: Wire s e m a a -> Wire s e m a a -> Wire s e m a a #some :: Wire s e m a a -> Wire s e m a [a] #many :: Wire s e m a a -> Wire s e m a [a] # (Monad m, Floating b) => Floating (Wire s e m a b) Source # Methodspi :: Wire s e m a b #exp :: Wire s e m a b -> Wire s e m a b #log :: Wire s e m a b -> Wire s e m a b #sqrt :: Wire s e m a b -> Wire s e m a b #(**) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #logBase :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #sin :: Wire s e m a b -> Wire s e m a b #cos :: Wire s e m a b -> Wire s e m a b #tan :: Wire s e m a b -> Wire s e m a b #asin :: Wire s e m a b -> Wire s e m a b #acos :: Wire s e m a b -> Wire s e m a b #atan :: Wire s e m a b -> Wire s e m a b #sinh :: Wire s e m a b -> Wire s e m a b #cosh :: Wire s e m a b -> Wire s e m a b #tanh :: Wire s e m a b -> Wire s e m a b #asinh :: Wire s e m a b -> Wire s e m a b #acosh :: Wire s e m a b -> Wire s e m a b #atanh :: Wire s e m a b -> Wire s e m a b #log1p :: Wire s e m a b -> Wire s e m a b #expm1 :: Wire s e m a b -> Wire s e m a b #log1pexp :: Wire s e m a b -> Wire s e m a b #log1mexp :: Wire s e m a b -> Wire s e m a b # (Monad m, Fractional b) => Fractional (Wire s e m a b) Source # Methods(/) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #recip :: Wire s e m a b -> Wire s e m a b #fromRational :: Rational -> Wire s e m a b # (Monad m, Num b) => Num (Wire s e m a b) Source # Methods(+) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #(-) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #(*) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #negate :: Wire s e m a b -> Wire s e m a b #abs :: Wire s e m a b -> Wire s e m a b #signum :: Wire s e m a b -> Wire s e m a b #fromInteger :: Integer -> Wire s e m a b # (Monad m, IsString b) => IsString (Wire s e m a b) Source # MethodsfromString :: String -> Wire s e m a b # (Monad m, Semigroup b) => Semigroup (Wire s e m a b) Source # Methods(<>) :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #sconcat :: NonEmpty (Wire s e m a b) -> Wire s e m a b #stimes :: Integral b => b -> Wire s e m a b -> Wire s e m a b # (Monad m, Monoid b) => Monoid (Wire s e m a b) Source # Methodsmempty :: Wire s e m a b #mappend :: Wire s e m a b -> Wire s e m a b -> Wire s e m a b #mconcat :: [Wire s e m a b] -> Wire s e m a b #

type WireP s e = Wire s e Identity Source #

Pure wires.

Simple wires with time.

delay :: 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 :: 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 :: 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 :: NFData a => Wire s e m a a Source #

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

• Depends: now.