forked from loafle/openapi-generator-original
[haskell-http-client] fixes for GHC 9 (#10400)
- update stack/deps to LTS 18.10 for ghc-8.10.7 - fixes for GHC 9 - update samples
This commit is contained in:
@@ -78,7 +78,7 @@ data MimeError =
|
||||
MimeError {
|
||||
mimeError :: String -- ^ unrender/parser error
|
||||
, mimeErrorResponse :: NH.Response BCL.ByteString -- ^ http response
|
||||
} deriving (Eq, Show)
|
||||
} deriving (Show)
|
||||
|
||||
-- | send a request returning the 'MimeResult'
|
||||
dispatchMime
|
||||
@@ -207,11 +207,11 @@ modifyInitRequestM (InitRequest req) f = fmap InitRequest (f req)
|
||||
-- | Run a block using the configured logger instance
|
||||
runConfigLog
|
||||
:: P.MonadIO m
|
||||
=> OpenAPIPetstoreConfig -> LogExec m
|
||||
=> OpenAPIPetstoreConfig -> LogExec m a
|
||||
runConfigLog config = configLogExecWithContext config (configLogContext config)
|
||||
|
||||
-- | Run a block using the configured logger instance (logs exceptions)
|
||||
runConfigLogWithExceptions
|
||||
:: (E.MonadCatch m, P.MonadIO m)
|
||||
=> T.Text -> OpenAPIPetstoreConfig -> LogExec m
|
||||
=> T.Text -> OpenAPIPetstoreConfig -> LogExec m a
|
||||
runConfigLogWithExceptions src config = runConfigLog config . logExceptions src
|
||||
|
||||
@@ -44,6 +44,7 @@ import qualified Data.CaseInsensitive as CI
|
||||
import qualified Data.Data as P (Data, Typeable, TypeRep, typeRep)
|
||||
import qualified Data.Foldable as P
|
||||
import qualified Data.Ix as P
|
||||
import qualified Data.Kind as K (Type)
|
||||
import qualified Data.Maybe as P
|
||||
import qualified Data.Proxy as P (Proxy(..))
|
||||
import qualified Data.Text as T
|
||||
@@ -55,9 +56,9 @@ import qualified Lens.Micro as L
|
||||
import qualified Network.HTTP.Client.MultipartFormData as NH
|
||||
import qualified Network.HTTP.Types as NH
|
||||
import qualified Prelude as P
|
||||
import qualified Text.Printf as T
|
||||
import qualified Web.FormUrlEncoded as WH
|
||||
import qualified Web.HttpApiData as WH
|
||||
import qualified Text.Printf as T
|
||||
|
||||
import Control.Applicative ((<|>))
|
||||
import Control.Applicative (Alternative)
|
||||
@@ -560,4 +561,4 @@ _showBinaryBase64 = T.decodeUtf8 . BL.toStrict . BL64.encode . unBinary
|
||||
-- * Lens Type Aliases
|
||||
|
||||
type Lens_' s a = Lens_ s s a a
|
||||
type Lens_ s t a b = forall (f :: * -> *). Functor f => (a -> f b) -> s -> f t
|
||||
type Lens_ s t a b = forall (f :: K.Type -> K.Type). Functor f => (a -> f b) -> s -> f t
|
||||
|
||||
@@ -34,11 +34,11 @@ import qualified Katip as LG
|
||||
-- * Type Aliases (for compatibility)
|
||||
|
||||
-- | Runs a Katip logging block with the Log environment
|
||||
type LogExecWithContext = forall m. P.MonadIO m =>
|
||||
LogContext -> LogExec m
|
||||
type LogExecWithContext = forall m a. P.MonadIO m =>
|
||||
LogContext -> LogExec m a
|
||||
|
||||
-- | A Katip logging block
|
||||
type LogExec m = forall a. LG.KatipT m a -> m a
|
||||
type LogExec m a = LG.KatipT m a -> m a
|
||||
|
||||
-- | A Katip Log environment
|
||||
type LogContext = LG.LogEnv
|
||||
|
||||
@@ -24,7 +24,6 @@ import qualified Control.Monad.IO.Class as P
|
||||
import qualified Data.Text as T
|
||||
import qualified Data.Time as TI
|
||||
|
||||
import Data.Monoid ((<>))
|
||||
import Data.Text (Text)
|
||||
|
||||
import qualified Control.Monad.Logger as LG
|
||||
@@ -32,11 +31,11 @@ import qualified Control.Monad.Logger as LG
|
||||
-- * Type Aliases (for compatibility)
|
||||
|
||||
-- | Runs a monad-logger block with the filter predicate
|
||||
type LogExecWithContext = forall m. P.MonadIO m =>
|
||||
LogContext -> LogExec m
|
||||
type LogExecWithContext = forall m a. P.MonadIO m =>
|
||||
LogContext -> LogExec m a
|
||||
|
||||
-- | A monad-logger block
|
||||
type LogExec m = forall a. LG.LoggingT m a -> m a
|
||||
type LogExec m a = LG.LoggingT m a -> m a
|
||||
|
||||
-- | A monad-logger filter predicate
|
||||
type LogContext = LG.LogSource -> LG.LogLevel -> Bool
|
||||
|
||||
Reference in New Issue
Block a user