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

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

I've done something similar in the monad-classes library [1]; and there's an ongoing series of articles about it [2]. [1]: https://github.com/feuerbach/monad-classes [2]: http://ro-che.info/articles/extensible-effects On 17/11/14 08:37, Fumiaki Kinoshita wrote:
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
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe
participants (2)
-
Fumiaki Kinoshita
-
Roman Cheplyaka