elevator-0.2: Immediately lifts to a desired level

Copyright(c) Fumiaki Kinoshita 2014
LicenseBSD3
MaintainerFumiaki Kinoshita <fumiexcel@gmail.com>
Stabilityexperimental
Portabilitynon-portable
Safe HaskellNone
LanguageHaskell2010

Control.Elevator

Description

Automated effect elevator

Synopsis

Documentation

rung :: (forall x. f x -> g x) -> (Gondola g :* fs) -> Gondola g :* (f : fs) infixr 0 Source

newtype Gondola f g Source

Constructors

Gondola 

Fields

runGondola :: forall a. g a -> f a
 

class Tower f where Source

A class of types which have bases.

Minimal complete definition

Nothing

Associated Types

type Floors f :: [* -> *] Source

Methods

stairs :: Gondola f :* Floors f Source

The product of all ways to lift.

Instances

Tower [] 
Tower IO 
Tower Maybe 
Tower Identity 
Tower ((->) r) 
Tower (Either e) 
Tower (ST s) 
Forall (* -> *) Functor xs => Tower (League xs) 
Generate (* -> *) xs => Tower (Union xs) 
(Monad m, Tower m) => Tower (MaybeT m) 
(Monad m, Tower m) => Tower (ListT m) 
(Monoid w, Monad m, Tower m) => Tower (WriterT w m) 
(Monoid w, Monad m, Tower m) => Tower (WriterT w m) 
(Monad m, Tower m) => Tower (ExceptT e m) 
(Monad m, Tower m) => Tower (StateT s m) 
(Monad m, Tower m) => Tower (StateT s m) 
(Monad m, Tower m) => Tower (ReaderT r m) 

type Floors1 f = f : Floors f Source

The parents and itself.

type Elevate f g = (Tower g, f Floors1 g) Source

f can be lifted to g

elevate :: Elevate f g => f a -> g a Source

Lift a thing, automatically.