packages feed

hackage-security-HTTP 0.1.1 → 0.1.1.1

raw patch · 3 files changed

+27/−15 lines, 3 filesdep ~HTTPdep ~basedep ~bytestringnew-uploaderPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: HTTP, base, bytestring, hackage-security, mtl, network, zlib

API changes (from Hackage documentation)

- Hackage.Security.Client.Repository.HttpLib.HTTP: instance GHC.Exception.Exception Hackage.Security.Client.Repository.HttpLib.HTTP.InvalidProxy
- Hackage.Security.Client.Repository.HttpLib.HTTP: instance GHC.Exception.Exception Hackage.Security.Client.Repository.HttpLib.HTTP.UnexpectedResponse
+ Hackage.Security.Client.Repository.HttpLib.HTTP: instance GHC.Exception.Type.Exception Hackage.Security.Client.Repository.HttpLib.HTTP.InvalidProxy
+ Hackage.Security.Client.Repository.HttpLib.HTTP: instance GHC.Exception.Type.Exception Hackage.Security.Client.Repository.HttpLib.HTTP.UnexpectedResponse
- Hackage.Security.Client.Repository.HttpLib.HTTP: withBrowser :: Browser -> BrowserAction LazyStream a -> IO a
+ Hackage.Security.Client.Repository.HttpLib.HTTP: withBrowser :: forall a. Browser -> BrowserAction LazyStream a -> IO a

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+0.1.1.1+-------+* Add support for hackage-security-0.6+ 0.1.1 ----- * Implement updated HttpLib API from hackage-security 0.5
hackage-security-HTTP.cabal view
@@ -1,28 +1,29 @@+cabal-version:       1.12 name:                hackage-security-HTTP-version:             0.1.1+version:             0.1.1.1 synopsis:            Hackage security bindings against the HTTP library description:         The hackage security library provides a 'HttpLib'                      abstraction to allow to bind against different HTTP                      libraries. This library implements this abstraction using                      the @HTTP@ library.-homepage:            http://github.com/well-typed/hackage-security/ license:             BSD3 license-file:        LICENSE author:              Edsko de Vries-maintainer:          edsko@well-typed.com-copyright:           Copyright 2015 Well-Typed LLP+maintainer:          cabal-devel@haskell.org+copyright:           Copyright 2015-2016 Well-Typed LLP category:            Distribution-homepage:            https://github.com/well-typed/hackage-security-bug-reports:         https://github.com/well-typed/hackage-security/issues+homepage:            https://github.com/haskell/hackage-security+bug-reports:         https://github.com/haskell/hackage-security/issues build-type:          Simple-cabal-version:       >=1.10+tested-with:         GHC==8.10.1, GHC==8.8.3, GHC==8.6.5, GHC==8.4.4, GHC==8.2.2, GHC==8.0.2,+                     GHC==7.10.3, GHC==7.8.4, GHC==7.6.3, GHC==7.4.2  extra-source-files:   ChangeLog.md  source-repository head   type: git-  location: https://github.com/well-typed/hackage-security.git+  location: https://github.com/haskell/hackage-security.git  flag use-network-uri   description: Are we using network-uri?@@ -30,12 +31,12 @@  library   exposed-modules:     Hackage.Security.Client.Repository.HttpLib.HTTP-  build-depends:       base             >= 4.4       && < 5,+  build-depends:       base             >= 4.5       && < 4.15,                        bytestring       >= 0.9       && < 0.11,-                       HTTP             >= 4000.2.19 && < 4000.3,-                       mtl              >= 2.2       && < 2.3,+                       HTTP             >= 4000.2.19 && < 4000.4,+                       mtl              >= 2.1       && < 2.3,                        zlib             >= 0.5       && < 0.7,-                       hackage-security >= 0.5       && < 0.6+                       hackage-security >= 0.5       && < 0.7   hs-source-dirs:      src   default-language:    Haskell2010   default-extensions:  DeriveDataTypeable@@ -50,6 +51,7 @@   -- See comments in hackage-security.cabal   if flag(use-network-uri)     build-depends: network-uri >= 2.6 && < 2.7,-                   network     >= 2.6 && < 2.7+                   network     >= 2.6 && < 2.9+                            || >= 3.0 && < 3.2   else     build-depends: network     >= 2.5 && < 2.6
src/Hackage/Security/Client/Repository/HttpLib/HTTP.hs view
@@ -31,7 +31,6 @@ import Hackage.Security.Client.Repository.HttpLib import Hackage.Security.Util.Checked import Hackage.Security.Util.Pretty-import qualified Hackage.Security.Util.Lens as Lens  {-------------------------------------------------------------------------------   Top-level API@@ -257,7 +256,14 @@     finalizeHeader (name, strs) = [(name, intercalate ", " (reverse strs))]      insert :: Eq a => a -> [b] -> [(a, [b])] -> [(a, [b])]-    insert x y = Lens.modify (Lens.lookupM x) (++ y)+    insert x y = modifyAssocList x (++ y)++    -- modify the first maching element+    modifyAssocList :: Eq a => a -> (b -> b) -> [(a, b)] -> [(a, b)]+    modifyAssocList a f = go where+        go []                         = []+        go (p@(a', b) : xs) | a == a'   = (a', f b) : xs+                            | otherwise = p         : go xs  getResponseHeaders :: HTTP.Response a -> [HttpResponseHeader] getResponseHeaders response = concat [