| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Control.Monad.Ology.General.Trans.Tunnel
Synopsis
- class (MonadTransHoist t, MonadInner (Tunnel t)) => MonadTransTunnel (t :: TransKind) where
- tunnelHoist :: forall (t :: TransKind) (m1 :: Type -> Type) (m2 :: Type -> Type). (MonadTransTunnel t, Monad m1, Monad m2) => (m1 --> m2) -> t m1 --> t m2
- hoistWith :: forall t m1 m2 f r. (MonadTransTunnel t, Traversable f, Monad m1, Monad m2) => (forall a. m1 a -> m2 (f a)) -> t m1 r -> t m2 (f r)
- backHoist :: forall (t :: TransKind) (ma :: Type -> Type) (mb :: Type -> Type). (MonadTransTunnel t, Monad ma, Monad mb) => (ma -/-> mb) -> t ma -/-> t mb
- wBackHoist :: forall (t :: TransKind) (ma :: Type -> Type) (mb :: Type -> Type). (MonadTransTunnel t, Monad ma, Monad mb) => WBackraised ma mb -> WBackraised (t ma) (t mb)
- commuteTWith :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => (forall r. Tunnel tb (Tunnel ta r) -> Tunnel ta (Tunnel tb r)) -> ta (tb m) --> tb (ta m)
- commuteT :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => ta (tb m) --> tb (ta m)
- commuteTBack :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => ta (tb m) -/-> tb (ta m)
- class (MonadHoistIO m, MonadInner (TunnelIO m)) => MonadTunnelIO (m :: Type -> Type) where
- hoistWithIO :: (MonadTunnelIO m, Traversable f) => (forall a. IO a -> IO (f a)) -> m r -> m (f r)
Documentation
class (MonadTransHoist t, MonadInner (Tunnel t)) => MonadTransTunnel (t :: TransKind) where Source #
Monad transformers that allow "tunneling" (working with the monad under the transformer).
Associated Types
type Tunnel (t :: TransKind) :: Type -> Type Source #
The tunnel monad of this transformer.
Methods
tunnel :: Monad m => ((forall (m1 :: Type -> Type) a. Monad m1 => t m1 a -> m1 (Tunnel t a)) -> m (Tunnel t r)) -> t m r Source #
Instances
tunnelHoist :: forall (t :: TransKind) (m1 :: Type -> Type) (m2 :: Type -> Type). (MonadTransTunnel t, Monad m1, Monad m2) => (m1 --> m2) -> t m1 --> t m2 Source #
hoistWith :: forall t m1 m2 f r. (MonadTransTunnel t, Traversable f, Monad m1, Monad m2) => (forall a. m1 a -> m2 (f a)) -> t m1 r -> t m2 (f r) Source #
backHoist :: forall (t :: TransKind) (ma :: Type -> Type) (mb :: Type -> Type). (MonadTransTunnel t, Monad ma, Monad mb) => (ma -/-> mb) -> t ma -/-> t mb Source #
wBackHoist :: forall (t :: TransKind) (ma :: Type -> Type) (mb :: Type -> Type). (MonadTransTunnel t, Monad ma, Monad mb) => WBackraised ma mb -> WBackraised (t ma) (t mb) Source #
commuteTWith :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => (forall r. Tunnel tb (Tunnel ta r) -> Tunnel ta (Tunnel tb r)) -> ta (tb m) --> tb (ta m) Source #
Commute two transformers in a transformer stack, by commuting their tunnel monads.
commuteT :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => ta (tb m) --> tb (ta m) Source #
Commute two transformers in a transformer stack.
commuteTBack :: forall (ta :: TransKind) (tb :: TransKind) (m :: Type -> Type). (MonadTransTunnel ta, MonadTransTunnel tb, Monad m) => ta (tb m) -/-> tb (ta m) Source #
class (MonadHoistIO m, MonadInner (TunnelIO m)) => MonadTunnelIO (m :: Type -> Type) where Source #
Instances
| MonadTunnelIO IO Source # | |||||
| (MonadTransTunnel t, MonadTunnelIO m, MonadIO (t m)) => MonadTunnelIO (t m) Source # | |||||
Defined in Control.Monad.Ology.General.Trans.Tunnel Associated Types
| |||||
hoistWithIO :: (MonadTunnelIO m, Traversable f) => (forall a. IO a -> IO (f a)) -> m r -> m (f r) Source #