Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- newtype State s a = State (((->) s :. (:*:) s) := a)
- type Stateful s = Adaptable (State s)
- current :: Stateful s t => t s
- modify :: Stateful s t => (s -> s) -> t s
- replace :: Stateful s t => s -> t s
- reconcile :: (Bindable (->) t, Stateful s t, Adaptable u t) => (s -> u s) -> t s
- type Memorable s t = (Covariant (->) (->) t, Pointable t, Stateful s t)
- fold :: (Traversable (->) (->) t, Memorable s u) => (a -> s -> s) -> t a -> u s
Documentation
Effectful computation with a variable
Instances
Monoidal (-->) ((->) :: Type -> Type -> Type) (:*:) (:*:) (State s) Source # | |
Monadic (State s) Source # | |
Semimonoidal (-->) (:*:) (:*:) (State s :: Type -> Type) Source # | |
Invariant (Flip State r) Source # | |
Bindable ((->) :: Type -> Type -> Type) (State s) Source # | |
Interpreted ((->) :: Type -> Type -> Type) (State s) Source # | |
Defined in Pandora.Paradigm.Inventory.State run :: State s a -> Primary (State s) a Source # unite :: Primary (State s) a -> State s a Source # (||=) :: (Semigroupoid (->), Interpreted (->) u) => (Primary (State s) a -> Primary u b) -> State s a -> u b Source # (=||) :: (Semigroupoid (->), Interpreted (->) u) => (State s a -> u b) -> Primary (State s) a -> Primary u b Source # (<$||=) :: (Semigroupoid (->), Covariant (->) (->) j, Interpreted (->) u) => (Primary (State s) a -> Primary u b) -> (j := State s a) -> (j := u b) Source # (<$$||=) :: (Semigroupoid (->), Covariant (->) (->) j, Covariant (->) (->) k, Interpreted (->) u) => (Primary (State s) a -> Primary u b) -> ((j :. k) := State s a) -> ((j :. k) := u b) Source # (<$$$||=) :: (Semigroupoid (->), Covariant (->) (->) j, Covariant (->) (->) k, Covariant (->) (->) l, Interpreted (->) u) => (Primary (State s) a -> Primary u b) -> ((j :. (k :. l)) := State s a) -> ((j :. (k :. l)) := u b) Source # (<$$$$||=) :: (Semigroupoid (->), Covariant (->) (->) j, Covariant (->) (->) k, Covariant (->) (->) l, Covariant (->) (->) n, Interpreted (->) u) => (Primary (State s) a -> Primary u b) -> ((j :. (k :. (l :. n))) := State s a) -> ((j :. (k :. (l :. n))) := u b) Source # (=||$>) :: (Covariant (->) (->) j, Interpreted (->) u) => (State s a -> u b) -> (j := Primary (State s) a) -> (j := Primary u b) Source # (=||$$>) :: (Covariant (->) (->) j, Covariant (->) (->) k, Interpreted (->) u) => (State s a -> u b) -> ((j :. k) := Primary (State s) a) -> ((j :. k) := Primary u b) Source # (=||$$$>) :: (Covariant (->) (->) j, Covariant (->) (->) k, Covariant (->) (->) l, Interpreted (->) u) => (State s a -> u b) -> ((j :. (k :. l)) := Primary (State s) a) -> ((j :. (k :. l)) := Primary u b) Source # (=||$$$$>) :: (Covariant (->) (->) j, Covariant (->) (->) k, Covariant (->) (->) l, Covariant (->) (->) n, Interpreted (->) u) => (State s a -> u b) -> ((j :. (k :. (l :. n))) := Primary (State s) a) -> ((j :. (k :. (l :. n))) := Primary u b) Source # | |
Monad ((->) :: Type -> Type -> Type) (State s) Source # | |
Defined in Pandora.Paradigm.Inventory.State | |
Covariant ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) (State s) Source # | |
Adjoint ((->) :: Type -> Type -> Type) ((->) :: Type -> Type -> Type) (Store s) (State s) Source # | |
type Schematic Monad (State s) Source # | |
type Primary (State s) a Source # | |
fold :: (Traversable (->) (->) t, Memorable s u) => (a -> s -> s) -> t a -> u s Source #