[Haskell-cafe] [ANN] elevator: getting to a top of a monad transformer stack

Fumiaki Kinoshita fumiexcel at gmail.com
Mon Nov 17 06:37:47 UTC 2014


Hello everybody,

I created an elevator to navigate a monad transformer stack, liberating us
from creating a Monad* class and instances.

The key function, elevate, can be whatever you need:

elevate :: IO a -> IO a

elevate :: IO a -> StateT s IO a

elevate :: State s a -> StateT s IO a

elevate :: IO a -> MaybeT (StateT s IO) a

If you want to elevate actions above your monad, just write

instance Tower YourMonad

to declare that YourMonad is one-storied.

Hackage:
http://hackage.haskell.org/package/elevator-0.1/docs/Control-Elevator.html

Cheers

Fumiaki Kinoshita
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141117/e0435828/attachment.html>


More information about the Haskell-Cafe mailing list