-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | Immediately lifts to a desired level
--
@package elevator
@version 0.2.3
-- | 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 :: k -> *) (g :: k -> *) :: (k -> *) -> (k -> *) -> *
Gondola :: (forall (a :: k). g a -> f a) -> Gondola
runGondola :: Gondola -> forall (a :: k). g a -> f a
-- | Add a new transformation.
rung :: (forall (x :: k). f x -> g x) -> (:*) (k -> *) (Gondola k g) fs -> (:*) (k -> *) (Gondola k g) ((:) (k -> *) f fs)
-- | The type of extensible products.
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
newtype Union (xs :: [k -> *]) (a :: k) :: [k -> *] -> k -> *
Union :: (:|) (k -> *) (K1 k a) xs -> Union
getUnion :: Union -> (:|) (k -> *) (K1 k a) xs
reunion :: (:*) (k -> *) (Gondola k m) xs -> Union k xs a -> m a
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 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