protobuf-0.2.1.3: Google Protocol Buffers via GHC.Generics

Safe HaskellNone
LanguageHaskell2010

Data.ProtocolBuffers.Internal

Synopsis

Documentation

type Tag = Word32 Source #

Field identifiers

data WireField Source #

A representation of the wire format as described in https://developers.google.com/protocol-buffers/docs/encoding#structure

Constructors

VarintField !Tag !Word64

For: int32, int64, uint32, uint64, sint32, sint64, bool, enum

Fixed64Field !Tag !Word64

For: fixed64, sfixed64, double

DelimitedField !Tag !ByteString

For: string, bytes, embedded messages, packed repeated fields

StartField !Tag

For: groups (deprecated)

EndField !Tag

For: groups (deprecated)

Fixed32Field !Tag !Word32

For: fixed32, sfixed32, float

Instances
Eq WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Ord WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Show WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Encode (HashMap Tag [WireField]) Source #

Untyped message encoding

Instance details

Defined in Data.ProtocolBuffers.Encode

Decode (HashMap Tag [WireField]) Source #

Untyped message decoding, decode = id

Instance details

Defined in Data.ProtocolBuffers.Decode

class EncodeWire a where Source #

Methods

encodeWire :: Tag -> a -> Put Source #

Instances
EncodeWire Bool Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Bool -> Put Source #

EncodeWire Double Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Double -> Put Source #

EncodeWire Float Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Float -> Put Source #

EncodeWire Int32 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Int32 -> Put Source #

EncodeWire Int64 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Int64 -> Put Source #

EncodeWire Word32 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Word32 -> Put Source #

EncodeWire Word64 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Word64 -> Put Source #

EncodeWire String Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> String -> Put Source #

EncodeWire ByteString Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire Text Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Text -> Put Source #

EncodeWire WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire a => EncodeWire [Value a] Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> [Value a] -> Put Source #

EncodeWire a => EncodeWire (Maybe (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Maybe (Value a) -> Put Source #

(Foldable f, Enum a) => EncodeWire (f (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> f (Enumeration a) -> Put Source #

(Foldable f, Encode m) => EncodeWire (f (Message m)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

encodeWire :: Tag -> f (Message m) -> Put Source #

EncodeWire a => EncodeWire (Last (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Last (Value a) -> Put Source #

EncodeWire (Fixed Int32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Fixed Int32 -> Put Source #

EncodeWire (Fixed Int64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Fixed Int64 -> Put Source #

EncodeWire (Fixed Word32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (Fixed Word64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (Signed Int32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (Signed Int64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => EncodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire a => EncodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Always (Value a) -> Put Source #

EncodeWire a => EncodeWire (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Value a -> Put Source #

class DecodeWire a where Source #

Instances
DecodeWire Bool Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Double Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Float Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Int32 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Int64 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Word32 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Word64 Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire String Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire ByteString Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire Text Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire WireField Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (Maybe (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Maybe (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Last (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Fixed Int32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Fixed Int64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Fixed Word32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Fixed Word64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Signed Int32) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (Signed Int64) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (Always (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Decode m => DecodeWire (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

putVarSInt :: (Integral a, Bits a) => a -> Put Source #

This can be used on any Integral type and is needed for signed types; unsigned can use putVarUInt below. This has been changed to handle only up to 64 bit integral values (to match documentation).

putVarUInt :: (Integral a, Bits a) => a -> Put Source #

This should be used on unsigned Integral types only (not checked)

newtype Field (n :: Nat) a Source #

Fields are merely a way to hold a field tag along with its type, this shouldn't normally be referenced directly.

This provides better error messages than older versions which used Tagged

Constructors

Field 

Fields

Instances
Functor (Field n) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> Field n a -> Field n b #

(<$) :: a -> Field n b -> Field n a #

Foldable (Field n) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => Field n m -> m #

foldMap :: Monoid m => (a -> m) -> Field n a -> m #

foldr :: (a -> b -> b) -> b -> Field n a -> b #

foldr' :: (a -> b -> b) -> b -> Field n a -> b #

foldl :: (b -> a -> b) -> b -> Field n a -> b #

foldl' :: (b -> a -> b) -> b -> Field n a -> b #

foldr1 :: (a -> a -> a) -> Field n a -> a #

foldl1 :: (a -> a -> a) -> Field n a -> a #

toList :: Field n a -> [a] #

null :: Field n a -> Bool #

length :: Field n a -> Int #

elem :: Eq a => a -> Field n a -> Bool #

maximum :: Ord a => Field n a -> a #

minimum :: Ord a => Field n a -> a #

sum :: Num a => Field n a -> a #

product :: Num a => Field n a -> a #

Traversable (Field n) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> Field n a -> f (Field n b) #

sequenceA :: Applicative f => Field n (f a) -> f (Field n a) #

mapM :: Monad m => (a -> m b) -> Field n a -> m (Field n b) #

sequence :: Monad m => Field n (m a) -> m (Field n a) #

Bounded a => Bounded (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

minBound :: Field n a #

maxBound :: Field n a #

Enum a => Enum (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Field n a -> Field n a #

pred :: Field n a -> Field n a #

toEnum :: Int -> Field n a #

fromEnum :: Field n a -> Int #

enumFrom :: Field n a -> [Field n a] #

enumFromThen :: Field n a -> Field n a -> [Field n a] #

enumFromTo :: Field n a -> Field n a -> [Field n a] #

enumFromThenTo :: Field n a -> Field n a -> Field n a -> [Field n a] #

Eq a => Eq (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(==) :: Field n a -> Field n a -> Bool #

(/=) :: Field n a -> Field n a -> Bool #

Ord a => Ord (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: Field n a -> Field n a -> Ordering #

(<) :: Field n a -> Field n a -> Bool #

(<=) :: Field n a -> Field n a -> Bool #

(>) :: Field n a -> Field n a -> Bool #

(>=) :: Field n a -> Field n a -> Bool #

max :: Field n a -> Field n a -> Field n a #

min :: Field n a -> Field n a -> Field n a #

Show a => Show (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

showsPrec :: Int -> Field n a -> ShowS #

show :: Field n a -> String #

showList :: [Field n a] -> ShowS #

Semigroup a => Semigroup (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(<>) :: Field n a -> Field n a -> Field n a #

sconcat :: NonEmpty (Field n a) -> Field n a #

stimes :: Integral b => b -> Field n a -> Field n a #

Monoid a => Monoid (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

mempty :: Field n a #

mappend :: Field n a -> Field n a -> Field n a #

mconcat :: [Field n a] -> Field n a #

NFData a => NFData (Field n a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: Field n a -> () #

HasField (Field n (PackedField (PackedList (Enumeration a)))) Source #

Iso: FieldType (Packed n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) :: Type Source #

HasField (Field n (PackedField (PackedList (Value a)))) Source #

Iso: FieldType (Packed n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Value a)))) :: Type Source #

HasField (Field n (RepeatedField [Enumeration a])) Source #

Iso: FieldType (RepeatedField n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) :: Type Source #

HasField (Field n (RepeatedField [Value a])) Source #

Iso: FieldType (RepeatedField n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) :: Type Source #

HasField (Field n (OptionalField (Last (Enumeration a)))) Source #

Iso: FieldType (OptionalField n (Enumeration a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) :: Type Source #

HasField (Field n (OptionalField (Last (Value a)))) Source #

Iso: FieldType (OptionalField n (Value a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source #

Iso: FieldType (RequiredField n (Enumeration a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Value a)))) Source #

Iso: FieldType (RequiredField n (Value a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) :: Type Source #

HasField (Field n (RepeatedField [Message a])) Source #

Iso: FieldType (RepeatedField n (Message a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) :: Type Source #

HasField (Field n (OptionalField (Maybe (Message a)))) Source #

Iso: FieldType (OptionalField n (Message a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Message a)))) Source #

Iso: FieldType (RequiredField n (Message a)) = a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) :: Type Source #

(EncodeWire a, KnownNat n, Foldable f) => GEncode (K1 i (Field n (f a)) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: K1 i (Field n (f a)) a0 -> Put

(DecodeWire (PackedList a), KnownNat n) => GDecode (K1 i (Packed n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Packed n a) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Value a)))) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Repeated n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Repeated n a) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Enumeration a)))) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Value a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (OptionalField (Maybe (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Maybe (Message a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Message a)))) a0)

type FieldType (Field n (RepeatedField [Value a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Value a])) = [a]
type FieldType (Field n (OptionalField (Last (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Enumeration a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]
type FieldType (Field n (RepeatedField [Message a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RepeatedField [Message a])) = [a]
type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RequiredField (Always (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

newtype Value a Source #

Value selects the normal/typical way for encoding scalar (primitive) values.

Constructors

Value 

Fields

Instances
Functor Value Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> Value a -> Value b #

(<$) :: a -> Value b -> Value a #

Foldable Value Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => Value m -> m #

foldMap :: Monoid m => (a -> m) -> Value a -> m #

foldr :: (a -> b -> b) -> b -> Value a -> b #

foldr' :: (a -> b -> b) -> b -> Value a -> b #

foldl :: (b -> a -> b) -> b -> Value a -> b #

foldl' :: (b -> a -> b) -> b -> Value a -> b #

foldr1 :: (a -> a -> a) -> Value a -> a #

foldl1 :: (a -> a -> a) -> Value a -> a #

toList :: Value a -> [a] #

null :: Value a -> Bool #

length :: Value a -> Int #

elem :: Eq a => a -> Value a -> Bool #

maximum :: Ord a => Value a -> a #

minimum :: Ord a => Value a -> a #

sum :: Num a => Value a -> a #

product :: Num a => Value a -> a #

Traversable Value Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> Value a -> f (Value b) #

sequenceA :: Applicative f => Value (f a) -> f (Value a) #

mapM :: Monad m => (a -> m b) -> Value a -> m (Value b) #

sequence :: Monad m => Value (m a) -> m (Value a) #

Bounded a => Bounded (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

minBound :: Value a #

maxBound :: Value a #

Enum a => Enum (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Value a -> Value a #

pred :: Value a -> Value a #

toEnum :: Int -> Value a #

fromEnum :: Value a -> Int #

enumFrom :: Value a -> [Value a] #

enumFromThen :: Value a -> Value a -> [Value a] #

enumFromTo :: Value a -> Value a -> [Value a] #

enumFromThenTo :: Value a -> Value a -> Value a -> [Value a] #

Eq a => Eq (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(==) :: Value a -> Value a -> Bool #

(/=) :: Value a -> Value a -> Bool #

Ord a => Ord (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: Value a -> Value a -> Ordering #

(<) :: Value a -> Value a -> Bool #

(<=) :: Value a -> Value a -> Bool #

(>) :: Value a -> Value a -> Bool #

(>=) :: Value a -> Value a -> Bool #

max :: Value a -> Value a -> Value a #

min :: Value a -> Value a -> Value a #

Show a => Show (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

showsPrec :: Int -> Value a -> ShowS #

show :: Value a -> String #

showList :: [Value a] -> ShowS #

Semigroup a => Semigroup (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(<>) :: Value a -> Value a -> Value a #

sconcat :: NonEmpty (Value a) -> Value a #

stimes :: Integral b => b -> Value a -> Value a #

Monoid a => Monoid (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

mempty :: Value a #

mappend :: Value a -> Value a -> Value a #

mconcat :: [Value a] -> Value a #

NFData a => NFData (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: Value a -> () #

DecodeWire a => DecodeWire (Maybe (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Last (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire a => EncodeWire [Value a] Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> [Value a] -> Put Source #

EncodeWire a => EncodeWire (Maybe (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Maybe (Value a) -> Put Source #

EncodeWire a => EncodeWire (Last (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Last (Value a) -> Put Source #

EncodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire a => EncodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Always (Value a) -> Put Source #

EncodeWire a => EncodeWire (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Value a -> Put Source #

HasField (Field n (PackedField (PackedList (Value a)))) Source #

Iso: FieldType (Packed n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Value a)))) :: Type Source #

HasField (Field n (RepeatedField [Value a])) Source #

Iso: FieldType (RepeatedField n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) :: Type Source #

HasField (Field n (OptionalField (Last (Value a)))) Source #

Iso: FieldType (OptionalField n (Value a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Value a)))) Source #

Iso: FieldType (RequiredField n (Value a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) :: Type Source #

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Value a)))) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Value a)))) a0)

type Required n (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type Required n (Value a) = Field n (RequiredField (Always (Value a)))
type Optional n (Value a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type Optional n (Value a) = Field n (OptionalField (Last (Value a)))
type FieldType (Field n (RepeatedField [Value a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Value a])) = [a]
type FieldType (Field n (OptionalField (Last (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

newtype Always a Source #

To provide consistent instances for serialization a Traversable Functor is needed to make RequiredField fields have the same shape as OptionalField, RepeatedField and Packed.

This is the Identity Functor with a Show instance.

Constructors

Always 

Fields

Instances
Functor Always Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> Always a -> Always b #

(<$) :: a -> Always b -> Always a #

Foldable Always Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => Always m -> m #

foldMap :: Monoid m => (a -> m) -> Always a -> m #

foldr :: (a -> b -> b) -> b -> Always a -> b #

foldr' :: (a -> b -> b) -> b -> Always a -> b #

foldl :: (b -> a -> b) -> b -> Always a -> b #

foldl' :: (b -> a -> b) -> b -> Always a -> b #

foldr1 :: (a -> a -> a) -> Always a -> a #

foldl1 :: (a -> a -> a) -> Always a -> a #

toList :: Always a -> [a] #

null :: Always a -> Bool #

length :: Always a -> Int #

elem :: Eq a => a -> Always a -> Bool #

maximum :: Ord a => Always a -> a #

minimum :: Ord a => Always a -> a #

sum :: Num a => Always a -> a #

product :: Num a => Always a -> a #

Traversable Always Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> Always a -> f (Always b) #

sequenceA :: Applicative f => Always (f a) -> f (Always a) #

mapM :: Monad m => (a -> m b) -> Always a -> m (Always b) #

sequence :: Monad m => Always (m a) -> m (Always a) #

Bounded a => Bounded (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

minBound :: Always a #

maxBound :: Always a #

Enum a => Enum (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Always a -> Always a #

pred :: Always a -> Always a #

toEnum :: Int -> Always a #

fromEnum :: Always a -> Int #

enumFrom :: Always a -> [Always a] #

enumFromThen :: Always a -> Always a -> [Always a] #

enumFromTo :: Always a -> Always a -> [Always a] #

enumFromThenTo :: Always a -> Always a -> Always a -> [Always a] #

Eq a => Eq (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(==) :: Always a -> Always a -> Bool #

(/=) :: Always a -> Always a -> Bool #

Ord a => Ord (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: Always a -> Always a -> Ordering #

(<) :: Always a -> Always a -> Bool #

(<=) :: Always a -> Always a -> Bool #

(>) :: Always a -> Always a -> Bool #

(>=) :: Always a -> Always a -> Bool #

max :: Always a -> Always a -> Always a #

min :: Always a -> Always a -> Always a #

Show a => Show (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

showsPrec :: Int -> Always a -> ShowS #

show :: Always a -> String #

showList :: [Always a] -> ShowS #

Semigroup (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(<>) :: Always a -> Always a -> Always a #

sconcat :: NonEmpty (Always a) -> Always a #

stimes :: Integral b => b -> Always a -> Always a #

Monoid (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

mempty :: Always a #

mappend :: Always a -> Always a -> Always a #

mconcat :: [Always a] -> Always a #

NFData a => NFData (Always a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: Always a -> () #

Enum a => DecodeWire (Always (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire a => DecodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire a => EncodeWire (Always (Value a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> Always (Value a) -> Put Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source #

Iso: FieldType (RequiredField n (Enumeration a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Value a)))) Source #

Iso: FieldType (RequiredField n (Value a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Message a)))) Source #

Iso: FieldType (RequiredField n (Message a)) = a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) :: Type Source #

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Value a)))) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Message a)))) a0)

type FieldType (Field n (RequiredField (Always (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

newtype Enumeration a Source #

Enumeration fields use fromEnum and toEnum when encoding and decoding messages.

Constructors

Enumeration 

Fields

Instances
Functor Enumeration Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> Enumeration a -> Enumeration b #

(<$) :: a -> Enumeration b -> Enumeration a #

Foldable Enumeration Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => Enumeration m -> m #

foldMap :: Monoid m => (a -> m) -> Enumeration a -> m #

foldr :: (a -> b -> b) -> b -> Enumeration a -> b #

foldr' :: (a -> b -> b) -> b -> Enumeration a -> b #

foldl :: (b -> a -> b) -> b -> Enumeration a -> b #

foldl' :: (b -> a -> b) -> b -> Enumeration a -> b #

foldr1 :: (a -> a -> a) -> Enumeration a -> a #

foldl1 :: (a -> a -> a) -> Enumeration a -> a #

toList :: Enumeration a -> [a] #

null :: Enumeration a -> Bool #

length :: Enumeration a -> Int #

elem :: Eq a => a -> Enumeration a -> Bool #

maximum :: Ord a => Enumeration a -> a #

minimum :: Ord a => Enumeration a -> a #

sum :: Num a => Enumeration a -> a #

product :: Num a => Enumeration a -> a #

Traversable Enumeration Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> Enumeration a -> f (Enumeration b) #

sequenceA :: Applicative f => Enumeration (f a) -> f (Enumeration a) #

mapM :: Monad m => (a -> m b) -> Enumeration a -> m (Enumeration b) #

sequence :: Monad m => Enumeration (m a) -> m (Enumeration a) #

Bounded a => Bounded (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Enum a => Enum (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Eq a => Eq (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Ord a => Ord (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup a => Semigroup (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid a => Monoid (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: Enumeration a -> () #

Enum a => DecodeWire (Maybe (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => DecodeWire (Always (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

(Foldable f, Enum a) => EncodeWire (f (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

encodeWire :: Tag -> f (Enumeration a) -> Put Source #

Enum a => EncodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

HasField (Field n (PackedField (PackedList (Enumeration a)))) Source #

Iso: FieldType (Packed n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) :: Type Source #

HasField (Field n (RepeatedField [Enumeration a])) Source #

Iso: FieldType (RepeatedField n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) :: Type Source #

HasField (Field n (OptionalField (Last (Enumeration a)))) Source #

Iso: FieldType (OptionalField n (Enumeration a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source #

Iso: FieldType (RequiredField n (Enumeration a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) :: Type Source #

(Enum a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Enumeration a)))) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

type Required n (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type Optional n (Enumeration a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Enumeration a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

newtype RequiredField a Source #

RequiredField is a newtype wrapped used to break overlapping instances for encoding and decoding values

Constructors

Required 

Fields

Instances
Functor RequiredField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> RequiredField a -> RequiredField b #

(<$) :: a -> RequiredField b -> RequiredField a #

Foldable RequiredField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => RequiredField m -> m #

foldMap :: Monoid m => (a -> m) -> RequiredField a -> m #

foldr :: (a -> b -> b) -> b -> RequiredField a -> b #

foldr' :: (a -> b -> b) -> b -> RequiredField a -> b #

foldl :: (b -> a -> b) -> b -> RequiredField a -> b #

foldl' :: (b -> a -> b) -> b -> RequiredField a -> b #

foldr1 :: (a -> a -> a) -> RequiredField a -> a #

foldl1 :: (a -> a -> a) -> RequiredField a -> a #

toList :: RequiredField a -> [a] #

null :: RequiredField a -> Bool #

length :: RequiredField a -> Int #

elem :: Eq a => a -> RequiredField a -> Bool #

maximum :: Ord a => RequiredField a -> a #

minimum :: Ord a => RequiredField a -> a #

sum :: Num a => RequiredField a -> a #

product :: Num a => RequiredField a -> a #

Traversable RequiredField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> RequiredField a -> f (RequiredField b) #

sequenceA :: Applicative f => RequiredField (f a) -> f (RequiredField a) #

mapM :: Monad m => (a -> m b) -> RequiredField a -> m (RequiredField b) #

sequence :: Monad m => RequiredField (m a) -> m (RequiredField a) #

Bounded a => Bounded (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Enum a => Enum (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Eq a => Eq (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Ord a => Ord (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup a => Semigroup (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid a => Monoid (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (RequiredField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: RequiredField a -> () #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source #

Iso: FieldType (RequiredField n (Enumeration a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Value a)))) Source #

Iso: FieldType (RequiredField n (Value a)) = a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Message a)))) Source #

Iso: FieldType (RequiredField n (Message a)) = a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) :: Type Source #

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Value a)))) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Message a)))) a0)

type FieldType (Field n (RequiredField (Always (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RequiredField (Always (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

newtype OptionalField a Source #

OptionalField is a newtype wrapped used to break overlapping instances for encoding and decoding values

Constructors

Optional 

Fields

Instances
Functor OptionalField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> OptionalField a -> OptionalField b #

(<$) :: a -> OptionalField b -> OptionalField a #

Foldable OptionalField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => OptionalField m -> m #

foldMap :: Monoid m => (a -> m) -> OptionalField a -> m #

foldr :: (a -> b -> b) -> b -> OptionalField a -> b #

foldr' :: (a -> b -> b) -> b -> OptionalField a -> b #

foldl :: (b -> a -> b) -> b -> OptionalField a -> b #

foldl' :: (b -> a -> b) -> b -> OptionalField a -> b #

foldr1 :: (a -> a -> a) -> OptionalField a -> a #

foldl1 :: (a -> a -> a) -> OptionalField a -> a #

toList :: OptionalField a -> [a] #

null :: OptionalField a -> Bool #

length :: OptionalField a -> Int #

elem :: Eq a => a -> OptionalField a -> Bool #

maximum :: Ord a => OptionalField a -> a #

minimum :: Ord a => OptionalField a -> a #

sum :: Num a => OptionalField a -> a #

product :: Num a => OptionalField a -> a #

Traversable OptionalField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> OptionalField a -> f (OptionalField b) #

sequenceA :: Applicative f => OptionalField (f a) -> f (OptionalField a) #

mapM :: Monad m => (a -> m b) -> OptionalField a -> m (OptionalField b) #

sequence :: Monad m => OptionalField (m a) -> m (OptionalField a) #

Bounded a => Bounded (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Enum a => Enum (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Eq a => Eq (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Ord a => Ord (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup a => Semigroup (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid a => Monoid (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (OptionalField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: OptionalField a -> () #

HasField (Field n (OptionalField (Last (Enumeration a)))) Source #

Iso: FieldType (OptionalField n (Enumeration a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) :: Type Source #

HasField (Field n (OptionalField (Last (Value a)))) Source #

Iso: FieldType (OptionalField n (Value a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) :: Type Source #

HasField (Field n (OptionalField (Maybe (Message a)))) Source #

Iso: FieldType (OptionalField n (Message a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) :: Type Source #

(Enum a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Enumeration a)))) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Value a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (OptionalField (Maybe (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Maybe (Message a)))) a0)

type FieldType (Field n (OptionalField (Last (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

newtype RepeatedField a Source #

RepeatedField is a newtype wrapped used to break overlapping instances for encoding and decoding values

Constructors

Repeated 

Fields

Instances
Functor RepeatedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> RepeatedField a -> RepeatedField b #

(<$) :: a -> RepeatedField b -> RepeatedField a #

Foldable RepeatedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => RepeatedField m -> m #

foldMap :: Monoid m => (a -> m) -> RepeatedField a -> m #

foldr :: (a -> b -> b) -> b -> RepeatedField a -> b #

foldr' :: (a -> b -> b) -> b -> RepeatedField a -> b #

foldl :: (b -> a -> b) -> b -> RepeatedField a -> b #

foldl' :: (b -> a -> b) -> b -> RepeatedField a -> b #

foldr1 :: (a -> a -> a) -> RepeatedField a -> a #

foldl1 :: (a -> a -> a) -> RepeatedField a -> a #

toList :: RepeatedField a -> [a] #

null :: RepeatedField a -> Bool #

length :: RepeatedField a -> Int #

elem :: Eq a => a -> RepeatedField a -> Bool #

maximum :: Ord a => RepeatedField a -> a #

minimum :: Ord a => RepeatedField a -> a #

sum :: Num a => RepeatedField a -> a #

product :: Num a => RepeatedField a -> a #

Traversable RepeatedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> RepeatedField a -> f (RepeatedField b) #

sequenceA :: Applicative f => RepeatedField (f a) -> f (RepeatedField a) #

mapM :: Monad m => (a -> m b) -> RepeatedField a -> m (RepeatedField b) #

sequence :: Monad m => RepeatedField (m a) -> m (RepeatedField a) #

Bounded a => Bounded (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Enum a => Enum (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Eq a => Eq (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Ord a => Ord (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup a => Semigroup (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid a => Monoid (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (RepeatedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: RepeatedField a -> () #

HasField (Field n (RepeatedField [Enumeration a])) Source #

Iso: FieldType (RepeatedField n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) :: Type Source #

HasField (Field n (RepeatedField [Value a])) Source #

Iso: FieldType (RepeatedField n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) :: Type Source #

HasField (Field n (RepeatedField [Message a])) Source #

Iso: FieldType (RepeatedField n (Message a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) :: Type Source #

(DecodeWire a, KnownNat n) => GDecode (K1 i (Repeated n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Repeated n a) a0)

type FieldType (Field n (RepeatedField [Value a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Value a])) = [a]
type FieldType (Field n (RepeatedField [Enumeration a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (RepeatedField [Message a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RepeatedField [Message a])) = [a]

newtype PackedField a Source #

A Traversable Functor used to select packed sequence encoding/decoding.

Constructors

PackedField 

Fields

Instances
Functor PackedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> PackedField a -> PackedField b #

(<$) :: a -> PackedField b -> PackedField a #

Foldable PackedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => PackedField m -> m #

foldMap :: Monoid m => (a -> m) -> PackedField a -> m #

foldr :: (a -> b -> b) -> b -> PackedField a -> b #

foldr' :: (a -> b -> b) -> b -> PackedField a -> b #

foldl :: (b -> a -> b) -> b -> PackedField a -> b #

foldl' :: (b -> a -> b) -> b -> PackedField a -> b #

foldr1 :: (a -> a -> a) -> PackedField a -> a #

foldl1 :: (a -> a -> a) -> PackedField a -> a #

toList :: PackedField a -> [a] #

null :: PackedField a -> Bool #

length :: PackedField a -> Int #

elem :: Eq a => a -> PackedField a -> Bool #

maximum :: Ord a => PackedField a -> a #

minimum :: Ord a => PackedField a -> a #

sum :: Num a => PackedField a -> a #

product :: Num a => PackedField a -> a #

Traversable PackedField Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> PackedField a -> f (PackedField b) #

sequenceA :: Applicative f => PackedField (f a) -> f (PackedField a) #

mapM :: Monad m => (a -> m b) -> PackedField a -> m (PackedField b) #

sequence :: Monad m => PackedField (m a) -> m (PackedField a) #

Eq a => Eq (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Ord a => Ord (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup a => Semigroup (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid a => Monoid (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (PackedField a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: PackedField a -> () #

HasField (Field n (PackedField (PackedList (Enumeration a)))) Source #

Iso: FieldType (Packed n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) :: Type Source #

HasField (Field n (PackedField (PackedList (Value a)))) Source #

Iso: FieldType (Packed n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Value a)))) :: Type Source #

(DecodeWire (PackedList a), KnownNat n) => GDecode (K1 i (Packed n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Packed n a) a0)

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

newtype PackedList a Source #

A list that is stored in a packed format.

Constructors

PackedList 

Fields

Instances
Functor PackedList Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fmap :: (a -> b) -> PackedList a -> PackedList b #

(<$) :: a -> PackedList b -> PackedList a #

Foldable PackedList Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

fold :: Monoid m => PackedList m -> m #

foldMap :: Monoid m => (a -> m) -> PackedList a -> m #

foldr :: (a -> b -> b) -> b -> PackedList a -> b #

foldr' :: (a -> b -> b) -> b -> PackedList a -> b #

foldl :: (b -> a -> b) -> b -> PackedList a -> b #

foldl' :: (b -> a -> b) -> b -> PackedList a -> b #

foldr1 :: (a -> a -> a) -> PackedList a -> a #

foldl1 :: (a -> a -> a) -> PackedList a -> a #

toList :: PackedList a -> [a] #

null :: PackedList a -> Bool #

length :: PackedList a -> Int #

elem :: Eq a => a -> PackedList a -> Bool #

maximum :: Ord a => PackedList a -> a #

minimum :: Ord a => PackedList a -> a #

sum :: Num a => PackedList a -> a #

product :: Num a => PackedList a -> a #

Traversable PackedList Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

traverse :: Applicative f => (a -> f b) -> PackedList a -> f (PackedList b) #

sequenceA :: Applicative f => PackedList (f a) -> f (PackedList a) #

mapM :: Monad m => (a -> m b) -> PackedList a -> m (PackedList b) #

sequence :: Monad m => PackedList (m a) -> m (PackedList a) #

Eq a => Eq (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(==) :: PackedList a -> PackedList a -> Bool #

(/=) :: PackedList a -> PackedList a -> Bool #

Ord a => Ord (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Show a => Show (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Semigroup (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Monoid (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

NFData a => NFData (PackedList a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

Methods

rnf :: PackedList a -> () #

Enum a => DecodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

DecodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

Enum a => EncodeWire (PackedList (Enumeration a)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Bool)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Double)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Float)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Int64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word32)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value Word64)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Fixed Word64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int32))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

EncodeWire (PackedList (Value (Signed Int64))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Wire

HasField (Field n (PackedField (PackedList (Enumeration a)))) Source #

Iso: FieldType (Packed n (Enumeration a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) :: Type Source #

HasField (Field n (PackedField (PackedList (Value a)))) Source #

Iso: FieldType (Packed n (Value a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (PackedField (PackedList (Value a)))) :: Type Source #

(DecodeWire (PackedList a), KnownNat n) => GDecode (K1 i (Packed n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Packed n a) a0)

type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Types

type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

newtype Message m Source #

The way to embed a message within another message. These embedded messages are stored as length-delimited fields.

For example:

data Inner = Inner
   { innerField :: Required '1' (Value Int64)
   } deriving (Generic, Show)

 instance Encode Inner
instance Decode Inner

 data Outer = Outer
   { outerField :: Required '1' (Message Inner)
   } deriving (Generic, Show)

 instance Encode Outer
instance Decode Outer
 

It's worth noting that Message a is a Monoid and NFData instance. The Monoid behavior models that of the Protocol Buffers documentation, effectively Last. It's done with a fairly big hammer and it isn't possible to override this behavior. This can cause some less-obvious compile errors for paramterized Message types:

data Inner = Inner{inner :: RequiredField '2' (Value Float)} deriving (Generic, Show)
instance Encode Inner
instance Decode Inner

data Outer a = Outer{outer :: RequiredField '3' (Message a)} deriving (Generic, Show)
instance Encode a => Encode (Outer a)
instance Decode a => Decode (Outer a)
 

This fails because Decode needs to know that the message can be merged. The resulting error implies that you may want to add a constraint to the internal GMessageMonoid class:

/tmp/tst.hs:18:10:
  Could not deduce (protobuf-0.1:GMessageMonoid (Rep a))
    arising from a use of `protobuf-0.1: Decode .$gdmdecode'
  from the context (Decode a)
    bound by the instance declaration at /tmp/tst.hs:18:10-39
  Possible fix:
    add an instance declaration for
    (protobuf-0.1:GMessageMonoid (Rep a))
  In the expression:
    (protobuf-0.1:Decode.$gdmdecode)
  In an equation for decode:
      decode = (protobuf-0.1:Decode .$gdmdecode)
  In the instance declaration for `Decode (Outer a)'

The correct fix is to add the Monoid constraint for the message:

- instance (Encode a) => Decode (Outer a)
+ instance (Monoid (Message a), Decode a) => Decode (Outer a)

Constructors

Message 

Fields

Instances
Functor Message Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

fmap :: (a -> b) -> Message a -> Message b #

(<$) :: a -> Message b -> Message a #

Foldable Message Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

fold :: Monoid m => Message m -> m #

foldMap :: Monoid m => (a -> m) -> Message a -> m #

foldr :: (a -> b -> b) -> b -> Message a -> b #

foldr' :: (a -> b -> b) -> b -> Message a -> b #

foldl :: (b -> a -> b) -> b -> Message a -> b #

foldl' :: (b -> a -> b) -> b -> Message a -> b #

foldr1 :: (a -> a -> a) -> Message a -> a #

foldl1 :: (a -> a -> a) -> Message a -> a #

toList :: Message a -> [a] #

null :: Message a -> Bool #

length :: Message a -> Int #

elem :: Eq a => a -> Message a -> Bool #

maximum :: Ord a => Message a -> a #

minimum :: Ord a => Message a -> a #

sum :: Num a => Message a -> a #

product :: Num a => Message a -> a #

Traversable Message Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

traverse :: Applicative f => (a -> f b) -> Message a -> f (Message b) #

sequenceA :: Applicative f => Message (f a) -> f (Message a) #

mapM :: Monad m => (a -> m b) -> Message a -> m (Message b) #

sequence :: Monad m => Message (m a) -> m (Message a) #

Eq m => Eq (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

(==) :: Message m -> Message m -> Bool #

(/=) :: Message m -> Message m -> Bool #

Ord m => Ord (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

compare :: Message m -> Message m -> Ordering #

(<) :: Message m -> Message m -> Bool #

(<=) :: Message m -> Message m -> Bool #

(>) :: Message m -> Message m -> Bool #

(>=) :: Message m -> Message m -> Bool #

max :: Message m -> Message m -> Message m #

min :: Message m -> Message m -> Message m #

Show m => Show (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

showsPrec :: Int -> Message m -> ShowS #

show :: Message m -> String #

showList :: [Message m] -> ShowS #

(Generic m, GMessageMonoid (Rep m)) => Semigroup (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

(<>) :: Message m -> Message m -> Message m #

sconcat :: NonEmpty (Message m) -> Message m #

stimes :: Integral b => b -> Message m -> Message m #

(Generic m, GMessageMonoid (Rep m)) => Monoid (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

mempty :: Message m #

mappend :: Message m -> Message m -> Message m #

mconcat :: [Message m] -> Message m #

(Generic m, GMessageNFData (Rep m)) => NFData (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

rnf :: Message m -> () #

Decode m => DecodeWire (Message m) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

(Foldable f, Encode m) => EncodeWire (f (Message m)) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

encodeWire :: Tag -> f (Message m) -> Put Source #

HasField (Field n (RepeatedField [Message a])) Source #

Iso: FieldType (RepeatedField n (Message a)) = [a]

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) :: Type Source #

HasField (Field n (OptionalField (Maybe (Message a)))) Source #

Iso: FieldType (OptionalField n (Message a)) = Maybe a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) :: Type Source #

HasField (Field n (RequiredField (Always (Message a)))) Source #

Iso: FieldType (RequiredField n (Message a)) = a

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) :: Type Source #

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (OptionalField (Maybe (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Maybe (Message a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Message a)))) a0)

type Required n (Message a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type Optional n (Message a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RepeatedField [Message a])) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RepeatedField [Message a])) = [a]
type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

type FieldType (Field n (RequiredField (Always (Message a)))) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

class GDecode (f :: * -> *) Source #

Minimal complete definition

gdecode

Instances
GDecode (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (U1 a)

(DecodeWire (PackedList a), KnownNat n) => GDecode (K1 i (Packed n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Packed n a) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Value a)))) a0)

(DecodeWire a, KnownNat n) => GDecode (K1 i (Repeated n a) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Repeated n a) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Enumeration a)))) a0)

(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

(DecodeWire a, KnownNat n) => GDecode (K1 i (Field n (OptionalField (Last (Value a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Last (Value a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (OptionalField (Maybe (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (OptionalField (Maybe (Message a)))) a0)

(Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a)))) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Message a)))) a0)

(GDecode x, GDecode y) => GDecode (x :+: y) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get ((x :+: y) a)

(GDecode a, GDecode b) => GDecode (a :*: b) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get ((a :*: b) a0)

GDecode a => GDecode (M1 i c a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Decode

Methods

gdecode :: HashMap Tag [WireField] -> Get (M1 i c a a0)

class GEncode (f :: * -> *) Source #

Minimal complete definition

gencode

Instances
GEncode (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: U1 a -> Put

(EncodeWire a, KnownNat n, Foldable f) => GEncode (K1 i (Field n (f a)) :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: K1 i (Field n (f a)) a0 -> Put

(GEncode a, GEncode b) => GEncode (a :+: b) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: (a :+: b) a0 -> Put

(GEncode a, GEncode b) => GEncode (a :*: b) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: (a :*: b) a0 -> Put

GEncode a => GEncode (M1 i c a) Source # 
Instance details

Defined in Data.ProtocolBuffers.Encode

Methods

gencode :: M1 i c a a0 -> Put

class GMessageMonoid (f :: * -> *) Source #

Minimal complete definition

gmempty, gmappend

Instances
GMessageMonoid (U1 :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gmempty :: U1 a

gmappend :: U1 a -> U1 a -> U1 a

Monoid c => GMessageMonoid (K1 i c :: Type -> Type) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gmempty :: K1 i c a

gmappend :: K1 i c a -> K1 i c a -> K1 i c a

(GMessageMonoid x, GMessageMonoid y) => GMessageMonoid (x :+: y) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gmempty :: (x :+: y) a

gmappend :: (x :+: y) a -> (x :+: y) a -> (x :+: y) a

(GMessageMonoid x, GMessageMonoid y) => GMessageMonoid (x :*: y) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gmempty :: (x :*: y) a

gmappend :: (x :*: y) a -> (x :*: y) a -> (x :*: y) a

GMessageMonoid f => GMessageMonoid (M1 i c f) Source # 
Instance details

Defined in Data.ProtocolBuffers.Message

Methods

gmempty :: M1 i c f a

gmappend :: M1 i c f a -> M1 i c f a -> M1 i c f a