MonadBaseControl and mapServerT

7 views
Skip to first unread message

Gracjan Polak

unread,
Jan 3, 2015, 6:53:06 AM1/3/15
to ha...@googlegroups.com
Hi,

I recently discovered goodies provided by monad-control and try to use it everywhere it makes sense. Right now I'm stuck at trying to lift simpleHTTP properly.

Current type of simpleHTTP:

simpleHTTP :: ToMessage a => Conf -> ServerPartT IO a -> IO ()

Expected type of simpleHTTPLifted:

simpleHTTPLifted :: (MonadBaseControl IO m, ToMessage a)
                 => Conf -> ServerPartT m a -> m ()

I know how to create a lifted version for each and every one of my monads, but there are quite many of them so a generalization would be welcome! How to do it?

More info in my stackoverflow question:

http://stackoverflow.com/questions/27733699/monadbasecontrol-how-to-lift-simplehttp-from-happstack

--
Gracjan
Reply all
Reply to author
Forward
0 new messages