on master help sign in
Bump mrkkrp/ormolu-action from 9 to 10

Bumps [mrkkrp/ormolu-action](https://github.com/mrkkrp/ormolu-action) from 9 to 10. - [Release notes](https://github.com/mrkkrp/ormolu-action/releases) - [Changelog](https://github.com/mrkkrp/ormolu-action/blob/master/CHANGELOG.md) - [Commits](https://github.com/mrkkrp/ormolu-action/compare/v9...v10) --- updated-dependencies: - dependency-name: mrkkrp/ormolu-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>

commit4ec1f7bf87ce70ddb2f88126e9e817d3b05c994f authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> dateMon 13 Feb 2023, 21:17 (4 years ago) parentac3e2e0
4 files changed+31−31
.github/workflows/ci.yaml+1−1 Network/HTTP/Req.hs+28−28 httpbin-tests/Network/HTTP/ReqSpec.hs+1−1 pure-tests/Network/HTTP/ReqSpec.hs+1−1
.github/workflows/ci.yaml+1−1
@@ -12,7 +12,7 @@ jobs:
1212 runs-on: ubuntu-latest
1313 steps:
1414 - uses: actions/checkout@v3
15− - uses: mrkkrp/ormolu-action@v9
15+ - uses: mrkkrp/ormolu-action@v10
1616 build:
1717 runs-on: ubuntu-latest
1818 needs: ormolu
Network/HTTP/Req.hs+28−28
@@ -498,7 +498,7 @@ reqCb method url body responseProxy options adjustRequest =
498498--
499499-- @since 3.7.0
500500reqHandler ::
501− MonadHttp m =>
501+ (MonadHttp m) =>
502502 -- | How to get final result from a 'L.Response'
503503 (L.Response L.BodyReader -> IO b) ->
504504 -- | 'L.Request' to perform
@@ -596,7 +596,7 @@ req' method url body options m = do
596596-- | Perform an action using the global implicit 'L.Manager' that the rest
597597-- of the library uses. This allows to reuse connections that the
598598-- 'L.Manager' controls.
599−withReqManager :: MonadIO m => (L.Manager -> m a) -> m a
599+withReqManager :: (MonadIO m) => (L.Manager -> m a) -> m a
600600withReqManager m = liftIO (readIORef globalManager) >>= m
601601
602602-- | The global 'L.Manager' that 'req' uses. Here we just go with the
@@ -639,7 +639,7 @@ globalManager = unsafePerformIO $ do
639639-- | A type class for monads that support performing HTTP requests.
640640-- Typically, you only need to define the 'handleHttpException' method
641641-- unless you want to tweak 'HttpConfig'.
642−class MonadIO m => MonadHttp m where
642+class (MonadIO m) => MonadHttp m where
643643 -- | This method describes how to deal with 'HttpException' that was
644644 -- caught by the library. One option is to re-throw it if you are OK with
645645 -- exceptions, but if you prefer working with something like
@@ -723,7 +723,7 @@ data HttpConfig = HttpConfig
723723 -- | Max length of preview fragment of response body.
724724 --
725725 -- @since 3.6.0
726− httpConfigBodyPreviewLength :: forall a. Num a => a
726+ httpConfigBodyPreviewLength :: forall a. (Num a) => a
727727 }
728728 deriving (Typeable)
729729
@@ -813,27 +813,27 @@ instance (MonadHttp m, Monoid w) => MonadHttp (AccumT w m) where
813813 getHttpConfig = lift getHttpConfig
814814
815815-- | @since 3.10.0
816−instance MonadHttp m => MonadHttp (ContT r m) where
816+instance (MonadHttp m) => MonadHttp (ContT r m) where
817817 handleHttpException = lift . handleHttpException
818818 getHttpConfig = lift getHttpConfig
819819
820820-- | @since 3.10.0
821−instance MonadHttp m => MonadHttp (ExceptT e m) where
821+instance (MonadHttp m) => MonadHttp (ExceptT e m) where
822822 handleHttpException = lift . handleHttpException
823823 getHttpConfig = lift getHttpConfig
824824
825825-- | @since 3.10.0
826−instance MonadHttp m => MonadHttp (IdentityT m) where
826+instance (MonadHttp m) => MonadHttp (IdentityT m) where
827827 handleHttpException = lift . handleHttpException
828828 getHttpConfig = lift getHttpConfig
829829
830830-- | @since 3.10.0
831−instance MonadHttp m => MonadHttp (MaybeT m) where
831+instance (MonadHttp m) => MonadHttp (MaybeT m) where
832832 handleHttpException = lift . handleHttpException
833833 getHttpConfig = lift getHttpConfig
834834
835835-- | @since 3.10.0
836−instance MonadHttp m => MonadHttp (ReaderT r m) where
836+instance (MonadHttp m) => MonadHttp (ReaderT r m) where
837837 handleHttpException = lift . handleHttpException
838838 getHttpConfig = lift getHttpConfig
839839
@@ -853,17 +853,17 @@ instance (MonadHttp m, Monoid w) => MonadHttp (RWS.Strict.RWST r w s m) where
853853 getHttpConfig = lift getHttpConfig
854854
855855-- | @since 3.10.0
856−instance MonadHttp m => MonadHttp (SelectT r m) where
856+instance (MonadHttp m) => MonadHttp (SelectT r m) where
857857 handleHttpException = lift . handleHttpException
858858 getHttpConfig = lift getHttpConfig
859859
860860-- | @since 3.10.0
861−instance MonadHttp m => MonadHttp (State.Lazy.StateT s m) where
861+instance (MonadHttp m) => MonadHttp (State.Lazy.StateT s m) where
862862 handleHttpException = lift . handleHttpException
863863 getHttpConfig = lift getHttpConfig
864864
865865-- | @since 3.10.0
866−instance MonadHttp m => MonadHttp (State.Strict.StateT s m) where
866+instance (MonadHttp m) => MonadHttp (State.Strict.StateT s m) where
867867 handleHttpException = lift . handleHttpException
868868 getHttpConfig = lift getHttpConfig
869869
@@ -887,7 +887,7 @@ instance (MonadHttp m, Monoid w) => MonadHttp (Writer.Strict.WriterT w m) where
887887--
888888-- @since 0.4.0
889889runReq ::
890− MonadIO m =>
890+ (MonadIO m) =>
891891 -- | 'HttpConfig' to use
892892 HttpConfig ->
893893 -- | Computation to run
@@ -992,7 +992,7 @@ class HttpMethod a where
992992 -- | Return name of the method as a 'ByteString'.
993993 httpMethodName :: Proxy a -> ByteString
994994
995−instance HttpMethod method => RequestComponent (Tagged "method" method) where
995+instance (HttpMethod method) => RequestComponent (Tagged "method" method) where
996996 getRequestMod _ = Endo $ \x ->
997997 x {L.method = httpMethodName (Proxy :: Proxy method)}
998998
@@ -1040,7 +1040,7 @@ type role Url nominal
10401040
10411041-- With template-haskell >=2.15 and text >=1.2.4 Lift can be derived, however
10421042-- the derived lift forgets the type of the scheme.
1043−instance Typeable scheme => TH.Lift (Url scheme) where
1043+instance (Typeable scheme) => TH.Lift (Url scheme) where
10441044 lift url =
10451045 TH.dataToExpQ (fmap liftText . cast) url `TH.sigE` case url of
10461046 Url Http _ -> [t|Url 'Http|]
@@ -1063,7 +1063,7 @@ https = Url Https . pure
10631063-- path segment can be of any type that is an instance of 'ToHttpApiData'.
10641064infixl 5 /~
10651065
1066−(/~) :: ToHttpApiData a => Url scheme -> a -> Url scheme
1066+(/~) :: (ToHttpApiData a) => Url scheme -> a -> Url scheme
10671067Url secure path /~ segment = Url secure (NE.cons (toUrlPiece segment) path)
10681068
10691069-- | A type-constrained version of @('/~')@ to remove ambiguity in the cases
@@ -1251,7 +1251,7 @@ instance HttpBody NoReqBody where
12511251-- charset=utf-8\"@ value.
12521252newtype ReqBodyJson a = ReqBodyJson a
12531253
1254−instance ToJSON a => HttpBody (ReqBodyJson a) where
1254+instance (ToJSON a) => HttpBody (ReqBodyJson a) where
12551255 getRequestBody (ReqBodyJson a) = L.RequestBodyLBS (A.encode a)
12561256 getRequestContentType _ = pure "application/json; charset=utf-8"
12571257
@@ -1350,7 +1350,7 @@ instance HttpBody ReqBodyMultipart where
13501350-- | Create 'ReqBodyMultipart' request body from a collection of 'LM.Part's.
13511351--
13521352-- @since 0.2.0
1353−reqBodyMultipart :: MonadIO m => [LM.Part] -> m ReqBodyMultipart
1353+reqBodyMultipart :: (MonadIO m) => [LM.Part] -> m ReqBodyMultipart
13541354reqBodyMultipart parts = liftIO $ do
13551355 boundary <- LM.webkitBoundary
13561356 body <- LM.renderParts boundary parts
@@ -1390,7 +1390,7 @@ type family
13901390 TypeError
13911391 ('Text "This HTTP method does not allow attaching a request body.")
13921392
1393−instance HttpBody body => RequestComponent (Tagged "body" body) where
1393+instance (HttpBody body) => RequestComponent (Tagged "body" body) where
13941394 getRequestMod (Tagged body) = Endo $ \x ->
13951395 x
13961396 { L.requestBody = getRequestBody body,
@@ -1460,7 +1460,7 @@ instance RequestComponent (Option scheme) where
14601460
14611461-- | Finalize given 'L.Request' by applying a finalizer from the given
14621462-- 'Option' (if it has any).
1463−finalizeRequest :: MonadIO m => Option scheme -> L.Request -> m L.Request
1463+finalizeRequest :: (MonadIO m) => Option scheme -> L.Request -> m L.Request
14641464finalizeRequest (Option _ mfinalizer) = liftIO . fromMaybe pure mfinalizer
14651465
14661466----------------------------------------------------------------------------
@@ -1493,7 +1493,7 @@ name =: value = queryParam name (pure value)
14931493-- This operator is defined in terms of 'queryParam':
14941494--
14951495-- > queryFlag name = queryParam name (Nothing :: Maybe ())
1496−queryFlag :: QueryParam param => Text -> param
1496+queryFlag :: (QueryParam param) => Text -> param
14971497queryFlag name = queryParam name (Nothing :: Maybe ())
14981498
14991499-- | Construct query parameters from a 'ToForm' instance. This function
@@ -1523,7 +1523,7 @@ class QueryParam param where
15231523 -- 'Nothing', it won't be included at all (i.e. you create a flag this
15241524 -- way). It's recommended to use @('=:')@ and 'queryFlag' instead of this
15251525 -- method, because they are easier to read.
1526− queryParam :: ToHttpApiData a => Text -> Maybe a -> param
1526+ queryParam :: (ToHttpApiData a) => Text -> Maybe a -> param
15271527
15281528 -- | Get the query parameter names and values set by 'queryParam'.
15291529 --
@@ -1772,7 +1772,7 @@ ignoreResponse = Proxy
17721772newtype JsonResponse a = JsonResponse (L.Response a)
17731773 deriving (Show)
17741774
1775−instance FromJSON a => HttpResponse (JsonResponse a) where
1775+instance (FromJSON a) => HttpResponse (JsonResponse a) where
17761776 type HttpResponseBody (JsonResponse a) = a
17771777 toVanillaResponse (JsonResponse r) = r
17781778 getHttpResponse r = do
@@ -1888,14 +1888,14 @@ brReadN br n = go 0 id id
18881888
18891889-- | Get the response body.
18901890responseBody ::
1891− HttpResponse response =>
1891+ (HttpResponse response) =>
18921892 response ->
18931893 HttpResponseBody response
18941894responseBody = L.responseBody . toVanillaResponse
18951895
18961896-- | Get the response status code.
18971897responseStatusCode ::
1898− HttpResponse response =>
1898+ (HttpResponse response) =>
18991899 response ->
19001900 Int
19011901responseStatusCode =
@@ -1903,7 +1903,7 @@ responseStatusCode =
19031903
19041904-- | Get the response status message.
19051905responseStatusMessage ::
1906− HttpResponse response =>
1906+ (HttpResponse response) =>
19071907 response ->
19081908 ByteString
19091909responseStatusMessage =
@@ -1911,7 +1911,7 @@ responseStatusMessage =
19111911
19121912-- | Lookup a particular header from a response.
19131913responseHeader ::
1914− HttpResponse response =>
1914+ (HttpResponse response) =>
19151915 -- | Response interpretation
19161916 response ->
19171917 -- | Header to lookup
@@ -1923,7 +1923,7 @@ responseHeader r h =
19231923
19241924-- | Get the response 'L.CookieJar'.
19251925responseCookieJar ::
1926− HttpResponse response =>
1926+ (HttpResponse response) =>
19271927 response ->
19281928 L.CookieJar
19291929responseCookieJar = L.responseCookieJar . toVanillaResponse
httpbin-tests/Network/HTTP/ReqSpec.hs+1−1
@@ -471,7 +471,7 @@ emptyObject :: Value
471471emptyObject = Object Aeson.KeyMap.empty
472472
473473-- | Get a rendered JSON value as 'Text'.
474−reflectJSON :: ToJSON a => a -> Text
474+reflectJSON :: (ToJSON a) => a -> Text
475475reflectJSON = T.decodeUtf8 . BL.toStrict . A.encode
476476
477477-- | Clarify to the type checker that the inner computation is in the 'IO'
pure-tests/Network/HTTP/ReqSpec.hs+1−1
@@ -413,7 +413,7 @@ spec = do
413413 -- 'Https, Option _) type checks, so we can catch if the type of scheme
414414 -- is unspecified.
415415 let testTypeOfQuoterResult ::
416− forall a s. Typeable a => (a, Option s) -> Bool
416+ forall a s. (Typeable a) => (a, Option s) -> Bool
417417 testTypeOfQuoterResult _ = isJust $ eqT @a @(Url 'Https)
418418 in property $ testTypeOfQuoterResult [urlQ|https://example.org/|]
419419 it "doesn't work for invalid urls" $