I\'m using the servant library for my JSON API. I need some help to get a ServerT MyAPI (ReaderT a IO) monad stack working.
servant
ServerT MyAPI (ReaderT a IO)
Here\'s an example
Recent versions of servant have simplified this a lot. See Using a custom monad in the servant cookbook.
nt :: State -> AppM a -> Handler a nt s x = runReaderT x s app :: State -> Application app s = serve api $ hoistServer api (nt s) server