{-# LANGUAGE UndecidableInstances #-}
module StreamPatch.Patch where
import StreamPatch.HFunctorList
import GHC.Generics ( Generic )
import Data.Data ( Data, Typeable )
import Data.Aeson
data Patch s fs a = Patch
{ forall s (fs :: [* -> *]) a. Patch s fs a -> a
patchData :: a
, forall s (fs :: [* -> *]) a. Patch s fs a -> s
patchSeek :: s
, forall s (fs :: [* -> *]) a. Patch s fs a -> HFunctorList fs a
patchMeta :: HFunctorList fs a
} deriving stock ((forall x. Patch s fs a -> Rep (Patch s fs a) x)
-> (forall x. Rep (Patch s fs a) x -> Patch s fs a)
-> Generic (Patch s fs a)
forall x. Rep (Patch s fs a) x -> Patch s fs a
forall x. Patch s fs a -> Rep (Patch s fs a) x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
forall s (fs :: [* -> *]) a x. Rep (Patch s fs a) x -> Patch s fs a
forall s (fs :: [* -> *]) a x. Patch s fs a -> Rep (Patch s fs a) x
$cto :: forall s (fs :: [* -> *]) a x. Rep (Patch s fs a) x -> Patch s fs a
$cfrom :: forall s (fs :: [* -> *]) a x. Patch s fs a -> Rep (Patch s fs a) x
Generic)
deriving stock instance (Eq a, Eq s, Eq (HFunctorList fs a)) => Eq (Patch s fs a)
deriving stock instance (Show a, Show s, Show (HFunctorList fs a)) => Show (Patch s fs a)
deriving stock instance (Data a, Data s, Data (HFunctorList fs a), Typeable fs) => Data (Patch s fs a)
deriving stock instance Functor (HFunctorList fs) => Functor (Patch s fs)
deriving stock instance Foldable (HFunctorList fs) => Foldable (Patch s fs)
deriving stock instance Traversable (HFunctorList fs) => Traversable (Patch s fs)
instance (ToJSON a, ToJSON s, ToJSON (HFunctorList fs a)) => ToJSON (Patch s fs a)
instance (FromJSON a, FromJSON s, FromJSON (HFunctorList fs a)) => FromJSON (Patch s fs a)