| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Proarrow.Promonad.State
Documentation
pattern State :: forall {k} a b s. (Monoidal k, Ob s) => (Ob a, Ob b) => ((s ** a) ~> (s ** b)) -> State s a b Source Github #
newtype StateT (s :: k) (p :: k +-> k) (a :: k) (b :: k) where Source Github #
Constructors
| StateT :: forall {k} (s :: k) (p :: k +-> k) (a :: k) (b :: k). ((Reader ('OP s) :.: p) :.: Writer s) a b -> StateT s p a b |
Instances
| (Strong k p, Ob s, SelfAction k) => Strong k (StateT s p :: k -> k -> Type) Source Github # | |
| (SymMonoidal k, Ob s) => MonoidalProfunctor (State s :: k -> k -> Type) Source Github # | Note: This is only premonoidal, not monoidal. |
| (Profunctor p, Monoidal k, Ob s) => Profunctor (StateT s p :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Promonad.State Methods dimap :: forall (c :: k) (a :: k) (b :: k) (d :: k). (c ~> a) -> (b ~> d) -> StateT s p a b -> StateT s p c d Source Github # lmap :: forall (c :: k) (a :: k) (b :: k). (c ~> a) -> StateT s p a b -> StateT s p c b Source Github # rmap :: forall (b :: k) (d :: k) (a :: k). (b ~> d) -> StateT s p a b -> StateT s p a d Source Github # (\\) :: forall (a :: k) (b :: k) r. ((Ob a, Ob b) => r) -> StateT s p a b -> r Source Github # | |
| (Corepresentable p, Ob s, SelfAction k, CompactClosed k) => Corepresentable (StateT s p :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Promonad.State Methods coindex :: forall (a :: k) (b :: k). StateT s p a b -> (StateT s p %% a) ~> b Source Github # cotabulate :: forall (a :: k) (b :: k). Ob a => ((StateT s p %% a) ~> b) -> StateT s p a b Source Github # corepMap :: forall (a :: k) (b :: k). (a ~> b) -> (StateT s p %% a) ~> (StateT s p %% b) Source Github # trivialCorep :: forall (a :: k). Ob a => StateT s p a (StateT s p %% a) Source Github # | |
| (Representable p, Ob s, SymMonoidal k, Closed k) => Representable (StateT s p :: k -> k -> Type) Source Github # | |
Defined in Proarrow.Promonad.State Methods index :: forall (a :: k) (b :: k). StateT s p a b -> a ~> (StateT s p % b) Source Github # tabulate :: forall (b :: k) (a :: k). Ob b => (a ~> (StateT s p % b)) -> StateT s p a b Source Github # repMap :: forall (a :: k) (b :: k). (a ~> b) -> (StateT s p % a) ~> (StateT s p % b) Source Github # trivialRep :: forall (a :: k). Ob a => StateT s p (StateT s p % a) a Source Github # | |
| (Ob s, SelfAction k, Strong k p, Promonad p) => Promonad (StateT s p :: k -> k -> Type) Source Github # | |
| (Monoidal k, Ob s) => Functor (StateT s :: (k +-> k) -> k -> k -> Type) Source Github # | |
| type (StateT s p :: k -> k -> Type) %% (a :: k) Source Github # | |
| type (StateT s p :: k -> k -> Type) % (a :: k) Source Github # | |
runStateT :: forall {k} p (s :: k) (a :: k) (b :: k). Profunctor p => StateT s p a b -> p (s ** a) (s ** b) Source Github #