polysemy-http 0.11.0.0 → 0.12.0.0
raw patch · 3 files changed
+54/−135 lines, 3 filesdep ~aesondep ~basedep ~case-insensitivePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: aeson, base, case-insensitive, exon, hedgehog, http-client, http-client-tls, http-types, network, prelate, servant-client, servant-server, tasty, tasty-hedgehog, warp
API changes (from Hackage documentation)
Files
- lib/Polysemy/Http/Effect/Entity.hs +3/−3
- lib/Polysemy/Http/Interpreter/Native.hs +4/−4
- polysemy-http.cabal +47/−128
lib/Polysemy/Http/Effect/Entity.hs view
@@ -83,7 +83,7 @@ -- foo :: Entities [Encode Int, Decode Double] r => Sem r () -- @ type family Entities es r :: Constraint where- Entities '[] r = ()+ Entities '[] _ = () Entities (Encode d ': ds) r = (Member (EntityEncode d) r, Entities ds r) Entities (Decode d ': ds) r = (Member (EntityDecode d) r, Entities ds r) @@ -93,7 +93,7 @@ -- foo :: Encoders [Int, Double] r => Sem r () -- @ type family Encoders es r :: Constraint where- Encoders '[] r = ()+ Encoders '[] _ = () Encoders (d ': ds) r = (Member (EntityEncode d) r, Encoders ds r) -- |Convenience constraint for requiring multiple decoders.@@ -102,5 +102,5 @@ -- foo :: Decoders [Int, Double] r => Sem r () -- @ type family Decoders ds r :: Constraint where- Decoders '[] r = ()+ Decoders '[] _ = () Decoders (d ': ds) r = (Member (EntityDecode d) r, Decoders ds r)
lib/Polysemy/Http/Interpreter/Native.hs view
@@ -6,11 +6,11 @@ import qualified Data.CaseInsensitive as CaseInsensitive import Data.CaseInsensitive (foldedCase) import Exon (exon)+import qualified Log as Log import qualified Network.HTTP.Client as HTTP import Network.HTTP.Client (BodyReader, brRead, brReadSome, httpLbs, responseClose, responseOpen) import Network.HTTP.Client.Internal (CookieJar (CJ)) import Polysemy.Internal.Tactics (liftT)-import qualified Log as Log import Polysemy.Http.Data.Header (Header (Header), unHeaderName, unHeaderValue) import qualified Polysemy.Http.Data.HttpError as HttpError@@ -48,11 +48,11 @@ } where queryParams =- bimap (encodeUtf8 . unQueryKey) (fmap (encodeUtf8 . unQueryValue)) <$> query+ bimap (encodeUtf8 . (.unQueryKey)) (fmap (encodeUtf8 . (.unQueryValue))) <$> query port =- maybe (if tls then 443 else 80) unPort portOverride+ maybe (if tls then 443 else 80) (.unPort) portOverride encodedHeaders =- bimap (CaseInsensitive.mk . encodeUtf8 . unHeaderName) (encodeUtf8 . unHeaderValue) <$> headers+ bimap (CaseInsensitive.mk . encodeUtf8 . (.unHeaderName)) (encodeUtf8 . (.unHeaderValue)) <$> headers convertResponse :: HTTP.Response b -> Response b convertResponse response =
polysemy-http.cabal view
@@ -1,29 +1,29 @@ cabal-version: 2.2 --- This file has been generated from package.yaml by hpack version 0.35.0.+-- This file has been generated from package.yaml by hpack version 0.35.2. -- -- see: https://github.com/sol/hpack name: polysemy-http-version: 0.11.0.0+version: 0.12.0.0 synopsis: Polysemy effects for HTTP clients description: See https://hackage.haskell.org/package/polysemy-http/docs/Polysemy-Http.html category: Network-homepage: https://git.tryp.io/tek/polysemy-http-bug-reports: https://git.tryp.io/tek/polysemy-http/issues+homepage: https://github.com/tek/polysemy-http#readme+bug-reports: https://github.com/tek/polysemy-http/issues author: Torsten Schmits maintainer: hackage@tryp.io-copyright: 2022 Torsten Schmits+copyright: 2023 Torsten Schmits license: BSD-2-Clause-Patent license-file: LICENSE build-type: Simple extra-source-files:- changelog.md readme.md+ changelog.md source-repository head type: git- location: https://git.tryp.io/tek/polysemy-http+ location: https://github.com/tek/polysemy-http library exposed-modules:@@ -49,85 +49,58 @@ default-extensions: AllowAmbiguousTypes ApplicativeDo- BangPatterns- BinaryLiterals BlockArguments- ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass- DeriveDataTypeable- DeriveFoldable- DeriveFunctor- DeriveGeneric- DeriveLift- DeriveTraversable DerivingStrategies DerivingVia DisambiguateRecordFields- DoAndIfThenElse DuplicateRecordFields- EmptyCase- EmptyDataDecls- ExistentialQuantification- FlexibleContexts- FlexibleInstances FunctionalDependencies GADTs- GeneralizedNewtypeDeriving- InstanceSigs- KindSignatures LambdaCase LiberalTypeSynonyms- MultiParamTypeClasses MultiWayIf- NamedFieldPuns OverloadedLabels OverloadedLists OverloadedStrings PackageImports PartialTypeSignatures- PatternGuards PatternSynonyms- PolyKinds QuantifiedConstraints QuasiQuotes- RankNTypes RecordWildCards RecursiveDo RoleAnnotations- ScopedTypeVariables- StandaloneDeriving TemplateHaskell- TupleSections- TypeApplications TypeFamilies TypeFamilyDependencies- TypeOperators- TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns- ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages -fplugin=Polysemy.Plugin+ OverloadedRecordDot+ NoFieldSelectors+ ghc-options: -fplugin=Polysemy.Plugin -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages build-depends: aeson >=1.4 && <2.2- , base >=4.12 && <5- , case-insensitive >=1.2- , exon >=0.3- , http-client >=0.5.14- , http-client-tls >=0.3.1- , http-types >=0.12.3+ , base ==4.*+ , case-insensitive ==1.2.*+ , exon ==1.4.*+ , http-client >=0.5.14 && <0.8+ , http-client-tls >=0.3.1 && <0.4+ , http-types >=0.12.3 && <0.13 , polysemy ==1.9.* , polysemy-plugin ==0.4.*- , prelate ==0.5.*+ , prelate ==0.6.* , time mixins: base hiding (Prelude) , prelate (Prelate as Prelude) , prelate hiding (Prelate)- default-language: Haskell2010+ default-language: GHC2021 -test-suite polysemy-http-integration+test-suite integration type: exitcode-stdio-1.0 main-is: Main.hs other-modules:@@ -141,89 +114,62 @@ default-extensions: AllowAmbiguousTypes ApplicativeDo- BangPatterns- BinaryLiterals BlockArguments- ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass- DeriveDataTypeable- DeriveFoldable- DeriveFunctor- DeriveGeneric- DeriveLift- DeriveTraversable DerivingStrategies DerivingVia DisambiguateRecordFields- DoAndIfThenElse DuplicateRecordFields- EmptyCase- EmptyDataDecls- ExistentialQuantification- FlexibleContexts- FlexibleInstances FunctionalDependencies GADTs- GeneralizedNewtypeDeriving- InstanceSigs- KindSignatures LambdaCase LiberalTypeSynonyms- MultiParamTypeClasses MultiWayIf- NamedFieldPuns OverloadedLabels OverloadedLists OverloadedStrings PackageImports PartialTypeSignatures- PatternGuards PatternSynonyms- PolyKinds QuantifiedConstraints QuasiQuotes- RankNTypes RecordWildCards RecursiveDo RoleAnnotations- ScopedTypeVariables- StandaloneDeriving TemplateHaskell- TupleSections- TypeApplications TypeFamilies TypeFamilyDependencies- TypeOperators- TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns- ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages -fplugin=Polysemy.Plugin -threaded -rtsopts -with-rtsopts=-N+ OverloadedRecordDot+ NoFieldSelectors+ ghc-options: -fplugin=Polysemy.Plugin -threaded -rtsopts -with-rtsopts=-N -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages build-depends:- aeson- , base >=4.12 && <5- , exon- , hedgehog- , http-client- , network+ aeson >=1.4 && <2.2+ , base ==4.*+ , exon ==1.4.*+ , hedgehog >=1.1 && <1.3+ , http-client >=0.5.14 && <0.8+ , network ==3.1.* , polysemy ==1.9.* , polysemy-http , polysemy-plugin ==0.4.*- , prelate ==0.5.*- , servant-client- , servant-server- , tasty- , tasty-hedgehog- , warp+ , prelate ==0.6.*+ , servant-client ==0.19.*+ , servant-server ==0.19.*+ , tasty ==1.4.*+ , tasty-hedgehog >=1.3 && <1.5+ , warp ==3.3.* mixins: base hiding (Prelude) , prelate (Prelate as Prelude) , prelate hiding (Prelate)- default-language: Haskell2010+ default-language: GHC2021 -test-suite polysemy-http-unit+test-suite polysemy-http-test type: exitcode-stdio-1.0 main-is: Main.hs other-modules:@@ -235,79 +181,52 @@ default-extensions: AllowAmbiguousTypes ApplicativeDo- BangPatterns- BinaryLiterals BlockArguments- ConstraintKinds DataKinds DefaultSignatures DeriveAnyClass- DeriveDataTypeable- DeriveFoldable- DeriveFunctor- DeriveGeneric- DeriveLift- DeriveTraversable DerivingStrategies DerivingVia DisambiguateRecordFields- DoAndIfThenElse DuplicateRecordFields- EmptyCase- EmptyDataDecls- ExistentialQuantification- FlexibleContexts- FlexibleInstances FunctionalDependencies GADTs- GeneralizedNewtypeDeriving- InstanceSigs- KindSignatures LambdaCase LiberalTypeSynonyms- MultiParamTypeClasses MultiWayIf- NamedFieldPuns OverloadedLabels OverloadedLists OverloadedStrings PackageImports PartialTypeSignatures- PatternGuards PatternSynonyms- PolyKinds QuantifiedConstraints QuasiQuotes- RankNTypes RecordWildCards RecursiveDo RoleAnnotations- ScopedTypeVariables- StandaloneDeriving TemplateHaskell- TupleSections- TypeApplications TypeFamilies TypeFamilyDependencies- TypeOperators- TypeSynonymInstances UndecidableInstances UnicodeSyntax ViewPatterns- ghc-options: -Wall -Wredundant-constraints -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Widentities -Wunused-packages -fplugin=Polysemy.Plugin -threaded -rtsopts -with-rtsopts=-N+ OverloadedRecordDot+ NoFieldSelectors+ ghc-options: -fplugin=Polysemy.Plugin -threaded -rtsopts -with-rtsopts=-N -Wall -Widentities -Wincomplete-uni-patterns -Wmissing-deriving-strategies -Wredundant-constraints -Wunused-type-patterns -Wunused-packages build-depends:- base >=4.12 && <5- , exon- , hedgehog- , http-client+ base ==4.*+ , exon ==1.4.*+ , hedgehog >=1.1 && <1.3+ , http-client >=0.5.14 && <0.8 , polysemy ==1.9.* , polysemy-http , polysemy-plugin ==0.4.*- , prelate ==0.5.*- , tasty- , tasty-hedgehog+ , prelate ==0.6.*+ , tasty ==1.4.*+ , tasty-hedgehog >=1.3 && <1.5 mixins: base hiding (Prelude) , prelate (Prelate as Prelude) , prelate hiding (Prelate)- default-language: Haskell2010+ default-language: GHC2021