runReddit :: MonadIO m => Options -> RedditT m a -> m (EitherR a)
runReddit opts action = do
  -- Reuse HTTP connection manager between Reddit calls.
  httpManager <- liftIO TLS.getGlobalManager
  let rOpts = (toRedditOptions opts) { connectionManager = Just httpManager }

  -- Optionally stub out Reddit API base URL.
  let withRedditURL = maybe id withBaseURL $ optBaseURL opts
  (mapLeft fst <$>) . runResumeRedditWith rOpts $
    withRedditURL action
runReddit :: MonadIO m => Options -> RedditT m a -> m (EitherR a)
runReddit opts action = do
  -- Reuse HTTP connection manager between Reddit calls.
  httpManager <- liftIO TLS.getGlobalManager
  let rOpts = (toRedditOptions opts) { connectionManager = Just httpManager }

  -- Optionally stub out Reddit API base URL.
  let withRedditURL = maybe id withBaseURL $ optBaseURL opts
  (mapLeft fst <$>) . runResumeRedditWith rOpts $
    withRedditURL action
runReddit opts action = do
  -- Reuse HTTP connection manager between Reddit calls.
  httpManager <- liftIO TLS.getGlobalManager
  let rOpts = (toRedditOptions opts) { connectionManager = Just httpManager }

  -- Optionally stub out Reddit API base URL.
  let withRedditURL = maybe id withBaseURL $ optBaseURL opts
  (mapLeft fst <$>) . runResumeRedditWith rOpts $
    withRedditURL action