packages feed

json-sop 0.2.0.1 → 0.2.0.2

raw patch · 2 files changed

+10/−10 lines, 2 filesdep ~aesondep ~timedep ~vectorPVP: major bump suggested

API removals or changes: PVP suggests a major version bump

Dependency ranges changed: aeson, time, vector

API changes (from Hackage documentation)

- Generics.SOP.JSON: JsonMultiple :: Tag -> JsonInfo xs
- Generics.SOP.JSON: JsonOne :: Tag -> JsonInfo '[a]
- Generics.SOP.JSON: JsonRecord :: Tag -> NP (K String) xs -> JsonInfo xs
- Generics.SOP.JSON: JsonZero :: ConstructorName -> JsonInfo '[]
- Generics.SOP.JSON: instance Data.Aeson.Types.Class.FromJSON a => Generics.SOP.JSON.UpdateFromJSON (GHC.Base.Maybe a)
- Generics.SOP.JSON: instance Data.Aeson.Types.Class.FromJSON a => Generics.SOP.JSON.UpdateFromJSON [a]
+ Generics.SOP.JSON: [JsonMultiple] :: SListI xs => Tag -> JsonInfo xs
+ Generics.SOP.JSON: [JsonOne] :: Tag -> JsonInfo '[a]
+ Generics.SOP.JSON: [JsonRecord] :: SListI xs => Tag -> NP (K String) xs -> JsonInfo xs
+ Generics.SOP.JSON: [JsonZero] :: ConstructorName -> JsonInfo '[]
+ Generics.SOP.JSON: instance Data.Aeson.Types.FromJSON.FromJSON a => Generics.SOP.JSON.UpdateFromJSON (GHC.Base.Maybe a)
+ Generics.SOP.JSON: instance Data.Aeson.Types.FromJSON.FromJSON a => Generics.SOP.JSON.UpdateFromJSON [a]
+ Generics.SOP.JSON: parseJSONList :: FromJSON a => Value -> Parser [a]
+ Generics.SOP.JSON: toEncodingList :: ToJSON a => [a] -> Encoding
+ Generics.SOP.JSON: toJSONList :: ToJSON a => [a] -> Value
- Generics.SOP.JSON: Proxy :: Proxy
+ Generics.SOP.JSON: Proxy :: Proxy k
- Generics.SOP.JSON: data Proxy (t :: k) :: k -> *
+ Generics.SOP.JSON: data Proxy k (t :: k) :: forall k. k -> *
- Generics.SOP.JSON: gparseJSON :: (Generic a, HasDatatypeInfo a, All2 FromJSON (Code a)) => JsonOptions -> Value -> Parser a
+ Generics.SOP.JSON: gparseJSON :: forall a. (Generic a, HasDatatypeInfo a, All2 FromJSON (Code a)) => JsonOptions -> Value -> Parser a
- Generics.SOP.JSON: gtoJSON :: (Generic a, HasDatatypeInfo a, All2 ToJSON (Code a)) => JsonOptions -> a -> Value
+ Generics.SOP.JSON: gtoJSON :: forall a. (Generic a, HasDatatypeInfo a, All2 ToJSON (Code a)) => JsonOptions -> a -> Value
- Generics.SOP.JSON: gupdateFromJSON :: (Generic a, HasDatatypeInfo a, All UpdateFromJSON xs, Code a ~ '[xs]) => JsonOptions -> Value -> Parser (a -> a)
+ Generics.SOP.JSON: gupdateFromJSON :: forall a xs. (Generic a, HasDatatypeInfo a, All UpdateFromJSON xs, Code a ~ '[xs]) => JsonOptions -> Value -> Parser (a -> a)
- Generics.SOP.JSON: jsonInfo :: (HasDatatypeInfo a, SListI (Code a)) => Proxy a -> JsonOptions -> NP JsonInfo (Code a)
+ Generics.SOP.JSON: jsonInfo :: forall a. (HasDatatypeInfo a, SListI (Code a)) => Proxy a -> JsonOptions -> NP JsonInfo (Code a)
- Generics.SOP.JSON.Model: Tagged :: b -> Tagged b
+ Generics.SOP.JSON.Model: Tagged :: b -> Tagged k b
- Generics.SOP.JSON.Model: [unTagged] :: Tagged b -> b
+ Generics.SOP.JSON.Model: [unTagged] :: Tagged k b -> b
- Generics.SOP.JSON.Model: gjsonModel :: (HasDatatypeInfo a, All2 JsonModel (Code a)) => JsonOptions -> Tagged a Value
+ Generics.SOP.JSON.Model: gjsonModel :: forall a. (HasDatatypeInfo a, All2 JsonModel (Code a)) => JsonOptions -> Tagged a Value
- Generics.SOP.JSON.Model: newtype Tagged (s :: k) b :: k -> * -> *
+ Generics.SOP.JSON.Model: newtype Tagged k (s :: k) b :: forall k. k -> * -> *

Files

json-sop.cabal view
@@ -1,5 +1,5 @@ name:                json-sop-version:             0.2.0.1+version:             0.2.0.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 == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1+tested-with:         GHC == 7.6.3, GHC == 7.8.4, GHC == 7.10.3, GHC == 8.0.1, GHC == 8.0.2, GHC == 8.1.*  source-repository head   type:                git@@ -27,11 +27,11 @@                        generics-sop         >= 0.2  && < 0.3,                        lens-sop             >= 0.2  && < 0.3,                        tagged               >= 0.7  && < 0.9,-                       aeson                >= 0.7  && < 0.12,-                       vector               >= 0.10 && < 0.12,+                       aeson                >= 0.7  && < 1.2,+                       vector               >= 0.10 && < 0.13,                        text                 >= 1.1  && < 1.3,                        unordered-containers >= 0.2  && < 0.3,-                       time                 >= 1.4  && < 1.7,+                       time                 >= 1.4  && < 1.9,                        transformers         >= 0.3  && < 0.6   hs-source-dirs:      src   default-language:    Haskell2010
src/Generics/SOP/JSON.hs view
@@ -114,10 +114,10 @@     ShapeCons ShapeNil -> JsonOne      (tag n)     _                  -> JsonMultiple (tag n) jsonInfoFor opts d tag (Record n fields) =-    JsonRecord (tag n) (hliftA fieldName fields)+    JsonRecord (tag n) (hliftA jfieldName fields)   where-    fieldName :: FieldInfo a -> K String a-    fieldName (FieldInfo name) = K (jsonFieldName opts d name)+    jfieldName :: FieldInfo a -> K String a+    jfieldName (FieldInfo name) = K (jsonFieldName opts d name)  jsonInfo :: forall a. (HasDatatypeInfo a, SListI (Code a))          => Proxy a -> JsonOptions -> NP JsonInfo (Code a)@@ -204,8 +204,8 @@     return $ SOP $ unK (inj prod)   where     aux :: FromJSON a => K (Maybe String, Value) a -> Parser a-    aux (K (Just fieldName, val)) = modifyFailure (\str -> fieldName ++ ": " ++ str) $ parseJSON val-    aux (K (Nothing,        val)) = parseJSON val+    aux (K (Just fName, val)) = modifyFailure (\str -> fName ++ ": " ++ str) $ parseJSON val+    aux (K (Nothing,    val)) = parseJSON val  -- | Given information about a constructor, check if the given value has the -- right shape, and if so, return a product of (still encoded) values for