packages feed

aeson-schemas 1.3.5 → 1.3.5.1

raw patch · 6 files changed

+29/−23 lines, 6 filesdep ~aesonPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: aeson

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,5 +1,9 @@ ## Upcoming +## 1.3.5.1++* Fix benchmarks for `aeson-2`+ ## 1.3.5  * Support `aeson-2.0.0.0`
aeson-schemas.cabal view
@@ -3,11 +3,9 @@ -- This file has been generated from package.yaml by hpack version 0.34.4. -- -- see: https://github.com/sol/hpack------ hash: 7bb36c5076abd002a834f6f14752e8bddacd9773657a3b2bea340068b1194625  name:           aeson-schemas-version:        1.3.5+version:        1.3.5.1 synopsis:       Easily consume JSON data on-demand with type-safety description:    Parse JSON data easily and safely without defining new data types. Useful                 for deeply nested JSON data, which is difficult to parse using the default@@ -80,9 +78,9 @@       aeson >=1.1.2.0 && <2.1     , base >=4.9 && <5     , first-class-families >=0.3.0.0 && <0.9-    , hashable >=1.2.7.0 && <1.4+    , hashable >=1.2.7.0 && <1.5     , megaparsec >=6.0.0 && <10-    , template-haskell >=2.12.0.0 && <2.18+    , template-haskell >=2.12.0.0 && <2.19     , text >=1.2.2.2 && <1.3     , unordered-containers >=0.2.8.0 && <0.3   if impl(ghc >= 8.0)@@ -126,7 +124,7 @@     , base >=4.9 && <5     , deepseq     , first-class-families >=0.3.0.0 && <0.9-    , hashable >=1.2.7.0 && <1.4+    , hashable >=1.2.7.0 && <1.5     , hint     , interpolate     , megaparsec >=6.0.0 && <10@@ -135,7 +133,7 @@     , tasty-golden     , tasty-hunit     , tasty-quickcheck-    , template-haskell >=2.12.0.0 && <2.18+    , template-haskell >=2.12.0.0 && <2.19     , text >=1.2.2.2 && <1.3     , th-orphans     , th-test-utils@@ -169,9 +167,9 @@     , criterion     , deepseq     , first-class-families >=0.3.0.0 && <0.9-    , hashable >=1.2.7.0 && <1.4+    , hashable >=1.2.7.0 && <1.5     , megaparsec >=6.0.0 && <10-    , template-haskell >=2.12.0.0 && <2.18+    , template-haskell >=2.12.0.0 && <2.19     , text >=1.2.2.2 && <1.3     , th-test-utils     , unordered-containers >=0.2.8.0 && <0.3
bench/Benchmarks/Data/Objects.hs view
@@ -12,10 +12,8 @@  import Data.Aeson (ToJSON (..), Value) import Data.Dynamic (Dynamic, Typeable, toDyn)-import qualified Data.HashMap.Strict as HashMap import Data.Proxy (Proxy (..))-import Data.Text (Text)-import qualified Data.Text as Text+import Data.String (fromString)  import Data.Aeson.Schema.Internal (Object (..), SchemaResult) import Data.Aeson.Schema.Key (IsSchemaKey, SchemaKey, fromSchemaKey)@@ -26,6 +24,7 @@   ToSchemaObject,  ) import Data.Aeson.Schema.Utils.All (All (..))+import qualified Data.Aeson.Schema.Utils.Compat as Compat  type MockSchema schema =   ( MockSchemaResult (ToSchemaObject schema)@@ -52,10 +51,10 @@   ) =>   MockSchemaResult ( 'SchemaObject pairs)   where-  schemaResult _ = UnsafeObject $ HashMap.fromList $ mapAll @MockSchemaResultPair @pairs schemaResultPair+  schemaResult _ = UnsafeObject $ Compat.fromList $ mapAll @MockSchemaResultPair @pairs schemaResultPair  class MockSchemaResultPair (pair :: (SchemaKey, SchemaType)) where-  schemaResultPair :: Proxy pair -> (Text, Dynamic)+  schemaResultPair :: Proxy pair -> (Compat.Key, Dynamic)  instance (IsSchemaKey key, MockSchemaResult inner) => MockSchemaResultPair '(key, inner) where-  schemaResultPair _ = (Text.pack $ fromSchemaKey @key, toDyn $ schemaResult $ Proxy @inner)+  schemaResultPair _ = (fromString $ fromSchemaKey @key, toDyn $ schemaResult $ Proxy @inner)
src/Data/Aeson/Schema/TH/Parse.hs view
@@ -218,16 +218,17 @@         , noneOf $ [' ', '\\', '"'] ++ schemaChars ++ getChars         ]   where-#if MIN_VERSION_megaparsec(7,0,0)-    anySingle' = anySingle-#else-    anySingle' = anyChar-#endif-     -- characters that cause ambiguity when parsing 'get' expressions     getChars = "!?[](),.@"     -- characters that should not indicate the start of a key when parsing 'schema' definitions     schemaChars = ":{}#"++anySingle' :: Parser Char+#if MIN_VERSION_megaparsec(7,0,0)+anySingle' = anySingle+#else+anySingle' = anyChar+#endif  {- Parsing utilities -} 
src/Data/Aeson/Schema/TH/Utils.hs view
@@ -183,6 +183,8 @@ -} type TypeWithoutKinds = Type +{- FOURMOLU_DISABLE -}+ -- | Recursively strip all kind signatures and applications. stripKinds :: Type -> TypeWithoutKinds stripKinds ty =@@ -226,6 +228,8 @@     ConstraintT -> ty     LitT _ -> ty     WildCardT -> ty++{- FOURMOLU_ENABLE -}  typeToList :: TypeWithoutKinds -> Maybe [TypeWithoutKinds] typeToList = \case
src/Data/Aeson/Schema/Utils/Sum.hs view
@@ -63,7 +63,7 @@  deriving instance (Show x, Show (SumType xs)) => Show (SumType (x ': xs)) instance Show (SumType '[]) where-  show = \case+  show = \case {}  deriving instance (Eq x, Eq (SumType xs)) => Eq (SumType (x ': xs)) instance Eq (SumType '[]) where@@ -85,7 +85,7 @@     There xs -> toJSON xs  instance ToJSON (SumType '[]) where-  toJSON = \case+  toJSON = \case {}  {- Extracting sum type branches -}