packages feed

network-uri-lenses 0.2.0.0 → 0.2.1.0

raw patch · 2 files changed

+10/−5 lines, 2 filesdep −lensdep ~network-uriPVP ok

version bump matches the API change (PVP)

Dependencies removed: lens

Dependency ranges changed: network-uri

API changes (from Hackage documentation)

Files

network-uri-lenses.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 2b1fbe44f1172d1b1073641815a5b70101548418f23246cdcd7f08aec05d2997+-- hash: 69a0a6c149209fda674c56d22a921d69e02d5a4e47fc8fee98313d4ecf5c5513  name:           network-uri-lenses-version:        0.2.0.0+version:        0.2.1.0 synopsis:       Lenses for network-uri description:    Please see the README on GitHub at <https://github.com/githubuser/network-uri-lenses#readme> category:       Network@@ -35,6 +35,5 @@       src   build-depends:       base >=4.7 && <5-    , lens-    , network-uri+    , network-uri >=2.6 && <2.7   default-language: Haskell2010
src/Network/URI/Lens.hs view
@@ -1,3 +1,4 @@+{-# LANGUAGE Rank2Types #-} -- | Network uri lenses module Network.URI.Lens   ( regNameLens@@ -10,8 +11,13 @@   , uriFragmentLens   ) where -import           Control.Lens import           Network.URI++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++lens :: (s -> a) -> (s -> b -> t) -> Lens s t a b+lens sa sbt afb s = sbt s <$> afb (sa s)  regNameLens :: Lens' URIAuth String regNameLens = lens uriRegName (\parent newVal -> parent {uriRegName = newVal})