antiope-messages 7.3.1 → 7.3.2
raw patch · 2 files changed
+5/−3 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ Antiope.Messages.Types: instance GHC.Generics.Generic (Antiope.Messages.Types.With fld a)
+ Antiope.Messages.Types: instance GHC.Generics.Generic (Antiope.Messages.Types.WithEncoded fld a)
Files
antiope-messages.cabal view
@@ -1,7 +1,7 @@ cabal-version: 2.2 name: antiope-messages-version: 7.3.1+version: 7.3.2 synopsis: Please see the README on Github at <https://github.com/arbor/antiope#readme> description: Please see the README on Github at <https://github.com/arbor/antiope#readme>. category: Services
src/Antiope/Messages/Types.hs view
@@ -1,5 +1,6 @@ {-# LANGUAGE AllowAmbiguousTypes #-} {-# LANGUAGE DataKinds #-}+{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE GADTs #-} {-# LANGUAGE KindSignatures #-} {-# LANGUAGE MultiParamTypeClasses #-}@@ -17,6 +18,7 @@ import Data.Coerce (coerce) import Data.Proxy import Data.Text (Text)+import GHC.Generics import GHC.TypeLits import qualified Data.Aeson as Aeson@@ -68,10 +70,10 @@ {-# INLINE fromWith6 #-} -- | Represents a JSON value of type 'a' that is encoded as a string in a field 'fld'-newtype WithEncoded (fld :: Symbol) a = WithEncoded a deriving (Show, Eq, Ord)+newtype WithEncoded (fld :: Symbol) a = WithEncoded a deriving (Show, Eq, Ord, Generic) -- | Represents a JSON value of type 'a' in a field 'fld'-newtype With (fld :: Symbol) a = With a deriving (Show, Eq, Ord)+newtype With (fld :: Symbol) a = With a deriving (Show, Eq, Ord, Generic) instance (KnownSymbol fld, FromJSON a) => FromJSON (WithEncoded fld a) where parseJSON =