graphql-engine/server/src-lib/Network/HTTP/Client/Extended.hs
Antoine Leblanc 3948ca84da server: RQL code health
This PR is a combination of the following other PRs:
- #169: move HasHttpManager out of RQL.Types
- #170: move UserInfoM to Hasura.Session
- #179: delete dead code from RQL.Types
- #180: move event related code to EventTrigger

GitOrigin-RevId: d97608d7945f2c7a0a37e307369983653eb62eb1
2021-01-08 23:10:36 +00:00

24 lines
823 B
Haskell

module Network.HTTP.Client.Extended
( HasHttpManagerM(..)
, module HTTP
) where
import Control.Monad.Except
import Control.Monad.Reader
import Control.Monad.State.Strict
import Control.Monad.Writer.Strict
import Network.HTTP.Client as HTTP
class (Monad m) => HasHttpManagerM m where
askHttpManager :: m HTTP.Manager
instance (HasHttpManagerM m) => HasHttpManagerM (ExceptT e m) where
askHttpManager = lift askHttpManager
instance (HasHttpManagerM m) => HasHttpManagerM (ReaderT r m) where
askHttpManager = lift askHttpManager
instance (HasHttpManagerM m) => HasHttpManagerM (StateT s m) where
askHttpManager = lift askHttpManager
instance (Monoid w, HasHttpManagerM m) => HasHttpManagerM (WriterT w m) where
askHttpManager = lift askHttpManager