indexed-state-0.0.2: Indexed State
Safe HaskellSafe-Inferred
LanguageHaskell2010

Control.Monad.State.Profunctor.IxState

Documentation

newtype IxStateT f t s a Source #

Constructors

IxStateT (s -> f (a, t)) 

Instances

Instances details
(Monoid t, Monad f) => Category (IxStateT f t :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

id :: forall (a :: k). IxStateT f t a a #

(.) :: forall (b :: k) (c :: k) (a :: k). IxStateT f t b c -> IxStateT f t a b -> IxStateT f t a c #

(Semigroup t, Bind f) => Semigroupoid (IxStateT f t :: Type -> Type -> Type) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

o :: forall (j :: k) (k1 :: k) (i :: k). IxStateT f t j k1 -> IxStateT f t i j -> IxStateT f t i k1 #

MonadError r f => MonadError r (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

throwError :: r -> IxStateT f s s a #

catchError :: IxStateT f s s a -> (r -> IxStateT f s s a) -> IxStateT f s s a #

MonadReader r f => MonadReader r (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

ask :: IxStateT f s s r #

local :: (r -> r) -> IxStateT f s s a -> IxStateT f s s a #

reader :: (r -> a) -> IxStateT f s s a #

Monad f => MonadState s (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

get :: IxStateT f s s s #

put :: s -> IxStateT f s s () #

state :: (s -> (a, s)) -> IxStateT f s s a #

MonadWriter r f => MonadWriter r (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

writer :: (a, r) -> IxStateT f s s a #

tell :: r -> IxStateT f s s () #

listen :: IxStateT f s s a -> IxStateT f s s (a, r) #

pass :: IxStateT f s s (a, r -> r) -> IxStateT f s s a #

(Monoid t, Applicative f) => Choice (IxStateT f t) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

left' :: IxStateT f t a b -> IxStateT f t (Either a c) (Either b c) #

right' :: IxStateT f t a b -> IxStateT f t (Either c a) (Either c b) #

Functor f => Strong (IxStateT f t) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

first' :: IxStateT f t a b -> IxStateT f t (a, c) (b, c) #

second' :: IxStateT f t a b -> IxStateT f t (c, a) (c, b) #

Functor f => Profunctor (IxStateT f t) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

dimap :: (a -> b) -> (c -> d) -> IxStateT f t b c -> IxStateT f t a d #

lmap :: (a -> b) -> IxStateT f t b c -> IxStateT f t a c #

rmap :: (b -> c) -> IxStateT f t a b -> IxStateT f t a c #

(#.) :: forall a b c q. Coercible c b => q b c -> IxStateT f t a b -> IxStateT f t a c #

(.#) :: forall a b c q. Coercible b a => IxStateT f t b c -> q a b -> IxStateT f t a c #

MonadFix f => MonadFix (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

mfix :: (a -> IxStateT f s s a) -> IxStateT f s s a #

MonadIO f => MonadIO (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

liftIO :: IO a -> IxStateT f s s a #

Monad f => Applicative (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

pure :: a -> IxStateT f s s a #

(<*>) :: IxStateT f s s (a -> b) -> IxStateT f s s a -> IxStateT f s s b #

liftA2 :: (a -> b -> c) -> IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s c #

(*>) :: IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s b #

(<*) :: IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s a #

Functor f => Functor (IxStateT f t s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

fmap :: (a -> b) -> IxStateT f t s a -> IxStateT f t s b #

(<$) :: a -> IxStateT f t s b -> IxStateT f t s a #

Monad f => Monad (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

(>>=) :: IxStateT f s s a -> (a -> IxStateT f s s b) -> IxStateT f s s b #

(>>) :: IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s b #

return :: a -> IxStateT f s s a #

MonadCont f => MonadCont (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

callCC :: ((a -> IxStateT f s s b) -> IxStateT f s s a) -> IxStateT f s s a #

Monad f => Apply (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

(<.>) :: IxStateT f s s (a -> b) -> IxStateT f s s a -> IxStateT f s s b #

(.>) :: IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s b #

(<.) :: IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s a #

liftF2 :: (a -> b -> c) -> IxStateT f s s a -> IxStateT f s s b -> IxStateT f s s c #

Monad f => Bind (IxStateT f s s) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Methods

(>>-) :: IxStateT f s s a -> (a -> IxStateT f s s b) -> IxStateT f s s b #

join :: IxStateT f s s (IxStateT f s s a) -> IxStateT f s s a #

Wrapped (IxStateT f t s a) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

Associated Types

type Unwrapped (IxStateT f t s a) #

Methods

_Wrapped' :: Iso' (IxStateT f t s a) (Unwrapped (IxStateT f t s a)) #

IxStateT f t s a ~ x => Rewrapped (IxStateT f' t' s' a') x Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

type Unwrapped (IxStateT f t s a) Source # 
Instance details

Defined in Control.Monad.State.Profunctor.IxState

type Unwrapped (IxStateT f t s a) = s -> f (a, t)

type IxState t s a = IxStateT Identity t s a Source #

ixState :: Iso (IxState t s a) (IxState t s a) (s -> (a, t)) (s -> (a, t)) Source #

swap :: (Functor f, Functor f') => Iso (IxStateT f t s a) (IxStateT f' t' s' a') (IxStateT f a s t) (IxStateT f' a' s' t') Source #

lift :: Functor f => f a -> IxStateT f s s a Source #