Safe Haskell | None |
---|---|
Language | Haskell2010 |
- gserializeDefault :: (Representable a, GSerial (Rep a), MonadPut m) => a -> m ()
- gdeserializeDefault :: (Representable a, GSerial (Rep a), MonadGet m) => m a
- class (Representable a, GSerial (Rep a)) => RepGSerial a
- class GSerial a where
- gserialize :: MonadPut m => a -> m ()
- gdeserialize :: MonadGet m => m a
- class GSumSerial a
- class GSumSize a
Documentation
You can use gserializeDefault
and gdeserializeDefault
as your generic
serialize
and deserialize
implementations for any Representable
type as follows:
instanceSerial
MyType where serialize =gserializeDefault
deserialize =gdeserializeDefault
gserializeDefault :: (Representable a, GSerial (Rep a), MonadPut m) => a -> m () Source
gdeserializeDefault :: (Representable a, GSerial (Rep a), MonadGet m) => m a Source
class (Representable a, GSerial (Rep a)) => RepGSerial a Source
is simply a synonym for
RepGSerial
(
with the convenient
kind Representable
a, GSerial
(Rep
a))(* ->
Constraint
)
(Representable a, GSerial (Rep a)) => RepGSerial a Source |
Internals
gserialize :: MonadPut m => a -> m () Source
gdeserialize :: MonadGet m => m a Source
GSerial Z Source | |
GSerial U Source | |
Serial a => GSerial (Var a) Source | |
Serial a => GSerial (Rec a) Source | |
(GSumSerial a, GSumSerial b, GSerial a, GSerial b, GSumSize * a, GSumSize * b) => GSerial ((:+:) a b) Source | |
(GSerial a, GSerial b) => GSerial ((:*:) a b) Source | |
GSerial a => GSerial (CEq k k c p q a) Source | |
GSerial a => GSerial (CEq k k c p p a) Source |
Even more internal
class GSumSerial a Source
putSum, getSum
(GSumSerial a, GSumSerial b, GSerial a, GSerial b) => GSumSerial ((:+:) a b) Source | |
GSerial a => GSumSerial (CEq k k c p q a) Source | |
GSerial a => GSumSerial (CEq k k c p p a) Source |