changeset-reflex-0.1.0.3: Stateful monad transformer based on monoidal actions
Safe HaskellNone
LanguageHaskell2010

Control.Monad.Changeset.Reflex

Synopsis

Documentation

data DMapChange (k :: Type -> Type) (f :: Type -> Type) v Source #

A change to a dependent map DMap.

Constructors

Insert (k v) (f v) 
Delete (k v) 

Instances

Instances details
GCompare k => Action (DMapChange k f v) (DMap k f) Source # 
Instance details

Defined in Control.Monad.Changeset.Reflex

Methods

act :: DMapChange k f v -> DMap k f -> DMap k f #

mergeChangesetEvent :: forall t (k :: Type -> Type) w s. (Reflex t, GCompare k, Monoid w) => DMap k (ChangesetT s w (Event t)) -> ChangesetT s w (Event t) (DMap k Identity) Source #

Merge changes from a DMap of ChangesetT computations performing events.

The initial state is the same for every change.

If several change events occur simultaneously, their changes are combined.

type ChangesetEventT t s w (m :: Type -> Type) = ChangesetT s w (Compose m (Event t)) Source #

A functor that creates changes, and performs side effects in m to create an Event.

mergeChangesetEventT :: forall t (k :: Type -> Type) w (m :: Type -> Type) s. (Reflex t, GCompare k, Monoid w, Applicative m) => DMap k (ChangesetEventT t s w m) -> ChangesetEventT t s w m (DMap k Identity) Source #

Like mergeChangesetEvent, but generalised to include m effects.

mergeChangesetMap :: forall t w (m :: Type -> Type) k s a. (Reflex t, Monoid w, Applicative m, Ord k) => Map k (ChangesetEventT t s w m a) -> ChangesetEventT t s w m (Map k a) Source #

Merge a Map of changes

mergeChangesetIntMap :: forall t w (m :: Type -> Type) s a. (Reflex t, Monoid w, Applicative m) => IntMap (ChangesetEventT t s w m a) -> ChangesetEventT t s w m (IntMap a) Source #

Merge an IntMap of changes

mergeChangesetEventTs :: forall t w (m :: Type -> Type) s a. (Reflex t, Monoid w, Applicative m) => [ChangesetEventT t s w m a] -> ChangesetEventT t s w m (NonEmpty a) Source #

Merge a list of changes