json-sop 0.2.2 → 0.2.3
raw patch · 2 files changed
+15/−9 lines, 2 filesdep ~aesondep ~basedep ~textPVP: major bump suggested
API removals or changes: PVP suggests a major version bump
Dependency ranges changed: aeson, base, text, time
API changes (from Hackage documentation)
+ Generics.SOP.JSON: omitField :: ToJSON a => a -> Bool
+ Generics.SOP.JSON: omittedField :: FromJSON a => Maybe a
- Generics.SOP.JSON: class FromJSON a
+ Generics.SOP.JSON: class () => FromJSON a
- Generics.SOP.JSON: class ToJSON a
+ Generics.SOP.JSON: class () => ToJSON a
- Generics.SOP.JSON: data Proxy (t :: k)
+ Generics.SOP.JSON: data () => Proxy (t :: k)
- Generics.SOP.JSON.Model: newtype Tagged (s :: k) b
+ Generics.SOP.JSON.Model: newtype () => Tagged (s :: k) b
Files
- json-sop.cabal +11/−6
- src/Generics/SOP/Util/PartialResult.hs +4/−3
json-sop.cabal view
@@ -1,5 +1,5 @@ name: json-sop-version: 0.2.2+version: 0.2.3 synopsis: Generics JSON (de)serialization using generics-sop description: This library contains generic serialization and deserialization functions@@ -13,7 +13,12 @@ category: Generics build-type: Simple cabal-version: >=1.10-tested-with: GHC ==8.8.4 || ==8.10.7 || ==9.0.2 || ==9.2.5 || ==9.4.4+tested-with: GHC==8.10.7+ , GHC==9.2.8+ , GHC==9.4.8+ , GHC==9.6.6+ , GHC==9.8.2+ , GHC==9.10.1 source-repository head type: git@@ -23,17 +28,17 @@ exposed-modules: Generics.SOP.JSON Generics.SOP.JSON.Model other-modules: Generics.SOP.Util.PartialResult- build-depends: base >= 4.11 && < 4.18,+ build-depends: base >= 4.11 && < 4.21, generics-sop >= 0.2.3 && < 0.6, -- lens-sop changed API in 0.3 lens-sop >= 0.3 && < 0.4, tagged >= 0.7 && < 0.9,- aeson >= 1.4 && < 2.2,+ aeson >= 1.4 && < 2.3, vector >= 0.10 && < 0.14,- text >= 1.1 && < 2.1,+ text >= 1.1 && < 2.2, unordered-containers >= 0.2 && < 0.3,- time >= 1.4 && < 1.14,+ time >= 1.4 && < 1.15, transformers >= 0.3 && < 0.7 hs-source-dirs: src default-language: Haskell2010
src/Generics/SOP/Util/PartialResult.hs view
@@ -10,6 +10,7 @@ import Control.Applicative import Control.Monad import Control.Monad.Trans.Class+import Data.Kind -- | Repeat f zero or more times --@@ -22,7 +23,7 @@ -- try any more parsers for other constructors even if the parser for T1 -- now fails in parsing the arguments of T1. Instead, we want to give the -- error message about attempting to parse T1.-data Partial (f :: * -> *) (a :: *) =+data Partial (f :: Type -> Type) (a :: Type) = Fail [String] | PZero a | PSucc (f (Partial f a))@@ -36,7 +37,7 @@ fmap f (PSucc pa) = PSucc (fmap (fmap f) pa) instance Functor f => Monad (Partial f) where- return = PZero+ return = pure #if !MIN_VERSION_base(4,13,0) fail = Fail . return #endif@@ -66,7 +67,7 @@ lift ma = PSucc (PZero `liftM` ma) instance Functor f => Applicative (Partial f) where- pure = return+ pure = PZero f <*> a = do f' <- f ; a' <- a ; return (f' a') instance (MonadPlus f, Functor f) => Alternative (Partial f) where