protobuf-0.2.1.3: Google Protocol Buffers via GHC.Generics

Safe Haskell | None
Language | Haskell2010

Data.ProtocolBuffers

Contents

- Message Serialization
  - Encoding
  - Decoding
- Fields
  - Tags
  - Accessors
  - Selectors
- Values
  - Selectors
- Wire Coding

Description

An implementation of Protocol Buffers in pure Haskell.

Extensive documentation is available at https://developers.google.com/protocol-buffers/docs/overview and Google's reference implementation can be found at http://code.google.com/p/protobuf/.

It is intended to be used via GHC.Generics and does not require `.proto` files to function. Tools are being developed that will convert a Haskell Protobuf definition into a `.proto` and vice versa.

Given a message definition:

    {-# LANGUAGE DeriveGeneric #-}
    {-# LANGUAGE DataKinds     #-}

    import Data.Int
    import Data.ProtocolBuffers
    import Data.Text
    import GHC.Generics (Generic)
    import GHC.TypeLits
    import Data.Monoid
    import Data.Serialize
    import Data.Hex  -- cabal install hex (for testing)

     data Foo = Foo
       { field1 :: Required 1 (Value Int64) -- ^ The last field with tag = 1
       , field2 :: Optional 2 (Value Text) -- ^ The last field with tag = 2
       , field3 :: Repeated 3 (Value Bool)   -- ^ All fields with tag = 3, ordering is preserved
       } deriving (Generic, Show)

    instance Encode Foo
    instance Decode Foo

It can then be used for encoding and decoding. The `Encode` and `Decode` instances are derived automatically using DeriveGeneric and DefaultSignatures as outlined here: http://www.haskell.org/haskellwiki/GHC.Generics#More_general_default_methods.

To construct a message, use `putField` to set each field value. `Optional`, `Repeated` and `Packed` fields can be set to their empty value by using `mempty`. An example using record syntax for clarity:

    >>> let msg = Foo{field1 = putField 42, field2 = mempty, field3 = putField [True, False]}

To serialize a message first convert it into a `Put` by way of `encodeMessage` and then to a `ByteString` by using `runPut`. Lazy `ByteString` serialization is done with `runPutLazy`.

    >>> fmap hex runPut $ encodeMessage msg
    "082A18011800"

Decoding is done with the inverse functions: `decodeMessage` and `runGet`, or `runGetLazy`.

    >>> runGet decodeMessage =<< unhex "082A18011800" :: Either String Foo
    Right
      (Foo
        { field1 = Field {runField = Required {runRequired = Always {runAlways = Value {runValue = 42}}}}
        , field2 = Field {runField = Optional {runOptional = Last {getLast = Nothing}}}
        , field3 = Field {runField = Repeated {runRepeated = [Value {runValue = True},Value {runValue = False}]}}
        }
      )

Use `getField` to read fields from a message:

    >>> let Right msg = runGet decodeMessage =<< unhex "082A18011800" :: Either String Foo
    >>> getField $ field1 msg
    42
    >>> getField $ field2 msg
    Nothing
    >>> getField $ field3 msg
    [True,False]

Some Protocol Buffers features are not currently implemented:

- Default values for `Optional` fields
- Extension fields
- Storing unknown fields, those without a mapped field tag in message record
- Tag-delimited Groups, deprecated in lieu of `Message`

Synopsis

- class Encode a where
  - encode :: a -> Put
- encodeMessage :: Encode a => a -> Put
- encodeLengthPrefixedMessage :: Encode a => a -> Put
- class Decode a where
  - decode :: HashMap Tag [WireField] -> Get a
- decodeMessage :: Decode a => Get a
- decodeLengthPrefixedMessage :: Decode a => Get a
- type family Required (n :: Nat) a
- type family Optional (n :: Nat) a
- type Repeated (n :: Nat) a = Field n (RepeatedField [a])
- type Packed (n :: Nat) a = Field n (PackedField (PackedList a))
- class HasField a where
  - type FieldType a
  - getField :: a -> FieldType a
  - putField :: FieldType a -> a
  - field :: Functor f => (FieldType a -> f (FieldType a)) -> a -> f a
- data Field (n :: Nat) a
- data Value a
- data Enumeration a
- data Message m
- newtype Signed a = Signed a
- newtype Fixed a = Fixed a

# Message Serialization

## Encoding

class Encode a where Source #

Minimal complete definition

Nothing

Methods

encode :: a -> Put Source #

default encode :: (Generic a, GEncode (Rep a)) => a -> Put Source #

#### Instances

Instances details

Encode (HashMap Tag [WireField]) Source # | Untyped message encoding
Instance details Defined in Data.ProtocolBuffers.Encode Methods encode :: HashMap Tag [WireField] -> Put Source #

encodeMessage :: Encode a => a -> Put Source #

Encode a Protocol Buffers message.

encodeLengthPrefixedMessage :: Encode a => a -> Put Source #

Encode a Protocol Buffers message prefixed with a varint encoded 32-bit integer describing its length.

## Decoding

class Decode a where Source #

Minimal complete definition

Nothing

Methods

decode :: HashMap Tag [WireField] -> Get a Source #

default decode :: (Generic a, GDecode (Rep a)) => HashMap Tag [WireField] -> Get a Source #

#### Instances

Instances details

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 #

decodeMessage :: Decode a => Get a Source #

Decode a Protocol Buffers message.

decodeLengthPrefixedMessage :: Decode a => Get a Source #

Decode a Protocol Buffers message prefixed with a varint encoded 32-bit integer describing its length.

# Fields

## Tags

Restricted type aliases of `Field`. These are used to attach a field tag (a numeric id) to a field. Each tag must be unique within a given message, though this is not currently checked or enforced.

type family Required (n :: Nat) a Source #

Required fields. Parsing will return `empty` if a `Required` value is not found while decoding.

#### Instances

Instances details

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 Required n (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Required n (Enumeration a) = Field n (RequiredField (Always (Enumeration 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 family Optional (n :: Nat) a Source #

Optional fields. Values that are not found will return `Nothing`.

#### Instances

Instances details

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 Optional n (Enumeration a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Optional n (Enumeration a) = Field n (OptionalField (Last (Enumeration a)))
type Optional n (Value a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types type Optional n (Value a) = Field n (OptionalField (Last (Value a)))

type Repeated (n :: Nat) a = Field n (RepeatedField [a]) Source #

Lists of values.

type Packed (n :: Nat) a = Field n (PackedField (PackedList a)) Source #

Packed values.

## Accessors

Fields tend to have rather complex types that are unpleasant to interact with. `HasField` was designed to hide this complexity and provide a consistent way of getting and setting fields.

class HasField a where Source #

Functions for wrapping and unwrapping record fields. When applied they will have types similar to these:

    getField :: Required '1' (Value Text) -> Text
    putField :: Text -> Required '1' (Value Text)

    getField :: Optional '2' (Value Int32) -> Maybe Int32
    putField :: Maybe Int32 -> Optional '2' (Value Int32)

    getField :: Repeated '3' (Value Double) -> [Double]
    putField :: [Double] -> Repeated '3' (Value Double)

    getField :: Packed '4' (Value Word64) -> [Word64]
    putField :: [Word64] -> Packed '4' (Value Word64)

Minimal complete definition

getField, putField

Associated Types

type FieldType a Source #

Methods

getField :: a -> FieldType a Source #

Extract a value from it's `Field` representation.

putField :: FieldType a -> a Source #

Wrap it back up again.

field :: Functor f => (FieldType a -> f (FieldType a)) -> a -> f a Source #

An isomorphism lens compatible with the lens package

#### Instances

Instances details

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 #

## Selectors

Follow these rules to define fields supported by the generic encoder/decoder:

- The `n` phantom type parameter specifies the Protocol Buffers field tag (id).
- Field tags must be an instance of `Nat`.
- Field selectors must be an instance of `Foldable` to support encoding.
- Value selectors must be an instance of `Monoid` to support decoding.

data 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`

#### 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

# Values

## Selectors

Each field value needs to specify the way it should be encoded.

There are three built-in value selectors: `Value`, `Enumeration` and `Message`.

If you're unsure what value selector to use, `Value` is probably the correct one.

data Value a Source #

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

#### 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

data Enumeration a Source #

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

#### 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

data 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)

#### 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

# Wire Coding

Some primitive values can be more compactly represented. Fields that typically contain negative or very large numbers should use the `Signed` or `Fixed` wrappers to select their respective (efficient) formats.

newtype Signed a Source #

Signed integers are stored in a zz-encoded form.

Constructors

Signed a |

#### Instances

Instances details

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

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

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

null :: Signed a -> Bool Source #

length :: Signed a -> Int Source #

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

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

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

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

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

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

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(.&.) :: Signed a -> Signed a -> Signed a Source #

(.|.) :: Signed a -> Signed a -> Signed a Source #

xor :: Signed a -> Signed a -> Signed a Source #

complement :: Signed a -> Signed a Source #

shift :: Signed a -> Int -> Signed a Source #

rotate :: Signed a -> Int -> Signed a Source #

zeroBits :: Signed a Source #

bit :: Int -> Signed a Source #

setBit :: Signed a -> Int -> Signed a Source #

clearBit :: Signed a -> Int -> Signed a Source #

complementBit :: Signed a -> Int -> Signed a Source #

testBit :: Signed a -> Int -> Bool Source #

bitSizeMaybe :: Signed a -> Maybe Int Source #

bitSize :: Signed a -> Int Source #

isSigned :: Signed a -> Bool Source #

shiftL :: Signed a -> Int -> Signed a Source #

unsafeShiftL :: Signed a -> Int -> Signed a Source #

shiftR :: Signed a -> Int -> Signed a Source #

unsafeShiftR :: Signed a -> Int -> Signed a Source #

rotateL :: Signed a -> Int -> Signed a Source #

rotateR :: Signed a -> Int -> Signed a Source #

popCount :: Signed a -> Int Source #

Bounded a => Bounded (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Signed a Source # maxBound :: Signed a Source #
Enum a => Enum (Signed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Signed a -> Signed a Source #

pred :: Signed a -> Signed a Source #

toEnum :: Int -> Signed a Source #

fromEnum :: Signed a -> Int Source #

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

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

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

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

Floating a => Floating (Signed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

pi :: Signed a Source #

exp :: Signed a -> Signed a Source #

log :: Signed a -> Signed a Source #

sqrt :: Signed a -> Signed a Source #

(**) :: Signed a -> Signed a -> Signed a Source #

logBase :: Signed a -> Signed a -> Signed a Source #

sin :: Signed a -> Signed a Source #

cos :: Signed a -> Signed a Source #

tan :: Signed a -> Signed a Source #

asin :: Signed a -> Signed a Source #

acos :: Signed a -> Signed a Source #

atan :: Signed a -> Signed a Source #

sinh :: Signed a -> Signed a Source #

cosh :: Signed a -> Signed a Source #

tanh :: Signed a -> Signed a Source #

asinh :: Signed a -> Signed a Source #

acosh :: Signed a -> Signed a Source #

atanh :: Signed a -> Signed a Source #

log1p :: Signed a -> Signed a Source #

expm1 :: Signed a -> Signed a Source #

log1pexp :: Signed a -> Signed a Source #

log1mexp :: Signed a -> Signed a Source #

RealFloat a => RealFloat (Signed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

floatRadix :: Signed a -> Integer Source #

floatDigits :: Signed a -> Int Source #

floatRange :: Signed a -> (Int, Int) Source #

decodeFloat :: Signed a -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> Signed a Source #

exponent :: Signed a -> Int Source #

significand :: Signed a -> Signed a Source #

scaleFloat :: Int -> Signed a -> Signed a Source #

isNaN :: Signed a -> Bool Source #

isInfinite :: Signed a -> Bool Source #

isDenormalized :: Signed a -> Bool Source #

isNegativeZero :: Signed a -> Bool Source #

isIEEE :: Signed a -> Bool Source #

atan2 :: Signed a -> Signed a -> Signed a Source #

Num a => Num (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (+) :: Signed a -> Signed a -> Signed a Source # (-) :: Signed a -> Signed a -> Signed a Source # (*) :: Signed a -> Signed a -> Signed a Source # negate :: Signed a -> Signed a Source # abs :: Signed a -> Signed a Source # signum :: Signed a -> Signed a Source # fromInteger :: Integer -> Signed a Source #
Fractional a => Fractional (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (/) :: Signed a -> Signed a -> Signed a Source # recip :: Signed a -> Signed a Source # fromRational :: Rational -> Signed a Source #
Integral a => Integral (Signed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

quot :: Signed a -> Signed a -> Signed a Source #

rem :: Signed a -> Signed a -> Signed a Source #

div :: Signed a -> Signed a -> Signed a Source #

mod :: Signed a -> Signed a -> Signed a Source #

quotRem :: Signed a -> Signed a -> (Signed a, Signed a) Source #

divMod :: Signed a -> Signed a -> (Signed a, Signed a) Source #

toInteger :: Signed a -> Integer Source #

Real a => Real (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods toRational :: Signed a -> Rational Source #
RealFrac a => RealFrac (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods properFraction :: Integral b => Signed a -> (b, Signed a) Source # truncate :: Integral b => Signed a -> b Source # round :: Integral b => Signed a -> b Source # ceiling :: Integral b => Signed a -> b Source # floor :: Integral b => Signed a -> b Source #
Show a => Show (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Signed a -> ShowS Source # show :: Signed a -> String Source # showList :: [Signed a] -> ShowS Source #
Eq a => Eq (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Signed a -> Signed a -> Bool Source # (/=) :: Signed a -> Signed a -> Bool Source #
Ord a => Ord (Signed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods compare :: Signed a -> Signed a -> Ordering Source # (<) :: Signed a -> Signed a -> Bool Source # (<=) :: Signed a -> Signed a -> Bool Source # (>) :: Signed a -> Signed a -> Bool Source # (>=) :: Signed a -> Signed a -> Bool Source # max :: Signed a -> Signed a -> Signed a Source # min :: Signed a -> Signed a -> Signed a 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 (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 #
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 (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 #

newtype Fixed a Source #

Fixed integers are stored in little-endian form without additional encoding.

Constructors

Fixed a |

#### Instances

Instances details

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

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

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

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

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

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

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

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

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

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

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

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

null :: Fixed a -> Bool Source #

length :: Fixed a -> Int Source #

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

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

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

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

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

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

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

(.&.) :: Fixed a -> Fixed a -> Fixed a Source #

(.|.) :: Fixed a -> Fixed a -> Fixed a Source #

xor :: Fixed a -> Fixed a -> Fixed a Source #

complement :: Fixed a -> Fixed a Source #

shift :: Fixed a -> Int -> Fixed a Source #

rotate :: Fixed a -> Int -> Fixed a Source #

zeroBits :: Fixed a Source #

bit :: Int -> Fixed a Source #

setBit :: Fixed a -> Int -> Fixed a Source #

clearBit :: Fixed a -> Int -> Fixed a Source #

complementBit :: Fixed a -> Int -> Fixed a Source #

testBit :: Fixed a -> Int -> Bool Source #

bitSizeMaybe :: Fixed a -> Maybe Int Source #

bitSize :: Fixed a -> Int Source #

isSigned :: Fixed a -> Bool Source #

shiftL :: Fixed a -> Int -> Fixed a Source #

unsafeShiftL :: Fixed a -> Int -> Fixed a Source #

shiftR :: Fixed a -> Int -> Fixed a Source #

unsafeShiftR :: Fixed a -> Int -> Fixed a Source #

rotateL :: Fixed a -> Int -> Fixed a Source #

rotateR :: Fixed a -> Int -> Fixed a Source #

popCount :: Fixed a -> Int Source #

Bounded a => Bounded (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods minBound :: Fixed a Source # maxBound :: Fixed a Source #
Enum a => Enum (Fixed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

succ :: Fixed a -> Fixed a Source #

pred :: Fixed a -> Fixed a Source #

toEnum :: Int -> Fixed a Source #

fromEnum :: Fixed a -> Int Source #

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

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

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

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

Floating a => Floating (Fixed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

pi :: Fixed a Source #

exp :: Fixed a -> Fixed a Source #

log :: Fixed a -> Fixed a Source #

sqrt :: Fixed a -> Fixed a Source #

(**) :: Fixed a -> Fixed a -> Fixed a Source #

logBase :: Fixed a -> Fixed a -> Fixed a Source #

sin :: Fixed a -> Fixed a Source #

cos :: Fixed a -> Fixed a Source #

tan :: Fixed a -> Fixed a Source #

asin :: Fixed a -> Fixed a Source #

acos :: Fixed a -> Fixed a Source #

atan :: Fixed a -> Fixed a Source #

sinh :: Fixed a -> Fixed a Source #

cosh :: Fixed a -> Fixed a Source #

tanh :: Fixed a -> Fixed a Source #

asinh :: Fixed a -> Fixed a Source #

acosh :: Fixed a -> Fixed a Source #

atanh :: Fixed a -> Fixed a Source #

log1p :: Fixed a -> Fixed a Source #

expm1 :: Fixed a -> Fixed a Source #

log1pexp :: Fixed a -> Fixed a Source #

log1mexp :: Fixed a -> Fixed a Source #

RealFloat a => RealFloat (Fixed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

floatRadix :: Fixed a -> Integer Source #

floatDigits :: Fixed a -> Int Source #

floatRange :: Fixed a -> (Int, Int) Source #

decodeFloat :: Fixed a -> (Integer, Int) Source #

encodeFloat :: Integer -> Int -> Fixed a Source #

exponent :: Fixed a -> Int Source #

significand :: Fixed a -> Fixed a Source #

scaleFloat :: Int -> Fixed a -> Fixed a Source #

isNaN :: Fixed a -> Bool Source #

isInfinite :: Fixed a -> Bool Source #

isDenormalized :: Fixed a -> Bool Source #

isNegativeZero :: Fixed a -> Bool Source #

isIEEE :: Fixed a -> Bool Source #

atan2 :: Fixed a -> Fixed a -> Fixed a Source #

Num a => Num (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (+) :: Fixed a -> Fixed a -> Fixed a Source # (-) :: Fixed a -> Fixed a -> Fixed a Source # (*) :: Fixed a -> Fixed a -> Fixed a Source # negate :: Fixed a -> Fixed a Source # abs :: Fixed a -> Fixed a Source # signum :: Fixed a -> Fixed a Source # fromInteger :: Integer -> Fixed a Source #
Fractional a => Fractional (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (/) :: Fixed a -> Fixed a -> Fixed a Source # recip :: Fixed a -> Fixed a Source # fromRational :: Rational -> Fixed a Source #
Integral a => Integral (Fixed a) Source # |

Instance details

Defined in Data.ProtocolBuffers.Types

Methods

quot :: Fixed a -> Fixed a -> Fixed a Source #

rem :: Fixed a -> Fixed a -> Fixed a Source #

div :: Fixed a -> Fixed a -> Fixed a Source #

mod :: Fixed a -> Fixed a -> Fixed a Source #

quotRem :: Fixed a -> Fixed a -> (Fixed a, Fixed a) Source #

divMod :: Fixed a -> Fixed a -> (Fixed a, Fixed a) Source #

toInteger :: Fixed a -> Integer Source #

Real a => Real (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods toRational :: Fixed a -> Rational Source #
RealFrac a => RealFrac (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods properFraction :: Integral b => Fixed a -> (b, Fixed a) Source # truncate :: Integral b => Fixed a -> b Source # round :: Integral b => Fixed a -> b Source # ceiling :: Integral b => Fixed a -> b Source # floor :: Integral b => Fixed a -> b Source #
Show a => Show (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods showsPrec :: Int -> Fixed a -> ShowS Source # show :: Fixed a -> String Source # showList :: [Fixed a] -> ShowS Source #
Eq a => Eq (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods (==) :: Fixed a -> Fixed a -> Bool Source # (/=) :: Fixed a -> Fixed a -> Bool Source #
Ord a => Ord (Fixed a) Source # |
Instance details Defined in Data.ProtocolBuffers.Types Methods compare :: Fixed a -> Fixed a -> Ordering Source # (<) :: Fixed a -> Fixed a -> Bool Source # (<=) :: Fixed a -> Fixed a -> Bool Source # (>) :: Fixed a -> Fixed a -> Bool Source # (>=) :: Fixed a -> Fixed a -> Bool Source # max :: Fixed a -> Fixed a -> Fixed a Source # min :: Fixed a -> Fixed a -> Fixed 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 #
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 #
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 #
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 #