Stability | experimtal |
---|---|
Safe Haskell | None |
Language | Haskell2010 |
Containment module for stores that are experimental/too weird for Apecs.Stores
.
Synopsis
- newtype Pushdown s c = Pushdown (s (Stack c))
- newtype Stack c = Stack {
- getStack :: [c]
- newtype ReadOnly s = ReadOnly s
- setReadOnly :: forall w m s c. (Has w m c, Storage c ~ ReadOnly s, Elem s ~ c, ExplSet m s) => Entity -> c -> SystemT w m ()
- destroyReadOnly :: forall w m s c. (Has w m c, Storage c ~ ReadOnly s, Elem s ~ c, ExplDestroy m s) => Entity -> Proxy c -> SystemT w m ()
Documentation
Overrides a store to have history/pushdown semantics.
Setting this store adds a new value on top of the stack.
Destroying pops the stack.
You can view the entire stack using the Stack c
component.
Instances
(Monad m, ExplMembers m (s (Stack c)), Elem (s (Stack c)) ~ Stack c) => ExplMembers m (Pushdown s c) Source # | |
Defined in Apecs.Stores.Extra | |
(Monad m, ExplGet m (s (Stack c)), ExplSet m (s (Stack c)), ExplDestroy m (s (Stack c)), Elem (s (Stack c)) ~ Stack c) => ExplDestroy m (Pushdown s c) Source # | |
Defined in Apecs.Stores.Extra explDestroy :: Pushdown s c -> Int -> m () Source # | |
(Monad m, ExplGet m (s (Stack c)), ExplSet m (s (Stack c)), Elem (s (Stack c)) ~ Stack c) => ExplSet m (Pushdown s c) Source # | |
(Monad m, ExplGet m (s (Stack c)), Elem (s (Stack c)) ~ Stack c) => ExplGet m (Pushdown s c) Source # | |
(Functor m, ExplInit m (s (Stack c))) => ExplInit m (Pushdown s c) Source # | |
Defined in Apecs.Stores.Extra | |
type Elem (Pushdown s c) Source # | |
Defined in Apecs.Stores.Extra |
Wrapper that makes a store read-only. Use setReadOnly
and destroyReadOnly
to override.
ReadOnly s |
Instances
ExplMembers m s => ExplMembers m (ReadOnly s) Source # | |
Defined in Apecs.Stores.Extra | |
ExplGet m s => ExplGet m (ReadOnly s) Source # | |
(Functor m, ExplInit m s) => ExplInit m (ReadOnly s) Source # | |
Defined in Apecs.Stores.Extra | |
type Elem (ReadOnly s) Source # | |
Defined in Apecs.Stores.Extra |