reflex-dynamic-containers-0.1.0.0: various dynamic containers for Reflex

Copyright(C) 2020 Peter Lu
Licensesee the file LICENSE
Maintainerpdlla <chippermonky@gmail.com>
Stabilityexperimental
Safe HaskellNone
LanguageHaskell2010

Reflex.Data.ActionStack

Description

A dynamic structure intended for modelling action stacks for undo/redo. Internally, it is represented as two stacks: "done" and "undone". Redo/undo moves the top element from one stack to another. New do events add elements to the "done" stack and clears the "undone" stack.

Synopsis

Documentation

data ActionStack t a Source #

Constructors

ActionStack 

Fields

actionStack_makeDoSelector :: (GCompare k, Reflex t) => ActionStack t (DSum k Identity) -> k a -> Event t a Source #

helper method for ActionStacks that use DSum to represent actions

actionStack_makeUndoSelector :: (GCompare k, Reflex t) => ActionStack t (DSum k Identity) -> k a -> Event t a Source #

helper method for ActionStacks that use DSum to represent actions

data ActionStackConfig t a Source #

Constructors

ActionStackConfig 

Fields

holdActionStack :: forall t m a. (Reflex t, MonadHold t m, MonadFix m) => ActionStackConfig t a -> m (ActionStack t a) Source #