on master help sign in
Add a recommendation where to define ‘MonadHttp’
commitc4e48b6f284b533c4b602e7e70747e3a75c2b976 authormrkkrp <markkarpov@opmbx.org> dateSat 5 Nov 2016, 23:53 (10 years ago) parent96642d2
1 file changed+3
Network/HTTP/Req.hs+3
Network/HTTP/Req.hs+3
@@ -306,6 +306,9 @@ globalManager = unsafePerformIO $ do
306306--
307307-- To use 'req' in your monad, all you need to do is to make the monad an
308308-- instance of the 'MonadHttp' type class.
309+--
310+-- When writing a library, keep your API polymorphic in terms of
311+-- 'MonadHttp', only define instance of 'MonadHttp' in final application.
309312
310313-- | A type class for monads that support performing HTTP requests.
311314-- Typically, you only need to define the 'handleHttpException' method