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
wrapper.
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 |
Instances
Monad Stack Source # | |
Functor Stack Source # | |
Applicative Stack Source # | |
Foldable Stack Source # | |
Defined in Apecs.Stores.Extra fold :: Monoid m => Stack m -> m # foldMap :: Monoid m => (a -> m) -> Stack a -> m # foldr :: (a -> b -> b) -> b -> Stack a -> b # foldr' :: (a -> b -> b) -> b -> Stack a -> b # foldl :: (b -> a -> b) -> b -> Stack a -> b # foldl' :: (b -> a -> b) -> b -> Stack a -> b # foldr1 :: (a -> a -> a) -> Stack a -> a # foldl1 :: (a -> a -> a) -> Stack a -> a # elem :: Eq a => a -> Stack a -> Bool # maximum :: Ord a => Stack a -> a # minimum :: Ord a => Stack a -> a # | |
(Storage c ~ Pushdown s c, Has w m c) => Has w m (Stack c) Source # | |
Eq c => Eq (Stack c) Source # | |
Show c => Show (Stack c) Source # | |
Semigroup (Stack c) Source # | |
Monoid (Stack c) Source # | |
(Storage c ~ Pushdown s c, Component c) => Component (Stack c) Source # | |
type Storage (Stack 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 |