packages feed

json-sop 0.2.1 → 0.2.2

raw patch · 2 files changed

+14/−12 lines, 2 filesdep ~basedep ~lens-sopdep ~textPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: base, lens-sop, text, time, transformers

API changes (from Hackage documentation)

- Generics.SOP.JSON.Model: untag :: forall k (s :: k) b. Tagged s b -> b
+ Generics.SOP.JSON.Model: untag :: forall {k} (s :: k) b. Tagged s b -> b

Files

json-sop.cabal view
@@ -1,5 +1,5 @@ name:                json-sop-version:             0.2.1+version:             0.2.2 synopsis:            Generics JSON (de)serialization using generics-sop description:   This library contains generic serialization and deserialization functions@@ -13,7 +13,7 @@ category:            Generics build-type:          Simple cabal-version:       >=1.10-tested-with:         GHC ==8.4.4 || ==8.6.5 || ==8.8.4 || ==8.10.7 || ==9.0.1 || ==9.2.1+tested-with:         GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.4  source-repository head   type:                git@@ -23,16 +23,18 @@   exposed-modules:     Generics.SOP.JSON                        Generics.SOP.JSON.Model   other-modules:       Generics.SOP.Util.PartialResult-  build-depends:       base                 >= 4.11  && < 4.17,+  build-depends:       base                 >= 4.11  && < 4.18,                        generics-sop         >= 0.2.3 && < 0.6,-                       lens-sop             >= 0.2   && < 0.3,++                       -- lens-sop changed API in 0.3+                       lens-sop             >= 0.3   && < 0.4,                        tagged               >= 0.7   && < 0.9,-                       aeson                >= 1.4   && < 2.1,-                       vector               >= 0.10  && < 0.13,-                       text                 >= 1.1   && < 1.3,+                       aeson                >= 1.4   && < 2.2,+                       vector               >= 0.10  && < 0.14,+                       text                 >= 1.1   && < 2.1,                        unordered-containers >= 0.2   && < 0.3,-                       time                 >= 1.4   && < 1.12,-                       transformers         >= 0.3   && < 0.6+                       time                 >= 1.4   && < 1.14,+                       transformers         >= 0.3   && < 0.7   hs-source-dirs:      src   default-language:    Haskell2010   ghc-options:         -Wall
src/Generics/SOP/JSON.hs view
@@ -317,17 +317,17 @@     _ :* Nil -> error "cannot update non-record type"  gupdateRecord :: forall (xs :: [Type]) (a :: Type). All UpdateFromJSON xs-              => NP (K String) xs -> NP (GLens (->) (->) a) xs -> Value -> Parser (a -> a)+              => NP (K String) xs -> NP (GLens I I a) xs -> Value -> Parser (a -> a) gupdateRecord fields lenses = withObject "Object" $ \obj -> do     values :: NP (K (Maybe Value)) xs <- lineup fields obj     updates <- hcollapse `liftM` hsequenceK (hcliftA2 pu update values lenses)     return $ foldr (.) id updates   where     update :: forall b. UpdateFromJSON b-           => K (Maybe Value) b -> GLens (->) (->) a b -> K (Parser (a -> a)) b+           => K (Maybe Value) b -> GLens I I a b -> K (Parser (a -> a)) b     update (K Nothing)  _ = K $ return id     update (K (Just v)) l = K $ do f <- updateFromJSON v-                                   return $ \a -> modify l (f, a)+                                   return $ \a -> unI $ modify l (I . f) a  {-------------------------------------------------------------------------------   Auxiliary