lens-utils 1.4.4 → 1.4.5
raw patch · 2 files changed
+7/−6 lines, 2 files
Files
- lens-utils.cabal +2/−2
- src/Control/Lens/Aeson.hs +5/−4
lens-utils.cabal view
@@ -2,10 +2,10 @@ -- -- see: https://github.com/sol/hpack ----- hash: d7220dd813c55ce1ce3287342452592c24ae89d71e8b445c5a00625c60d7731f+-- hash: 0602790545b326901e59379955c4541dcab52e82ef782aa8e1cedf784e484c18 name: lens-utils-version: 1.4.4+version: 1.4.5 synopsis: Collection of missing lens utilities. category: Data stability: experimental
src/Control/Lens/Aeson.hs view
@@ -24,10 +24,11 @@ optionsYamlStyle :: JSON.Options optionsYamlStyle = JSON.defaultOptions- { JSON.unwrapUnaryRecords = True- , JSON.omitNothingFields = True- , JSON.fieldLabelModifier = yaml } where- yaml = JSON.camelTo2 '-' . List.dropWhile (== '_')+ { JSON.unwrapUnaryRecords = True+ , JSON.omitNothingFields = True+ , JSON.fieldLabelModifier = yaml+ , JSON.constructorTagModifier = yaml} where+ yaml str = JSON.camelTo2 '-' $ List.dropWhile (== '_') str parse :: (Generic a, JSON.GFromJSON JSON.Zero (Rep a)) => JSON.Value -> JSON.Parser a