ema-0.10.0.0: Static site generator library with hot reload
Safe HaskellSafe-Inferred
LanguageHaskell2010

Ema.Dynamic

Synopsis

Documentation

newtype Dynamic m a Source #

A time-varying value of type a, changing under monad m.

To create a Dynamic, supply the initial value along with a function that forever updates it using the given monadic update function.

Dynamic's can be composed using Applicative.

Constructors

Dynamic (a, (a -> m ()) -> m ()) 

Instances

Instances details
(MonadUnliftIO m, MonadLogger m) => Applicative (Dynamic m) Source # 
Instance details

Defined in Ema.Dynamic

Methods

pure :: a -> Dynamic m a #

(<*>) :: Dynamic m (a -> b) -> Dynamic m a -> Dynamic m b #

liftA2 :: (a -> b -> c) -> Dynamic m a -> Dynamic m b -> Dynamic m c #

(*>) :: Dynamic m a -> Dynamic m b -> Dynamic m b #

(<*) :: Dynamic m a -> Dynamic m b -> Dynamic m a #

Functor (Dynamic m) Source # 
Instance details

Defined in Ema.Dynamic

Methods

fmap :: (a -> b) -> Dynamic m a -> Dynamic m b #

(<$) :: a -> Dynamic m b -> Dynamic m a #