packages feed

lens-utils 1.4.3 → 1.4.4

raw patch · 2 files changed

+12/−13 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

lens-utils.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: 2207e6de888dc697b0877f5ef66e0678ce42a78e4e422575b3b4444cb11e7586+-- hash: d7220dd813c55ce1ce3287342452592c24ae89d71e8b445c5a00625c60d7731f  name:           lens-utils-version:        1.4.3+version:        1.4.4 synopsis:       Collection of missing lens utilities. category:       Data stability:      experimental
src/Control/Lens/Aeson.hs view
@@ -23,27 +23,26 @@ optionsDropUnary = options { JSON.unwrapUnaryRecords = True }  optionsYamlStyle :: JSON.Options-optionsYamlStyle = JSON.defaultOptions { JSON.fieldLabelModifier = yaml } where-    yaml str = List.intercalate "-"-            $ (\xs -> Char.toLower <$> xs) <$> splitUpperKeep noUnderscores-        where noUnderscores  = List.dropWhile (== '_') str-              splitUpperKeep = List.split-                (List.keepDelimsL $ List.oneOf ['A'..'Z'])+optionsYamlStyle = JSON.defaultOptions+    { JSON.unwrapUnaryRecords = True+    , JSON.omitNothingFields  = True+    , JSON.fieldLabelModifier = yaml } where+        yaml = JSON.camelTo2 '-' . List.dropWhile (== '_')  parse :: (Generic a, JSON.GFromJSON JSON.Zero (Rep a)) => JSON.Value       -> JSON.Parser a-parse = JSON.genericParseJSON  options+parse = JSON.genericParseJSON options  toEncoding :: (Generic a, JSON.GToEncoding JSON.Zero (Rep a)) => a            -> JSON.Encoding toEncoding = JSON.genericToEncoding options  toJSON :: (Generic a, JSON.GToJSON JSON.Zero (Rep a)) => a -> JSON.Value-toJSON = JSON.genericToJSON     options+toJSON = JSON.genericToJSON options  parseDropUnary :: (Generic a, JSON.GFromJSON JSON.Zero (Rep a)) => JSON.Value                -> JSON.Parser a-parseDropUnary = JSON.genericParseJSON  optionsDropUnary+parseDropUnary = JSON.genericParseJSON optionsDropUnary  toEncodingDropUnary :: (Generic a, JSON.GToEncoding JSON.Zero (Rep a)) => a                     -> JSON.Encoding@@ -55,7 +54,7 @@  parseYamlStyle :: (Generic a, JSON.GFromJSON JSON.Zero (Rep a)) => JSON.Value                -> JSON.Parser a-parseYamlStyle = JSON.genericParseJSON  optionsYamlStyle+parseYamlStyle = JSON.genericParseJSON optionsYamlStyle  toEncodingYamlStyle :: (Generic a, JSON.GToEncoding JSON.Zero (Rep a)) => a                     -> JSON.Encoding@@ -63,6 +62,6 @@  toJSONYamlStyle :: (Generic a, JSON.GToJSON JSON.Zero (Rep a)) => a                 -> JSON.Value-toJSONYamlStyle = JSON.genericToJSON     optionsYamlStyle+toJSONYamlStyle = JSON.genericToJSON optionsYamlStyle