Safe Haskell | None |
---|---|
Language | Haskell2010 |
Deprecated: Use hoistServer or hoistServerWithContext from servant-server
Synopsis
- class (Entered m n typ ~ ret, Entered n m ret ~ typ) => Enter typ m n ret | typ m n -> ret, ret m n -> typ, ret typ m -> n, ret typ n -> m where
- type family Entered m n api where ...
- liftNat :: (MonadTrans t, Monad m) => m :~> t m
- runReaderTNat :: r -> ReaderT r m :~> m
- evalStateTLNat :: Monad m => s -> StateT s m :~> m
- evalStateTSNat :: Monad m => s -> StateT s m :~> m
- logWriterTSNat :: MonadIO m => (w -> IO ()) -> WriterT w m :~> m
- logWriterTLNat :: MonadIO m => (w -> IO ()) -> WriterT w m :~> m
- hoistNat :: (MFunctor t, Monad m) => (m :~> n) -> t m :~> t n
- embedNat :: (MMonad t, Monad n) => (m :~> t n) -> t m :~> t n
- squashNat :: (Monad m, MMonad t) => t (t m) :~> t m
- generalizeNat :: Applicative m => Identity :~> m
- newtype (f :: k -> *) :~> (g :: k -> *) :: forall k. (k -> *) -> (k -> *) -> * = NT {}
Documentation
class (Entered m n typ ~ ret, Entered n m ret ~ typ) => Enter typ m n ret | typ m n -> ret, ret m n -> typ, ret typ m -> n, ret typ n -> m where Source #
Instances
(Entered m n (m a) ~ n a, Entered n m (n a) ~ m a) => Enter (m a) m n (n a) Source # | |
Defined in Servant.Utils.Enter | |
(Enter typ m n ret, Entered m n (a -> typ) ~ (a -> ret), Entered n m (a -> ret) ~ (a -> typ)) => Enter (a -> typ) m n (a -> ret) Source # | |
Defined in Servant.Utils.Enter | |
(Enter typ1 m1 n1 ret1, Enter typ2 m2 n2 ret2, m1 ~ m2, n1 ~ n2, Entered m1 n1 (typ1 :<|> typ2) ~ (ret1 :<|> ret2), Entered n1 m1 (ret1 :<|> ret2) ~ (typ1 :<|> typ2)) => Enter (typ1 :<|> typ2) m1 n1 (ret1 :<|> ret2) Source # | |
(Entered m n (Tagged m a) ~ Tagged n a, Entered n m (Tagged n a) ~ Tagged m a) => Enter (Tagged m a) m n (Tagged n a) Source # | |
runReaderTNat :: r -> ReaderT r m :~> m Source #
logWriterTSNat :: MonadIO m => (w -> IO ()) -> WriterT w m :~> m Source #
Log the contents of WriterT
with the function provided as the
first argument, and return the value of the WriterT
computation
logWriterTLNat :: MonadIO m => (w -> IO ()) -> WriterT w m :~> m Source #
Like logWriterTSNat
, but for lazy WriterT
.
generalizeNat :: Applicative m => Identity :~> m Source #
Like mmorph
's generalize
.
natural-transformation re-exports
newtype (f :: k -> *) :~> (g :: k -> *) :: forall k. (k -> *) -> (k -> *) -> * infixr 0 #
A natural transformation suitable for storing in a container.