deriving-aeson 0.2.7 → 0.2.8
raw patch · 4 files changed
+13/−5 lines, 4 filesdep ~aesondep ~basePVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson, base
API changes (from Hackage documentation)
- Deriving.Aeson.Stock: type Vanilla = CustomJSON '[]
+ Deriving.Aeson.Stock: type Vanilla = CustomJSON ('[] :: [Type])
Files
- CHANGELOG.md +5/−0
- deriving-aeson.cabal +3/−3
- src/Deriving/Aeson.hs +3/−1
- src/Deriving/Aeson/Stock.hs +2/−1
CHANGELOG.md view
@@ -1,5 +1,10 @@ # Revision history for deriving-aeson +## 0.2.8++* Supported GHC 9.2+* Supported aeson-2.0+ ## 0.2.7 * Added a `StringModifier` instance to a list of types
deriving-aeson.cabal view
@@ -1,6 +1,6 @@ cabal-version: 2.4 name: deriving-aeson-version: 0.2.7+version: 0.2.8 synopsis: Type driven generic aeson instance customisation description: This package provides a newtype wrapper with FromJSON/ToJSON instances customisable via a phantom type parameter.@@ -13,7 +13,7 @@ copyright: Copyright (c) 2020 Fumiaki Kinoshita category: JSON, Generics extra-source-files: CHANGELOG.md, README.md-tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.1+tested-with: GHC == 8.6.5, GHC == 8.8.3, GHC == 8.10.4, GHC == 9.2.1 source-repository head type: git@@ -23,7 +23,7 @@ exposed-modules: Deriving.Aeson Deriving.Aeson.Stock- build-depends: base >= 4.12 && <5, aeson >= 1.4.7.0 && <1.6+ build-depends: base >= 4.12 && <5, aeson >= 1.4.7.0 && <2.1 hs-source-dirs: src default-language: Haskell2010 ghc-options: -Wall -Wcompat
src/Deriving/Aeson.hs view
@@ -128,7 +128,9 @@ instance (KnownSymbol separator, NonEmptyString separator) => StringModifier (CamelTo separator) where getStringModifier = camelTo2 char where- (char : _) = symbolVal (Proxy @separator)+ char = case symbolVal (Proxy @separator) of+ c : _ -> c+ _ -> error "Impossible" instance (KnownSymbol from, KnownSymbol to) => StringModifier (Rename from to) where getStringModifier s = if s == symbolVal (Proxy @from) then symbolVal (Proxy @to) else s
src/Deriving/Aeson/Stock.hs view
@@ -12,6 +12,7 @@ , ToJSON , Generic) where +import Data.Kind (Type) import Deriving.Aeson -- | Field names are prefixed by @str@; strip them from JSON representation@@ -24,4 +25,4 @@ type Snake = CustomJSON '[FieldLabelModifier CamelToSnake] -- | No customisation-type Vanilla = CustomJSON '[]+type Vanilla = CustomJSON ('[] :: [Type])