protobuf-0.2.1.3: Google Protocol Buffers via GHC.Generics

Safe Haskell | None
Language | Haskell2010

Data.ProtocolBuffers.Internal

Synopsis

- type Tag = Word32
- data WireField
  - = VarintField !Tag !Word64
  - | Fixed64Field !Tag !Word64
  - | DelimitedField !Tag !ByteString
  - | StartField !Tag
  - | EndField !Tag
  - | Fixed32Field !Tag !Word32
- wireFieldTag :: WireField -> Tag
- getWireField :: Get WireField
- class EncodeWire a where
  - encodeWire :: Tag -> a -> Put
- class DecodeWire a where
  - decodeWire :: WireField -> Get a
- zzEncode32 :: Int32 -> Word32
- zzEncode64 :: Int64 -> Word64
- zzDecode32 :: Word32 -> Int32
- zzDecode64 :: Word64 -> Int64
- getVarintPrefixedBS :: Get ByteString
- getVarInt :: (Integral a, Bits a) => Get a
- putVarintPrefixedBS :: ByteString -> Put
- putVarSInt :: (Integral a, Bits a) => a -> Put
- putVarUInt :: (Integral a, Bits a) => a -> Put
- newtype Field (n :: Nat) a = Field {
  - runField :: a
  }
- newtype Value a = Value {
  - runValue :: a
  }
- newtype Always a = Always {
  - runAlways :: a
  }
- newtype Enumeration a = Enumeration {
  - runEnumeration :: a
  }
- newtype RequiredField a = Required {
  - runRequired :: a
  }
- newtype OptionalField a = Optional {
  - runOptional :: a
  }
- newtype RepeatedField a = Repeated {
  - runRepeated :: a
  }
- newtype PackedField a = PackedField {
  - runPackedField :: a
  }
- newtype PackedList a = PackedList {
  - unPackedList :: [a]
  }
- newtype Message m = Message {
  - runMessage :: m
  }
- class GDecode (f :: Type -> Type)
- class GEncode (f :: Type -> Type)
- class GMessageMonoid (f :: Type -> Type)

# 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

Instances details

Show WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods showsPrec :: Int -> WireField -> ShowS Source # show :: WireField -> String Source # showList :: [WireField] -> ShowS Source #
Eq WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods (==) :: WireField -> WireField -> Bool Source # (/=) :: WireField -> WireField -> Bool Source #
Ord WireField Source # |

Instance details

Defined in Data.ProtocolBuffers.Wire

Methods

compare :: WireField -> WireField -> Ordering Source #

(<) :: WireField -> WireField -> Bool Source #

(<=) :: WireField -> WireField -> Bool Source #

(>) :: WireField -> WireField -> Bool Source #

(>=) :: WireField -> WireField -> Bool Source #

max :: WireField -> WireField -> WireField Source #

min :: WireField -> WireField -> WireField Source #

DecodeWire WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get WireField Source #
EncodeWire WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> WireField -> Put Source #
Decode (HashMap Tag [WireField]) Source # | Untyped message decoding, ``decode` = `id``
Instance details Defined in Data.ProtocolBuffers.Decode Methods decode :: HashMap Tag [WireField] -> Get (HashMap Tag [WireField]) Source #
Encode (HashMap Tag [WireField]) Source # | Untyped message encoding
Instance details Defined in Data.ProtocolBuffers.Encode Methods encode :: HashMap Tag [WireField] -> Put Source #

wireFieldTag :: WireField -> Tag Source #

getWireField :: Get WireField Source #

class EncodeWire a where Source #

Methods

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

#### Instances

Instances details

EncodeWire ByteString Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> ByteString -> 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 WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> WireField -> Put Source #
EncodeWire Text Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Text -> Put Source #
EncodeWire String Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> String -> Put Source #
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 a => EncodeWire (Last (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Last (Value a) -> Put Source #
EncodeWire a => EncodeWire (Always (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Always (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 Methods encodeWire :: Tag -> Fixed Word32 -> Put Source #
EncodeWire (Fixed Word64) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Fixed Word64 -> Put Source #
Enum a => EncodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Enumeration a) -> Put Source #
EncodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int32) -> Put Source #
EncodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int64) -> Put Source #
EncodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word32) -> Put Source #
EncodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word64) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int64)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word64)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int64)) -> Put Source #
EncodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Bool) -> Put Source #
EncodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Double) -> Put Source #
EncodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Float) -> Put Source #
EncodeWire (Signed Int32) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Signed Int32 -> Put Source #
EncodeWire (Signed Int64) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Signed Int64 -> Put Source #
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 [Value a] Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> [Value 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 #
(Foldable f, Enum a) => EncodeWire (f (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> f (Enumeration a) -> Put Source #

class DecodeWire a where Source #

Methods

decodeWire :: WireField -> Get a Source #

#### Instances

Instances details

DecodeWire ByteString Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get ByteString Source #
DecodeWire Int32 Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Int32 Source #
DecodeWire Int64 Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Int64 Source #
DecodeWire Word32 Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Word32 Source #
DecodeWire Word64 Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Word64 Source #
DecodeWire WireField Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get WireField Source #
DecodeWire Text Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Text Source #
DecodeWire String Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get String Source #
DecodeWire Bool Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Bool Source #
DecodeWire Double Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Double Source #
DecodeWire Float Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get Float Source #
DecodeWire a => DecodeWire (Last (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Last (Value a)) Source #
Decode m => DecodeWire (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods decodeWire :: WireField -> Get (Message m) Source #
Enum a => DecodeWire (Always (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Enumeration a)) Source #
DecodeWire a => DecodeWire (Always (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Value a)) Source #
Enum a => DecodeWire (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Enumeration a) Source #
DecodeWire (Fixed Int32) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Fixed Int32) Source #
DecodeWire (Fixed Int64) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Fixed Int64) Source #
DecodeWire (Fixed Word32) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Fixed Word32) Source #
DecodeWire (Fixed Word64) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Fixed Word64) Source #
Enum a => DecodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Enumeration a)) Source #
DecodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int32)) Source #
DecodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int64)) Source #
DecodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word32)) Source #
DecodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word64)) Source #
DecodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int32))) Source #
DecodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int64))) Source #
DecodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word32))) Source #
DecodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word64))) Source #
DecodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int32))) Source #
DecodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int64))) Source #
DecodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Bool)) Source #
DecodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Double)) Source #
DecodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Float)) Source #
DecodeWire (Signed Int32) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Signed Int32) Source #
DecodeWire (Signed Int64) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Signed Int64) Source #
DecodeWire a => DecodeWire (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Value a) Source #
Enum a => DecodeWire (Maybe (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Maybe (Enumeration a)) Source #
DecodeWire a => DecodeWire (Maybe (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Maybe (Value a)) Source #

zzEncode32 :: Int32 -> Word32 Source #

zzEncode64 :: Int64 -> Word64 Source #

zzDecode32 :: Word32 -> Int32 Source #

zzDecode64 :: Word64 -> Int64 Source #

getVarintPrefixedBS :: Get ByteString Source #

getVarInt :: (Integral a, Bits a) => Get a Source #

putVarintPrefixedBS :: ByteString -> Put Source #

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

- runField :: a

#### Instances

Instances details

Functor (Field n) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> Field n a -> Field n b Source # (<$) :: a -> Field n b -> Field n a Source #
Foldable (Field n) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

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

null :: Field n a -> Bool Source #

length :: Field n a -> Int Source #

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

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

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

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

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

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) Source # sequenceA :: Applicative f => Field n (f a) -> f (Field n a) Source # mapM :: Monad m => (a -> m b) -> Field n a -> m (Field n b) Source # sequence :: Monad m => Field n (m a) -> m (Field n a) Source #
NFData a => NFData (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: Field n a -> () Source #
Monoid a => Monoid (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: Field n a Source # mappend :: Field n a -> Field n a -> Field n a Source # mconcat :: [Field n a] -> Field n a Source #
Semigroup a => Semigroup (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: Field n a -> Field n a -> Field n a Source # sconcat :: NonEmpty (Field n a) -> Field n a Source # stimes :: Integral b => b -> Field n a -> Field n a Source #
Bounded a => Bounded (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Field n a Source # maxBound :: Field n a Source #
Enum a => Enum (Field n a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

toEnum :: Int -> Field n a Source #

fromEnum :: Field n a -> Int Source #

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

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

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

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

Show a => Show (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Field n a -> ShowS Source # show :: Field n a -> String Source # showList :: [Field n a] -> ShowS Source #
Eq a => Eq (Field n a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Field n a -> Field n a -> Bool Source # (/=) :: Field n a -> Field n a -> Bool Source #
Ord a => Ord (Field n a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

HasField (Field n (OptionalField (Last (Enumeration a)))) Source # | Iso: ``FieldType` (`Optional` n (`Enumeration` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Enumeration a))) -> FieldType (Field n (OptionalField (Last (Enumeration a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Enumeration a)))) -> Field n (OptionalField (Last (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Enumeration a)))) -> f (FieldType (Field n (OptionalField (Last (Enumeration a)))))) -> Field n (OptionalField (Last (Enumeration a))) -> f (Field n (OptionalField (Last (Enumeration a)))) Source #

HasField (Field n (OptionalField (Last (Value a)))) Source # | Iso: ``FieldType` (`Optional` n (`Value` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Value a))) -> FieldType (Field n (OptionalField (Last (Value a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Value a)))) -> Field n (OptionalField (Last (Value a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Value a)))) -> f (FieldType (Field n (OptionalField (Last (Value a)))))) -> Field n (OptionalField (Last (Value a))) -> f (Field n (OptionalField (Last (Value a)))) Source #

HasField (Field n (OptionalField (Maybe (Message a)))) Source # | Iso: ``FieldType` (`Optional` n (`Message` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Maybe (Message a))) -> FieldType (Field n (OptionalField (Maybe (Message a)))) Source #

putField :: FieldType (Field n (OptionalField (Maybe (Message a)))) -> Field n (OptionalField (Maybe (Message a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Maybe (Message a)))) -> f (FieldType (Field n (OptionalField (Maybe (Message a)))))) -> Field n (OptionalField (Maybe (Message a))) -> f (Field n (OptionalField (Maybe (Message a)))) Source #

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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Enumeration a))) -> FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> Field n (PackedField (PackedList (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> f (FieldType (Field n (PackedField (PackedList (Enumeration a)))))) -> Field n (PackedField (PackedList (Enumeration a))) -> f (Field n (PackedField (PackedList (Enumeration a)))) 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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Value a))) -> FieldType (Field n (PackedField (PackedList (Value a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Value a)))) -> Field n (PackedField (PackedList (Value a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Value a)))) -> f (FieldType (Field n (PackedField (PackedList (Value a)))))) -> Field n (PackedField (PackedList (Value a))) -> f (Field n (PackedField (PackedList (Value a)))) Source #

HasField (Field n (RepeatedField [Message a])) Source # | Iso: ``FieldType` (`Repeated` n (`Message` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RepeatedField [Message a])) = [a]

Methods

getField :: Field n (RepeatedField [Message a]) -> FieldType (Field n (RepeatedField [Message a])) Source #

putField :: FieldType (Field n (RepeatedField [Message a])) -> Field n (RepeatedField [Message a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Message a])) -> f (FieldType (Field n (RepeatedField [Message a])))) -> Field n (RepeatedField [Message a]) -> f (Field n (RepeatedField [Message a])) Source #

HasField (Field n (RepeatedField [Enumeration a])) Source # | Iso: ``FieldType` (`Repeated` n (`Enumeration` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [a]

Methods

getField :: Field n (RepeatedField [Enumeration a]) -> FieldType (Field n (RepeatedField [Enumeration a])) Source #

putField :: FieldType (Field n (RepeatedField [Enumeration a])) -> Field n (RepeatedField [Enumeration a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Enumeration a])) -> f (FieldType (Field n (RepeatedField [Enumeration a])))) -> Field n (RepeatedField [Enumeration a]) -> f (Field n (RepeatedField [Enumeration a])) Source #

HasField (Field n (RepeatedField [Value a])) Source # | Iso: ``FieldType` (`Repeated` n (`Value` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Value a])) = [a]

Methods

getField :: Field n (RepeatedField [Value a]) -> FieldType (Field n (RepeatedField [Value a])) Source #

putField :: FieldType (Field n (RepeatedField [Value a])) -> Field n (RepeatedField [Value a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Value a])) -> f (FieldType (Field n (RepeatedField [Value a])))) -> Field n (RepeatedField [Value a]) -> f (Field n (RepeatedField [Value a])) Source #

HasField (Field n (RequiredField (Always (Message a)))) Source # | Iso: ``FieldType` (`Required` n (`Message` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a

Methods

getField :: Field n (RequiredField (Always (Message a))) -> FieldType (Field n (RequiredField (Always (Message a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Message a)))) -> Field n (RequiredField (Always (Message a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Message a)))) -> f (FieldType (Field n (RequiredField (Always (Message a)))))) -> Field n (RequiredField (Always (Message a))) -> f (Field n (RequiredField (Always (Message a)))) Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source # | Iso: ``FieldType` (`Required` n (`Enumeration` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a

Methods

getField :: Field n (RequiredField (Always (Enumeration a))) -> FieldType (Field n (RequiredField (Always (Enumeration a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Enumeration a)))) -> Field n (RequiredField (Always (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Enumeration a)))) -> f (FieldType (Field n (RequiredField (Always (Enumeration a)))))) -> Field n (RequiredField (Always (Enumeration a))) -> f (Field n (RequiredField (Always (Enumeration a)))) Source #

HasField (Field n (RequiredField (Always (Value a)))) Source # | Iso: ``FieldType` (`Required` n (`Value` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

Methods

getField :: Field n (RequiredField (Always (Value a))) -> FieldType (Field n (RequiredField (Always (Value a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Value a)))) -> Field n (RequiredField (Always (Value a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Value a)))) -> f (FieldType (Field n (RequiredField (Always (Value a)))))) -> Field n (RequiredField (Always (Value a))) -> f (Field n (RequiredField (Always (Value a)))) 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)
(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)
(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Enumeration 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 (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 (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)
(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
type FieldType (Field n (OptionalField (Last (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a
type FieldType (Field n (OptionalField (Last (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a
type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe a
type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]
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 (RepeatedField [Enumeration a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [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 (RequiredField (Always (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a
type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a
type FieldType (Field n (RequiredField (Always (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

newtype Value a Source #

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

Constructors

Value |

Fields

- runValue :: a

#### Instances

Instances details

Functor Value Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> Value a -> Value b Source # (<$) :: a -> Value b -> Value a Source #
Foldable Value Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Value a -> [a] Source #

null :: Value a -> Bool Source #

length :: Value a -> Int Source #

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

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

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

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

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

Traversable Value Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> Value a -> f (Value b) Source # sequenceA :: Applicative f => Value (f a) -> f (Value a) Source # mapM :: Monad m => (a -> m b) -> Value a -> m (Value b) Source # sequence :: Monad m => Value (m a) -> m (Value a) Source #
NFData a => NFData (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: Value a -> () Source #
Monoid a => Monoid (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: Value a Source # mappend :: Value a -> Value a -> Value a Source # mconcat :: [Value a] -> Value a Source #
Semigroup a => Semigroup (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: Value a -> Value a -> Value a Source # sconcat :: NonEmpty (Value a) -> Value a Source # stimes :: Integral b => b -> Value a -> Value a Source #
Bounded a => Bounded (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Value a Source # maxBound :: Value a Source #
Enum a => Enum (Value a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Value a -> Value a Source #

pred :: Value a -> Value a Source #

toEnum :: Int -> Value a Source #

fromEnum :: Value a -> Int Source #

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

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

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

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

Show a => Show (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Value a -> ShowS Source # show :: Value a -> String Source # showList :: [Value a] -> ShowS Source #
Eq a => Eq (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Value a -> Value a -> Bool Source # (/=) :: Value a -> Value a -> Bool Source #
Ord a => Ord (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods compare :: Value a -> Value a -> Ordering Source # (<) :: Value a -> Value a -> Bool Source # (<=) :: Value a -> Value a -> Bool Source # (>) :: Value a -> Value a -> Bool Source # (>=) :: Value a -> Value a -> Bool Source # max :: Value a -> Value a -> Value a Source # min :: Value a -> Value a -> Value a Source #
DecodeWire a => DecodeWire (Last (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Last (Value a)) Source #
DecodeWire a => DecodeWire (Always (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Value a)) Source #
DecodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int32)) Source #
DecodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int64)) Source #
DecodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word32)) Source #
DecodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word64)) Source #
DecodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int32))) Source #
DecodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int64))) Source #
DecodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word32))) Source #
DecodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word64))) Source #
DecodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int32))) Source #
DecodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int64))) Source #
DecodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Bool)) Source #
DecodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Double)) Source #
DecodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Float)) Source #
DecodeWire a => DecodeWire (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Value a) Source #
DecodeWire a => DecodeWire (Maybe (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Maybe (Value a)) Source #
EncodeWire a => EncodeWire (Last (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Last (Value a) -> Put Source #
EncodeWire a => EncodeWire (Always (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> Always (Value a) -> Put Source #
EncodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int32) -> Put Source #
EncodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int64) -> Put Source #
EncodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word32) -> Put Source #
EncodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word64) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int64)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word64)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int64)) -> Put Source #
EncodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Bool) -> Put Source #
EncodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Double) -> Put Source #
EncodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Float) -> Put Source #
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 [Value a] Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> [Value a] -> Put Source #
HasField (Field n (OptionalField (Last (Value a)))) Source # | Iso: ``FieldType` (`Optional` n (`Value` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Value a))) -> FieldType (Field n (OptionalField (Last (Value a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Value a)))) -> Field n (OptionalField (Last (Value a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Value a)))) -> f (FieldType (Field n (OptionalField (Last (Value a)))))) -> Field n (OptionalField (Last (Value a))) -> f (Field n (OptionalField (Last (Value a)))) 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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Value a))) -> FieldType (Field n (PackedField (PackedList (Value a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Value a)))) -> Field n (PackedField (PackedList (Value a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Value a)))) -> f (FieldType (Field n (PackedField (PackedList (Value a)))))) -> Field n (PackedField (PackedList (Value a))) -> f (Field n (PackedField (PackedList (Value a)))) Source #

HasField (Field n (RepeatedField [Value a])) Source # | Iso: ``FieldType` (`Repeated` n (`Value` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Value a])) = [a]

Methods

getField :: Field n (RepeatedField [Value a]) -> FieldType (Field n (RepeatedField [Value a])) Source #

putField :: FieldType (Field n (RepeatedField [Value a])) -> Field n (RepeatedField [Value a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Value a])) -> f (FieldType (Field n (RepeatedField [Value a])))) -> Field n (RepeatedField [Value a]) -> f (Field n (RepeatedField [Value a])) Source #

HasField (Field n (RequiredField (Always (Value a)))) Source # | Iso: ``FieldType` (`Required` n (`Value` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

Methods

getField :: Field n (RequiredField (Always (Value a))) -> FieldType (Field n (RequiredField (Always (Value a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Value a)))) -> Field n (RequiredField (Always (Value a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Value a)))) -> f (FieldType (Field n (RequiredField (Always (Value a)))))) -> Field n (RequiredField (Always (Value a))) -> f (Field n (RequiredField (Always (Value a)))) Source #

(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)
(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)
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 Required n (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Required n (Value a) = Field n (RequiredField (Always (Value a)))
type FieldType (Field n (OptionalField (Last (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a
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 [Value a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Value a])) = [a]
type FieldType (Field n (RequiredField (Always (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

newtype Always a Source #

To provide consistent instances for serialization a `Traversable` `Functor` is needed to make `Required` fields have the same shape as `Optional`, `Repeated` and `Packed`.

This is the `Identity` `Functor` with a `Show` instance.

Constructors

Always |

Fields

- runAlways :: a

#### Instances

Instances details

Functor Always Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> Always a -> Always b Source # (<$) :: a -> Always b -> Always a Source #
Foldable Always Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Always a -> [a] Source #

null :: Always a -> Bool Source #

length :: Always a -> Int Source #

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

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

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

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

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

Traversable Always Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> Always a -> f (Always b) Source # sequenceA :: Applicative f => Always (f a) -> f (Always a) Source # mapM :: Monad m => (a -> m b) -> Always a -> m (Always b) Source # sequence :: Monad m => Always (m a) -> m (Always a) Source #
NFData a => NFData (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: Always a -> () Source #
Monoid (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: Always a Source # mappend :: Always a -> Always a -> Always a Source # mconcat :: [Always a] -> Always a Source #
Semigroup (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: Always a -> Always a -> Always a Source # sconcat :: NonEmpty (Always a) -> Always a Source # stimes :: Integral b => b -> Always a -> Always a Source #
Bounded a => Bounded (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Always a Source # maxBound :: Always a Source #
Enum a => Enum (Always a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Always a -> Always a Source #

pred :: Always a -> Always a Source #

toEnum :: Int -> Always a Source #

fromEnum :: Always a -> Int Source #

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

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

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

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

Show a => Show (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Always a -> ShowS Source # show :: Always a -> String Source # showList :: [Always a] -> ShowS Source #
Eq a => Eq (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Always a -> Always a -> Bool Source # (/=) :: Always a -> Always a -> Bool Source #
Ord a => Ord (Always a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods compare :: Always a -> Always a -> Ordering Source # (<) :: Always a -> Always a -> Bool Source # (<=) :: Always a -> Always a -> Bool Source # (>) :: Always a -> Always a -> Bool Source # (>=) :: Always a -> Always a -> Bool Source # max :: Always a -> Always a -> Always a Source # min :: Always a -> Always a -> Always a Source #
Enum a => DecodeWire (Always (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Enumeration a)) Source #
DecodeWire a => DecodeWire (Always (Value a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Value a)) Source #
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 (Message a)))) Source # | Iso: ``FieldType` (`Required` n (`Message` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a

Methods

getField :: Field n (RequiredField (Always (Message a))) -> FieldType (Field n (RequiredField (Always (Message a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Message a)))) -> Field n (RequiredField (Always (Message a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Message a)))) -> f (FieldType (Field n (RequiredField (Always (Message a)))))) -> Field n (RequiredField (Always (Message a))) -> f (Field n (RequiredField (Always (Message a)))) Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source # | Iso: ``FieldType` (`Required` n (`Enumeration` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a

Methods

getField :: Field n (RequiredField (Always (Enumeration a))) -> FieldType (Field n (RequiredField (Always (Enumeration a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Enumeration a)))) -> Field n (RequiredField (Always (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Enumeration a)))) -> f (FieldType (Field n (RequiredField (Always (Enumeration a)))))) -> Field n (RequiredField (Always (Enumeration a))) -> f (Field n (RequiredField (Always (Enumeration a)))) Source #

HasField (Field n (RequiredField (Always (Value a)))) Source # | Iso: ``FieldType` (`Required` n (`Value` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

Methods

getField :: Field n (RequiredField (Always (Value a))) -> FieldType (Field n (RequiredField (Always (Value a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Value a)))) -> Field n (RequiredField (Always (Value a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Value a)))) -> f (FieldType (Field n (RequiredField (Always (Value a)))))) -> Field n (RequiredField (Always (Value a))) -> f (Field n (RequiredField (Always (Value a)))) Source #

(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)
(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Enumeration 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)
type FieldType (Field n (RequiredField (Always (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a
type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a
type FieldType (Field n (RequiredField (Always (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

newtype Enumeration a Source #

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

Constructors

Enumeration |

Fields

- runEnumeration :: a

#### Instances

Instances details

Functor Enumeration Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> Enumeration a -> Enumeration b Source # (<$) :: a -> Enumeration b -> Enumeration a Source #
Foldable Enumeration Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: Enumeration a -> [a] Source #

null :: Enumeration a -> Bool Source #

length :: Enumeration a -> Int Source #

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

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

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

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

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

Traversable Enumeration Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> Enumeration a -> f (Enumeration b) Source # sequenceA :: Applicative f => Enumeration (f a) -> f (Enumeration a) Source # mapM :: Monad m => (a -> m b) -> Enumeration a -> m (Enumeration b) Source # sequence :: Monad m => Enumeration (m a) -> m (Enumeration a) Source #
NFData a => NFData (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: Enumeration a -> () Source #
Monoid a => Monoid (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: Enumeration a Source # mappend :: Enumeration a -> Enumeration a -> Enumeration a Source # mconcat :: [Enumeration a] -> Enumeration a Source #
Semigroup a => Semigroup (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: Enumeration a -> Enumeration a -> Enumeration a Source # sconcat :: NonEmpty (Enumeration a) -> Enumeration a Source # stimes :: Integral b => b -> Enumeration a -> Enumeration a Source #
Bounded a => Bounded (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Enumeration a Source # maxBound :: Enumeration a Source #
Enum a => Enum (Enumeration a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Enumeration a -> Enumeration a Source #

pred :: Enumeration a -> Enumeration a Source #

toEnum :: Int -> Enumeration a Source #

fromEnum :: Enumeration a -> Int Source #

enumFrom :: Enumeration a -> [Enumeration a] Source #

enumFromThen :: Enumeration a -> Enumeration a -> [Enumeration a] Source #

enumFromTo :: Enumeration a -> Enumeration a -> [Enumeration a] Source #

enumFromThenTo :: Enumeration a -> Enumeration a -> Enumeration a -> [Enumeration a] Source #

Show a => Show (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Enumeration a -> ShowS Source # show :: Enumeration a -> String Source # showList :: [Enumeration a] -> ShowS Source #
Eq a => Eq (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Enumeration a -> Enumeration a -> Bool Source # (/=) :: Enumeration a -> Enumeration a -> Bool Source #
Ord a => Ord (Enumeration a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: Enumeration a -> Enumeration a -> Ordering Source #

(<) :: Enumeration a -> Enumeration a -> Bool Source #

(<=) :: Enumeration a -> Enumeration a -> Bool Source #

(>) :: Enumeration a -> Enumeration a -> Bool Source #

(>=) :: Enumeration a -> Enumeration a -> Bool Source #

max :: Enumeration a -> Enumeration a -> Enumeration a Source #

min :: Enumeration a -> Enumeration a -> Enumeration a Source #

Enum a => DecodeWire (Always (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Always (Enumeration a)) Source #
Enum a => DecodeWire (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Enumeration a) Source #
Enum a => DecodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Enumeration a)) Source #
Enum a => DecodeWire (Maybe (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (Maybe (Enumeration a)) Source #
Enum a => EncodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Enumeration 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 #
HasField (Field n (OptionalField (Last (Enumeration a)))) Source # | Iso: ``FieldType` (`Optional` n (`Enumeration` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Enumeration a))) -> FieldType (Field n (OptionalField (Last (Enumeration a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Enumeration a)))) -> Field n (OptionalField (Last (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Enumeration a)))) -> f (FieldType (Field n (OptionalField (Last (Enumeration a)))))) -> Field n (OptionalField (Last (Enumeration a))) -> f (Field n (OptionalField (Last (Enumeration a)))) Source #

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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Enumeration a))) -> FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> Field n (PackedField (PackedList (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> f (FieldType (Field n (PackedField (PackedList (Enumeration a)))))) -> Field n (PackedField (PackedList (Enumeration a))) -> f (Field n (PackedField (PackedList (Enumeration a)))) Source #

HasField (Field n (RepeatedField [Enumeration a])) Source # | Iso: ``FieldType` (`Repeated` n (`Enumeration` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [a]

Methods

getField :: Field n (RepeatedField [Enumeration a]) -> FieldType (Field n (RepeatedField [Enumeration a])) Source #

putField :: FieldType (Field n (RepeatedField [Enumeration a])) -> Field n (RepeatedField [Enumeration a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Enumeration a])) -> f (FieldType (Field n (RepeatedField [Enumeration a])))) -> Field n (RepeatedField [Enumeration a]) -> f (Field n (RepeatedField [Enumeration a])) Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source # | Iso: ``FieldType` (`Required` n (`Enumeration` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a

Methods

getField :: Field n (RequiredField (Always (Enumeration a))) -> FieldType (Field n (RequiredField (Always (Enumeration a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Enumeration a)))) -> Field n (RequiredField (Always (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Enumeration a)))) -> f (FieldType (Field n (RequiredField (Always (Enumeration a)))))) -> Field n (RequiredField (Always (Enumeration a))) -> f (Field n (RequiredField (Always (Enumeration a)))) 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 Methods gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Enumeration a)))) a0)
type Optional n (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Optional n (Enumeration a) = Field n (OptionalField (Last (Enumeration a)))
type Required n (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Required n (Enumeration a) = Field n (RequiredField (Always (Enumeration a)))
type FieldType (Field n (OptionalField (Last (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a
type FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]
type FieldType (Field n (RepeatedField [Enumeration a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [a]
type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a

newtype RequiredField a Source #

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

Constructors

Required |

Fields

- runRequired :: a

#### Instances

Instances details

Functor RequiredField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> RequiredField a -> RequiredField b Source # (<$) :: a -> RequiredField b -> RequiredField a Source #
Foldable RequiredField Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: RequiredField a -> [a] Source #

null :: RequiredField a -> Bool Source #

length :: RequiredField a -> Int Source #

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

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

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

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

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

Traversable RequiredField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> RequiredField a -> f (RequiredField b) Source # sequenceA :: Applicative f => RequiredField (f a) -> f (RequiredField a) Source # mapM :: Monad m => (a -> m b) -> RequiredField a -> m (RequiredField b) Source # sequence :: Monad m => RequiredField (m a) -> m (RequiredField a) Source #
NFData a => NFData (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: RequiredField a -> () Source #
Monoid a => Monoid (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: RequiredField a Source # mappend :: RequiredField a -> RequiredField a -> RequiredField a Source # mconcat :: [RequiredField a] -> RequiredField a Source #
Semigroup a => Semigroup (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: RequiredField a -> RequiredField a -> RequiredField a Source # sconcat :: NonEmpty (RequiredField a) -> RequiredField a Source # stimes :: Integral b => b -> RequiredField a -> RequiredField a Source #
Bounded a => Bounded (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: RequiredField a Source # maxBound :: RequiredField a Source #
Enum a => Enum (RequiredField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: RequiredField a -> RequiredField a Source #

pred :: RequiredField a -> RequiredField a Source #

toEnum :: Int -> RequiredField a Source #

fromEnum :: RequiredField a -> Int Source #

enumFrom :: RequiredField a -> [RequiredField a] Source #

enumFromThen :: RequiredField a -> RequiredField a -> [RequiredField a] Source #

enumFromTo :: RequiredField a -> RequiredField a -> [RequiredField a] Source #

enumFromThenTo :: RequiredField a -> RequiredField a -> RequiredField a -> [RequiredField a] Source #

Show a => Show (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> RequiredField a -> ShowS Source # show :: RequiredField a -> String Source # showList :: [RequiredField a] -> ShowS Source #
Eq a => Eq (RequiredField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: RequiredField a -> RequiredField a -> Bool Source # (/=) :: RequiredField a -> RequiredField a -> Bool Source #
Ord a => Ord (RequiredField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: RequiredField a -> RequiredField a -> Ordering Source #

(<) :: RequiredField a -> RequiredField a -> Bool Source #

(<=) :: RequiredField a -> RequiredField a -> Bool Source #

(>) :: RequiredField a -> RequiredField a -> Bool Source #

(>=) :: RequiredField a -> RequiredField a -> Bool Source #

max :: RequiredField a -> RequiredField a -> RequiredField a Source #

min :: RequiredField a -> RequiredField a -> RequiredField a Source #

HasField (Field n (RequiredField (Always (Message a)))) Source # | Iso: ``FieldType` (`Required` n (`Message` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a

Methods

getField :: Field n (RequiredField (Always (Message a))) -> FieldType (Field n (RequiredField (Always (Message a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Message a)))) -> Field n (RequiredField (Always (Message a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Message a)))) -> f (FieldType (Field n (RequiredField (Always (Message a)))))) -> Field n (RequiredField (Always (Message a))) -> f (Field n (RequiredField (Always (Message a)))) Source #

HasField (Field n (RequiredField (Always (Enumeration a)))) Source # | Iso: ``FieldType` (`Required` n (`Enumeration` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a

Methods

getField :: Field n (RequiredField (Always (Enumeration a))) -> FieldType (Field n (RequiredField (Always (Enumeration a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Enumeration a)))) -> Field n (RequiredField (Always (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Enumeration a)))) -> f (FieldType (Field n (RequiredField (Always (Enumeration a)))))) -> Field n (RequiredField (Always (Enumeration a))) -> f (Field n (RequiredField (Always (Enumeration a)))) Source #

HasField (Field n (RequiredField (Always (Value a)))) Source # | Iso: ``FieldType` (`Required` n (`Value` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RequiredField (Always (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

Methods

getField :: Field n (RequiredField (Always (Value a))) -> FieldType (Field n (RequiredField (Always (Value a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Value a)))) -> Field n (RequiredField (Always (Value a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Value a)))) -> f (FieldType (Field n (RequiredField (Always (Value a)))))) -> Field n (RequiredField (Always (Value a))) -> f (Field n (RequiredField (Always (Value a)))) Source #

(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)
(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Enumeration 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)
type FieldType (Field n (RequiredField (Always (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a
type FieldType (Field n (RequiredField (Always (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Enumeration a)))) = a
type FieldType (Field n (RequiredField (Always (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RequiredField (Always (Value a)))) = a

newtype OptionalField a Source #

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

Constructors

Optional |

Fields

- runOptional :: a

#### Instances

Instances details

Functor OptionalField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> OptionalField a -> OptionalField b Source # (<$) :: a -> OptionalField b -> OptionalField a Source #
Foldable OptionalField Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: OptionalField a -> [a] Source #

null :: OptionalField a -> Bool Source #

length :: OptionalField a -> Int Source #

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

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

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

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

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

Traversable OptionalField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> OptionalField a -> f (OptionalField b) Source # sequenceA :: Applicative f => OptionalField (f a) -> f (OptionalField a) Source # mapM :: Monad m => (a -> m b) -> OptionalField a -> m (OptionalField b) Source # sequence :: Monad m => OptionalField (m a) -> m (OptionalField a) Source #
NFData a => NFData (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: OptionalField a -> () Source #
Monoid a => Monoid (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: OptionalField a Source # mappend :: OptionalField a -> OptionalField a -> OptionalField a Source # mconcat :: [OptionalField a] -> OptionalField a Source #
Semigroup a => Semigroup (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: OptionalField a -> OptionalField a -> OptionalField a Source # sconcat :: NonEmpty (OptionalField a) -> OptionalField a Source # stimes :: Integral b => b -> OptionalField a -> OptionalField a Source #
Bounded a => Bounded (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: OptionalField a Source # maxBound :: OptionalField a Source #
Enum a => Enum (OptionalField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: OptionalField a -> OptionalField a Source #

pred :: OptionalField a -> OptionalField a Source #

toEnum :: Int -> OptionalField a Source #

fromEnum :: OptionalField a -> Int Source #

enumFrom :: OptionalField a -> [OptionalField a] Source #

enumFromThen :: OptionalField a -> OptionalField a -> [OptionalField a] Source #

enumFromTo :: OptionalField a -> OptionalField a -> [OptionalField a] Source #

enumFromThenTo :: OptionalField a -> OptionalField a -> OptionalField a -> [OptionalField a] Source #

Show a => Show (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> OptionalField a -> ShowS Source # show :: OptionalField a -> String Source # showList :: [OptionalField a] -> ShowS Source #
Eq a => Eq (OptionalField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: OptionalField a -> OptionalField a -> Bool Source # (/=) :: OptionalField a -> OptionalField a -> Bool Source #
Ord a => Ord (OptionalField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: OptionalField a -> OptionalField a -> Ordering Source #

(<) :: OptionalField a -> OptionalField a -> Bool Source #

(<=) :: OptionalField a -> OptionalField a -> Bool Source #

(>) :: OptionalField a -> OptionalField a -> Bool Source #

(>=) :: OptionalField a -> OptionalField a -> Bool Source #

max :: OptionalField a -> OptionalField a -> OptionalField a Source #

min :: OptionalField a -> OptionalField a -> OptionalField a Source #

HasField (Field n (OptionalField (Last (Enumeration a)))) Source # | Iso: ``FieldType` (`Optional` n (`Enumeration` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Enumeration a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Enumeration a))) -> FieldType (Field n (OptionalField (Last (Enumeration a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Enumeration a)))) -> Field n (OptionalField (Last (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Enumeration a)))) -> f (FieldType (Field n (OptionalField (Last (Enumeration a)))))) -> Field n (OptionalField (Last (Enumeration a))) -> f (Field n (OptionalField (Last (Enumeration a)))) Source #

HasField (Field n (OptionalField (Last (Value a)))) Source # | Iso: ``FieldType` (`Optional` n (`Value` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (OptionalField (Last (Value a)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Last (Value a))) -> FieldType (Field n (OptionalField (Last (Value a)))) Source #

putField :: FieldType (Field n (OptionalField (Last (Value a)))) -> Field n (OptionalField (Last (Value a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Last (Value a)))) -> f (FieldType (Field n (OptionalField (Last (Value a)))))) -> Field n (OptionalField (Last (Value a))) -> f (Field n (OptionalField (Last (Value a)))) Source #

HasField (Field n (OptionalField (Maybe (Message a)))) Source # | Iso: ``FieldType` (`Optional` n (`Message` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Maybe (Message a))) -> FieldType (Field n (OptionalField (Maybe (Message a)))) Source #

putField :: FieldType (Field n (OptionalField (Maybe (Message a)))) -> Field n (OptionalField (Maybe (Message a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Maybe (Message a)))) -> f (FieldType (Field n (OptionalField (Maybe (Message a)))))) -> Field n (OptionalField (Maybe (Message a))) -> f (Field n (OptionalField (Maybe (Message a)))) 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 (Enumeration a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Enumeration a)))) = Maybe a
type FieldType (Field n (OptionalField (Last (Value a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (OptionalField (Last (Value a)))) = Maybe a
type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe a

newtype RepeatedField a Source #

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

Constructors

Repeated |

Fields

- runRepeated :: a

#### Instances

Instances details

Functor RepeatedField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> RepeatedField a -> RepeatedField b Source # (<$) :: a -> RepeatedField b -> RepeatedField a Source #
Foldable RepeatedField Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: RepeatedField a -> [a] Source #

null :: RepeatedField a -> Bool Source #

length :: RepeatedField a -> Int Source #

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

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

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

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

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

Traversable RepeatedField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> RepeatedField a -> f (RepeatedField b) Source # sequenceA :: Applicative f => RepeatedField (f a) -> f (RepeatedField a) Source # mapM :: Monad m => (a -> m b) -> RepeatedField a -> m (RepeatedField b) Source # sequence :: Monad m => RepeatedField (m a) -> m (RepeatedField a) Source #
NFData a => NFData (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: RepeatedField a -> () Source #
Monoid a => Monoid (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: RepeatedField a Source # mappend :: RepeatedField a -> RepeatedField a -> RepeatedField a Source # mconcat :: [RepeatedField a] -> RepeatedField a Source #
Semigroup a => Semigroup (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: RepeatedField a -> RepeatedField a -> RepeatedField a Source # sconcat :: NonEmpty (RepeatedField a) -> RepeatedField a Source # stimes :: Integral b => b -> RepeatedField a -> RepeatedField a Source #
Bounded a => Bounded (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: RepeatedField a Source # maxBound :: RepeatedField a Source #
Enum a => Enum (RepeatedField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: RepeatedField a -> RepeatedField a Source #

pred :: RepeatedField a -> RepeatedField a Source #

toEnum :: Int -> RepeatedField a Source #

fromEnum :: RepeatedField a -> Int Source #

enumFrom :: RepeatedField a -> [RepeatedField a] Source #

enumFromThen :: RepeatedField a -> RepeatedField a -> [RepeatedField a] Source #

enumFromTo :: RepeatedField a -> RepeatedField a -> [RepeatedField a] Source #

enumFromThenTo :: RepeatedField a -> RepeatedField a -> RepeatedField a -> [RepeatedField a] Source #

Show a => Show (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> RepeatedField a -> ShowS Source # show :: RepeatedField a -> String Source # showList :: [RepeatedField a] -> ShowS Source #
Eq a => Eq (RepeatedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: RepeatedField a -> RepeatedField a -> Bool Source # (/=) :: RepeatedField a -> RepeatedField a -> Bool Source #
Ord a => Ord (RepeatedField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: RepeatedField a -> RepeatedField a -> Ordering Source #

(<) :: RepeatedField a -> RepeatedField a -> Bool Source #

(<=) :: RepeatedField a -> RepeatedField a -> Bool Source #

(>) :: RepeatedField a -> RepeatedField a -> Bool Source #

(>=) :: RepeatedField a -> RepeatedField a -> Bool Source #

max :: RepeatedField a -> RepeatedField a -> RepeatedField a Source #

min :: RepeatedField a -> RepeatedField a -> RepeatedField a Source #

HasField (Field n (RepeatedField [Message a])) Source # | Iso: ``FieldType` (`Repeated` n (`Message` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RepeatedField [Message a])) = [a]

Methods

getField :: Field n (RepeatedField [Message a]) -> FieldType (Field n (RepeatedField [Message a])) Source #

putField :: FieldType (Field n (RepeatedField [Message a])) -> Field n (RepeatedField [Message a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Message a])) -> f (FieldType (Field n (RepeatedField [Message a])))) -> Field n (RepeatedField [Message a]) -> f (Field n (RepeatedField [Message a])) Source #

HasField (Field n (RepeatedField [Enumeration a])) Source # | Iso: ``FieldType` (`Repeated` n (`Enumeration` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Enumeration a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [a]

Methods

getField :: Field n (RepeatedField [Enumeration a]) -> FieldType (Field n (RepeatedField [Enumeration a])) Source #

putField :: FieldType (Field n (RepeatedField [Enumeration a])) -> Field n (RepeatedField [Enumeration a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Enumeration a])) -> f (FieldType (Field n (RepeatedField [Enumeration a])))) -> Field n (RepeatedField [Enumeration a]) -> f (Field n (RepeatedField [Enumeration a])) Source #

HasField (Field n (RepeatedField [Value a])) Source # | Iso: ``FieldType` (`Repeated` n (`Value` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Types

Associated Types

type FieldType (Field n (RepeatedField [Value a])) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Value a])) = [a]

Methods

getField :: Field n (RepeatedField [Value a]) -> FieldType (Field n (RepeatedField [Value a])) Source #

putField :: FieldType (Field n (RepeatedField [Value a])) -> Field n (RepeatedField [Value a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Value a])) -> f (FieldType (Field n (RepeatedField [Value a])))) -> Field n (RepeatedField [Value a]) -> f (Field n (RepeatedField [Value a])) 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 [Message a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RepeatedField [Message a])) = [a]
type FieldType (Field n (RepeatedField [Enumeration a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Enumeration a])) = [a]
type FieldType (Field n (RepeatedField [Value a])) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (RepeatedField [Value a])) = [a]

newtype PackedField a Source #

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

Constructors

PackedField |

Fields

- runPackedField :: a

#### Instances

Instances details

Functor PackedField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> PackedField a -> PackedField b Source # (<$) :: a -> PackedField b -> PackedField a Source #
Foldable PackedField Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: PackedField a -> [a] Source #

null :: PackedField a -> Bool Source #

length :: PackedField a -> Int Source #

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

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

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

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

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

Traversable PackedField Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> PackedField a -> f (PackedField b) Source # sequenceA :: Applicative f => PackedField (f a) -> f (PackedField a) Source # mapM :: Monad m => (a -> m b) -> PackedField a -> m (PackedField b) Source # sequence :: Monad m => PackedField (m a) -> m (PackedField a) Source #
NFData a => NFData (PackedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: PackedField a -> () Source #
Monoid a => Monoid (PackedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: PackedField a Source # mappend :: PackedField a -> PackedField a -> PackedField a Source # mconcat :: [PackedField a] -> PackedField a Source #
Semigroup a => Semigroup (PackedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: PackedField a -> PackedField a -> PackedField a Source # sconcat :: NonEmpty (PackedField a) -> PackedField a Source # stimes :: Integral b => b -> PackedField a -> PackedField a Source #
Show a => Show (PackedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> PackedField a -> ShowS Source # show :: PackedField a -> String Source # showList :: [PackedField a] -> ShowS Source #
Eq a => Eq (PackedField a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: PackedField a -> PackedField a -> Bool Source # (/=) :: PackedField a -> PackedField a -> Bool Source #
Ord a => Ord (PackedField a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: PackedField a -> PackedField a -> Ordering Source #

(<) :: PackedField a -> PackedField a -> Bool Source #

(<=) :: PackedField a -> PackedField a -> Bool Source #

(>) :: PackedField a -> PackedField a -> Bool Source #

(>=) :: PackedField a -> PackedField a -> Bool Source #

max :: PackedField a -> PackedField a -> PackedField a Source #

min :: PackedField a -> PackedField a -> PackedField a Source #

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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Enumeration a))) -> FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> Field n (PackedField (PackedList (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> f (FieldType (Field n (PackedField (PackedList (Enumeration a)))))) -> Field n (PackedField (PackedList (Enumeration a))) -> f (Field n (PackedField (PackedList (Enumeration a)))) 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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Value a))) -> FieldType (Field n (PackedField (PackedList (Value a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Value a)))) -> Field n (PackedField (PackedList (Value a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Value a)))) -> f (FieldType (Field n (PackedField (PackedList (Value a)))))) -> Field n (PackedField (PackedList (Value a))) -> f (Field n (PackedField (PackedList (Value a)))) 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 (Enumeration a)))) = [a]
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

- unPackedList :: [a]

#### Instances

Instances details

Functor PackedList Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods fmap :: (a -> b) -> PackedList a -> PackedList b Source # (<$) :: a -> PackedList b -> PackedList a Source #
Foldable PackedList Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

toList :: PackedList a -> [a] Source #

null :: PackedList a -> Bool Source #

length :: PackedList a -> Int Source #

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

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

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

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

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

Traversable PackedList Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods traverse :: Applicative f => (a -> f b) -> PackedList a -> f (PackedList b) Source # sequenceA :: Applicative f => PackedList (f a) -> f (PackedList a) Source # mapM :: Monad m => (a -> m b) -> PackedList a -> m (PackedList b) Source # sequence :: Monad m => PackedList (m a) -> m (PackedList a) Source #
NFData a => NFData (PackedList a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods rnf :: PackedList a -> () Source #
Monoid (PackedList a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods mempty :: PackedList a Source # mappend :: PackedList a -> PackedList a -> PackedList a Source # mconcat :: [PackedList a] -> PackedList a Source #
Semigroup (PackedList a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (<>) :: PackedList a -> PackedList a -> PackedList a Source # sconcat :: NonEmpty (PackedList a) -> PackedList a Source # stimes :: Integral b => b -> PackedList a -> PackedList a Source #
Show a => Show (PackedList a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> PackedList a -> ShowS Source # show :: PackedList a -> String Source # showList :: [PackedList a] -> ShowS Source #
Eq a => Eq (PackedList a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: PackedList a -> PackedList a -> Bool Source # (/=) :: PackedList a -> PackedList a -> Bool Source #
Ord a => Ord (PackedList a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

compare :: PackedList a -> PackedList a -> Ordering Source #

(<) :: PackedList a -> PackedList a -> Bool Source #

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

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

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

max :: PackedList a -> PackedList a -> PackedList a Source #

min :: PackedList a -> PackedList a -> PackedList a Source #

Enum a => DecodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Enumeration a)) Source #
DecodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int32)) Source #
DecodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Int64)) Source #
DecodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word32)) Source #
DecodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Word64)) Source #
DecodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int32))) Source #
DecodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Int64))) Source #
DecodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word32))) Source #
DecodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Fixed Word64))) Source #
DecodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int32))) Source #
DecodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value (Signed Int64))) Source #
DecodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Bool)) Source #
DecodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Double)) Source #
DecodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods decodeWire :: WireField -> Get (PackedList (Value Float)) Source #
Enum a => EncodeWire (PackedList (Enumeration a)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Enumeration a) -> Put Source #
EncodeWire (PackedList (Value Int32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int32) -> Put Source #
EncodeWire (PackedList (Value Int64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Int64) -> Put Source #
EncodeWire (PackedList (Value Word32)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word32) -> Put Source #
EncodeWire (PackedList (Value Word64)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Word64) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Int64)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word32)) -> Put Source #
EncodeWire (PackedList (Value (Fixed Word64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Fixed Word64)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int32))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int32)) -> Put Source #
EncodeWire (PackedList (Value (Signed Int64))) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value (Signed Int64)) -> Put Source #
EncodeWire (PackedList (Value Bool)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Bool) -> Put Source #
EncodeWire (PackedList (Value Double)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Double) -> Put Source #
EncodeWire (PackedList (Value Float)) Source # |
Instance details Defined in Data.ProtocolBuffers.Wire Methods encodeWire :: Tag -> PackedList (Value Float) -> Put Source #
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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Enumeration a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Enumeration a))) -> FieldType (Field n (PackedField (PackedList (Enumeration a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> Field n (PackedField (PackedList (Enumeration a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Enumeration a)))) -> f (FieldType (Field n (PackedField (PackedList (Enumeration a)))))) -> Field n (PackedField (PackedList (Enumeration a))) -> f (Field n (PackedField (PackedList (Enumeration a)))) 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)))) |
Instance details Defined in Data.ProtocolBuffers.Types type FieldType (Field n (PackedField (PackedList (Value a)))) = [a]

Methods

getField :: Field n (PackedField (PackedList (Value a))) -> FieldType (Field n (PackedField (PackedList (Value a)))) Source #

putField :: FieldType (Field n (PackedField (PackedList (Value a)))) -> Field n (PackedField (PackedList (Value a))) Source #

field :: Functor f => (FieldType (Field n (PackedField (PackedList (Value a)))) -> f (FieldType (Field n (PackedField (PackedList (Value a)))))) -> Field n (PackedField (PackedList (Value a))) -> f (Field n (PackedField (PackedList (Value a)))) 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 (Enumeration a)))) = [a]
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 :: Required '2' (Value Float)} deriving (Generic, Show)
    instance Encode Inner
    instance Decode Inner

    data Outer a = Outer{outer :: Required '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

- runMessage :: m

#### Instances

Instances details

Functor Message Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods fmap :: (a -> b) -> Message a -> Message b Source # (<$) :: a -> Message b -> Message a Source #
Foldable Message Source # |

Instance details

Defined in Data.ProtocolBuffers.Message

Methods

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

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

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

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

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

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

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

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

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

toList :: Message a -> [a] Source #

null :: Message a -> Bool Source #

length :: Message a -> Int Source #

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

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

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

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

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

Traversable Message Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods traverse :: Applicative f => (a -> f b) -> Message a -> f (Message b) Source # sequenceA :: Applicative f => Message (f a) -> f (Message a) Source # mapM :: Monad m => (a -> m b) -> Message a -> m (Message b) Source # sequence :: Monad m => Message (m a) -> m (Message a) Source #
(Generic m, GMessageNFData (Rep m)) => NFData (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods rnf :: Message m -> () Source #
(Generic m, GMessageMonoid (Rep m)) => Monoid (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods mempty :: Message m Source # mappend :: Message m -> Message m -> Message m Source # mconcat :: [Message m] -> Message m Source #
(Generic m, GMessageMonoid (Rep m)) => Semigroup (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods (<>) :: Message m -> Message m -> Message m Source # sconcat :: NonEmpty (Message m) -> Message m Source # stimes :: Integral b => b -> Message m -> Message m Source #
Show m => Show (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods showsPrec :: Int -> Message m -> ShowS Source # show :: Message m -> String Source # showList :: [Message m] -> ShowS Source #
Eq m => Eq (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods (==) :: Message m -> Message m -> Bool Source # (/=) :: Message m -> Message m -> Bool Source #
Ord m => Ord (Message m) Source # |

Instance details

Defined in Data.ProtocolBuffers.Message

Methods

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

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

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

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

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

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

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

Decode m => DecodeWire (Message m) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods decodeWire :: WireField -> Get (Message m) 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 #
HasField (Field n (OptionalField (Maybe (Message a)))) Source # | Iso: ``FieldType` (`Optional` n (`Message` a)) = `Maybe` a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (OptionalField (Maybe (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe a

Methods

getField :: Field n (OptionalField (Maybe (Message a))) -> FieldType (Field n (OptionalField (Maybe (Message a)))) Source #

putField :: FieldType (Field n (OptionalField (Maybe (Message a)))) -> Field n (OptionalField (Maybe (Message a))) Source #

field :: Functor f => (FieldType (Field n (OptionalField (Maybe (Message a)))) -> f (FieldType (Field n (OptionalField (Maybe (Message a)))))) -> Field n (OptionalField (Maybe (Message a))) -> f (Field n (OptionalField (Maybe (Message a)))) Source #

HasField (Field n (RepeatedField [Message a])) Source # | Iso: ``FieldType` (`Repeated` n (`Message` a)) = [a]`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RepeatedField [Message a])) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RepeatedField [Message a])) = [a]

Methods

getField :: Field n (RepeatedField [Message a]) -> FieldType (Field n (RepeatedField [Message a])) Source #

putField :: FieldType (Field n (RepeatedField [Message a])) -> Field n (RepeatedField [Message a]) Source #

field :: Functor f => (FieldType (Field n (RepeatedField [Message a])) -> f (FieldType (Field n (RepeatedField [Message a])))) -> Field n (RepeatedField [Message a]) -> f (Field n (RepeatedField [Message a])) Source #

HasField (Field n (RequiredField (Always (Message a)))) Source # | Iso: ``FieldType` (`Required` n (`Message` a)) = a`

Instance details

Defined in Data.ProtocolBuffers.Message

Associated Types

type FieldType (Field n (RequiredField (Always (Message a)))) |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a

Methods

getField :: Field n (RequiredField (Always (Message a))) -> FieldType (Field n (RequiredField (Always (Message a)))) Source #

putField :: FieldType (Field n (RequiredField (Always (Message a)))) -> Field n (RequiredField (Always (Message a))) Source #

field :: Functor f => (FieldType (Field n (RequiredField (Always (Message a)))) -> f (FieldType (Field n (RequiredField (Always (Message a)))))) -> Field n (RequiredField (Always (Message a))) -> f (Field n (RequiredField (Always (Message a)))) 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 Optional n (Message a) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type Optional n (Message a) = Field n (OptionalField (Maybe (Message a)))
type Required n (Message a) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type Required n (Message a) = Field n (RequiredField (Always (Message a)))
type FieldType (Field n (OptionalField (Maybe (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (OptionalField (Maybe (Message a)))) = Maybe 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 (RequiredField (Always (Message a)))) Source # |
Instance details Defined in Data.ProtocolBuffers.Message type FieldType (Field n (RequiredField (Always (Message a)))) = a

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

Minimal complete definition

gdecode

#### Instances

Instances details

GDecode (U1 :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get (U1 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 x, GDecode y) => GDecode (x :+: y) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get ((x :+: y) a)
(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)
(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)
(Enum a, KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Enumeration a)))) :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Decode Methods gdecode :: HashMap Tag [WireField] -> Get (K1 i (Field n (RequiredField (Always (Enumeration 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 (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 (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)
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 :: Type -> Type) Source #

Minimal complete definition

gencode

#### Instances

Instances details

GEncode (U1 :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Encode Methods gencode :: U1 a -> 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
(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 (M1 i c a) Source # |
Instance details Defined in Data.ProtocolBuffers.Encode Methods gencode :: M1 i c a a0 -> Put

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

Minimal complete definition

gmempty, gmappend

#### Instances

Instances details

GMessageMonoid (U1 :: Type -> Type) Source # |
Instance details Defined in Data.ProtocolBuffers.Message Methods gmempty :: U1 a gmappend :: U1 a -> U1 a -> U1 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
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 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