@@ -29,7 +29,7 @@ import Network.HTTP.Conduit
30-- | The environment containing the parameters required to make Google requests.
30-- | The environment containing the parameters required to make Google requests.
31data Env (s :: [Symbol]) = Env
31data Env (s :: [Symbol]) = Env
32− { _envOverride :: !(Dual (Endo Service))
32+ { _envOverride :: !(Dual (Endo ServiceConfig))
33 , _envLogger :: !Logger
33 , _envLogger :: !Logger
34 , _envManager :: !Manager
34 , _envManager :: !Manager
35 , _envStore :: !(Store s)
35 , _envStore :: !(Store s)
@@ -68,7 +68,7 @@ instance HasEnv s (Env s) where
68-- To override a specific service, it's suggested you use
68-- To override a specific service, it's suggested you use
69-- either 'configure' or 'reconfigure' with a modified version of the default
69-- either 'configure' or 'reconfigure' with a modified version of the default
70-- service, such as @Network.Google.Gmail.gmailService@.
70-- service, such as @Network.Google.Gmail.gmailService@.
71−override :: HasEnv s a => (Service -> Service) -> a -> a
71+override :: HasEnv s a => (Service -> ServiceConfig) -> a -> a
72override f = envOverride <>~ Dual (Endo f)
72override f = envOverride <>~ Dual (Endo f)
74-- | Configure a specific service. All requests belonging to the
74-- | Configure a specific service. All requests belonging to the
@@ -78,7 +78,7 @@ override f = envOverride <>~ Dual (Endo f)
78-- as @Network.Google.Gmail.gmailService@.
78-- as @Network.Google.Gmail.gmailService@.
80-- /See:/ 'reconfigure'.
80-- /See:/ 'reconfigure'.
81−configure :: HasEnv s a => Service -> a -> a
81+configure :: HasEnv s a => ServiceConfig -> a -> a
82configure s = override f
82configure s = override f
84 f x | on (==) _svcId s x = s
84 f x | on (==) _svcId s x = s
@@ -91,7 +91,7 @@ configure s = override f
91-- as @Network.Google.Gmail.gmailService@.
91-- as @Network.Google.Gmail.gmailService@.
93-- /See:/ 'configure'.
93-- /See:/ 'configure'.
94−reconfigure :: (MonadReader r m, HasEnv s r) => Service -> m a -> m a
94+reconfigure :: (MonadReader r m, HasEnv s r) => ServiceConfig -> m a -> m a
95reconfigure = local . configure
95reconfigure = local . configure
97-- | Scope an action such that any HTTP response will use this timeout value.
97-- | Scope an action such that any HTTP response will use this timeout value.