-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Immediately lifts to a desired level -- @package elevator @version 0.2.2 -- | Automated effect elevator module Control.Elevator -- | f can be lifted to g type Elevate f g = (Tower g, f ∈ Floors1 g) -- | Lift a thing, automatically. elevate :: Elevate f g => f a -> g a -- | A class of types which have bases. class Tower f where type family Floors (f :: * -> *) :: [* -> *] type instance Floors f = '[Identity] stairs = pure . runIdentity `rung` Nil stairs :: Tower f => Gondola f :* Floors f -- | The parents and itself. type Floors1 f = f : Floors f -- | stairs for Floors1. stairs1 :: Tower f => Gondola f :* Floors1 f -- | Transformation between effects newtype Gondola f g Gondola :: (forall a. g a -> f a) -> Gondola f g runGondola :: Gondola f g -> forall a. g a -> f a -- | Add a new transformation. rung :: (forall x. f x -> g x) -> Gondola g :* fs -> Gondola g :* (f : fs) -- | The extensible product type data (:*) (h :: k -> *) (s :: [k]) :: (k -> *) -> [k] -> * Nil :: (:*) k h ([] k) -- | Combine products. (*++*) :: (:*) k h xs -> (:*) k h ys -> (:*) k h ((++) k xs ys) mapGondolas :: (forall x. m x -> n x) -> Gondola m :* xs -> Gondola n :* xs liftGondolas :: (Monad m, Tower m, MonadTrans t) => Gondola (t m) :* Floors1 m instance (Error e, Monad m, Tower m) => Tower (ErrorT e m) instance (Monad m, Tower m, Monoid w) => Tower (RWST r w s m) instance (Monad m, Tower m, Monoid w) => Tower (RWST r w s m) instance (Monad m, Tower m) => Tower (ListT m) instance (Monad m, Tower m) => Tower (MaybeT m) instance (Monoid w, Monad m, Tower m) => Tower (WriterT w m) instance (Monoid w, Monad m, Tower m) => Tower (WriterT w m) instance (Monad m, Tower m) => Tower (ReaderT r m) instance (Monad m, Tower m) => Tower (StateT s m) instance (Monad m, Tower m) => Tower (StateT s m) instance Forall Functor xs => Tower (League xs) instance Generate xs => Tower (Union xs) instance Tower (ST s) instance Tower [] instance Tower ((->) r) instance Tower (Either e) instance Tower Maybe instance Tower Identity instance Tower IO