proto3-suite-0.9.4: A higher-level API to the proto3-wire library
Safe HaskellNone
LanguageHaskell2010

Proto3.Suite.Form

Description

Type-Level Format Information

Use compile-proto-file --typeLevelFormat ... to instantiate these type families to provide type-level information that may be used to define custom encoders and decoders.

WARNING: This module is experimental and breaking changes may occur much more frequently than in the other modules of this package, perhaps even in patch releases.

Synopsis

Documentation

type family NamesOf message :: [Symbol] Source #

Returns the names of the fields within a given type of message.

The names appear in increasing order of field number, in case that helps type-level search algorithms, though at present it is likely that there is no benefit other than ensuring that declaration order is irrelevant.

Note that the names of fields and oneofs must be unique within their shared namespace (see https://protobuf.dev/reference/protobuf/proto3-spec/#message_definition).

Instances

Instances details
type NamesOf (Wrapper protoType) Source # 
Instance details

Defined in Proto3.Suite.Form

type NamesOf (Wrapper protoType) = '["value"]
type NamesOf (Association _1 _2) Source # 
Instance details

Defined in Proto3.Suite.Form

type NamesOf (Association _1 _2) = '["key", "value"]

type family NumberOf message (name :: Symbol) :: Nat Source #

In the context of a message type, maps its field names to their numbers.

Instances

Instances details
type NumberOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Wrapper protoType) "value" = 1
type NumberOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Association _1 _2) "key" = 1
type NumberOf (Association _1 _2) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Association _1 _2) "value" = 2

type family ProtoTypeOf message (name :: Symbol) :: ProtoType Source #

In the context of a message type, maps the name of every field to its protobuf type.

Instances

Instances details
type ProtoTypeOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Wrapper protoType) "value" = protoType
type ProtoTypeOf (Association _1 value) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Association _1 value) "value" = value
type ProtoTypeOf (Association key _1) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Association key _1) "key" = key

type family OneOfOf message (name :: Symbol) :: Symbol Source #

In the context of a message type, maps the name of every field to the name of its containing oneof, or to "" if that field is not part of a oneof. Also maps the name of every oneof in the message to itself.

Instances

Instances details
type OneOfOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Wrapper protoType) "value" = ""
type OneOfOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Association _1 _2) "key" = ""
type OneOfOf (Association _1 _2) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Association _1 _2) "value" = ""

type family CardinalityOf message (name :: Symbol) :: Cardinality Source #

In the context of a message type, maps the name of every field and oneof to its Cardinality.

(Every oneof in the message is mapped to OneOf, as are those fields that are within oneofs.)

Instances

Instances details
type CardinalityOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Wrapper protoType) "value" = 'Implicit
type CardinalityOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Association _1 _2) "key" = 'Implicit
type CardinalityOf (Association _1 value) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Association _1 value) "value" = CardinalityOfMapped value

type FieldNotFound message (name :: Symbol) = (('Text "Field " ':<>: 'ShowType name) ':<>: 'Text " not found in message:") ':$$: 'ShowType message Source #

A compilation error message for when the given message does not contain a field with the given name.

type FieldOrOneOfNotFound message (name :: Symbol) = (('Text "Field or oneof " ':<>: 'ShowType name) ':<>: 'Text " not found in message:") ':$$: 'ShowType message Source #

A compilation error message for when the given message does not contain a field or oneof with the given name.

data Packing Source #

The packing of field that is repeated or is a map. Every encoding appends and element, and omission means zero elements.

Constructors

Unpacked

Packing is not preferred or not supported (for example, submessages and maps).

Packed

Packing is supported and preferred (perhaps implicitly).

data Cardinality Source #

Expresses how many values we expect a field to contain, what it means when its encoding is omitted, and if it is repeated, whether or not packing is preferred.

Each data constructor is chosen in such a way that it implies how many values are expected as arguments to field. This choice simplifies instantiation of type classes.

Constructors

Implicit

We expect exactly one value for this field, though the default value is expressed by omission in the binary format. Such a field is never "unset".

In the terminology of the proto3 specification, the field is "singular" and is neither optional nor part of a oneof.

Put another way: the field is not declared optional or repeated, it is not a map, it does not have a message type, and it is not part of a oneof.

field will expect exactly one field value as its argument. Typically the argument type is not a container type. But there may be application-specific reasons for supplying a container type, such as the field type being a message that has container semantics implemented by an application-specific instance of FieldForm.

Optional

The field is singular and has optional field presence. That is, That is, it is a non-repeated submessage field (which is optional even when not explicitly declared optional), or an optional scalar/enumerated field whose omission implies an "unset" value distinct from the default value, or any field within a oneof.

field will expect zero or one field values as its argument. Typically the type involves Maybe, but when the Nothing case can be excluded, feel free to use Identity to illustrate that fact.

Repeated Packing

The field is repeated or is a map, with the indicated packing preference (which for @map is always Unpacked).

field will expect zero or more field values, typically expressed by a container type having an instance of ToRepeated.

data ProtoType Source #

The type of a message field, but when the field is repeated, this is the element type.

Design Note: We do not use the same Haskell types recognized by MessageField because there more than one such type corresponds to protobuf type string. But see RecoverProtoType.

Constructors

Int32 
Int64 
SInt32 
SInt64 
UInt32 
UInt64 
Fixed32 
Fixed64 
SFixed32 
SFixed64 
String 
Bytes 
Bool 
Float 
Double 
Enumeration Type

The field is the type created by code generation from the protobuf enum.

Message Type

The field is the type created by code generation from the protobuf message.

Map ProtoType ProtoType

A map with the given key and value types.

data Association (key :: ProtoType) (value :: ProtoType) Source #

The type of the repeated key-value pair submessage implied by a map field.

We never need to construct values; instead we construct values of types such as Encoding (Association key value).

The key field is named "key" and the value field is named "value".

Instances

Instances details
FieldForm 'Optional ('Map key value) (Identity (MessageEncoding (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Map key value) (Identity (MessageEncoder (Association key value)) :: Type) Source #

This instance is rather artificial because maps are automatically repeated and unpacked, with no option to specify a single key-value pair as an optional field or a field of a oneof. Hence the code generator should never directly make use of this instance, but it will do so indirectly via the general instance for repeated unpacked fields, which will then delegate to this instance.

Instance details

Defined in Proto3.Suite.Form.Encode.Core

type NamesOf (Association _1 _2) Source # 
Instance details

Defined in Proto3.Suite.Form

type NamesOf (Association _1 _2) = '["key", "value"]
type CardinalityOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Association _1 _2) "key" = 'Implicit
type CardinalityOf (Association _1 value) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Association _1 value) "value" = CardinalityOfMapped value
type NumberOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Association _1 _2) "key" = 1
type NumberOf (Association _1 _2) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Association _1 _2) "value" = 2
type OneOfOf (Association _1 _2) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Association _1 _2) "key" = ""
type OneOfOf (Association _1 _2) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Association _1 _2) "value" = ""
type ProtoTypeOf (Association _1 value) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Association _1 value) "value" = value
type ProtoTypeOf (Association key _1) "key" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Association key _1) "key" = key

type family CardinalityOfMapped (protoType :: ProtoType) :: Cardinality where ... Source #

Yields the field presence of a mapped value of the given protobuf type.

Equations

CardinalityOfMapped ('Message _1) = 'Optional 
CardinalityOfMapped ('Map k v) = TypeError ('Text "Nested maps are disallowed, so this cannot be a mapped type:" ':$$: 'ShowType ('Map k v)) :: Cardinality 
CardinalityOfMapped _1 = 'Implicit 

data Wrapper (protoType :: ProtoType) Source #

Indicates the standard protobuf wrapper having the field type given by the type argument.

We never need to construct values; instead we construct values of types such as Encoding (Wrapper protoType) or Wrap a, where a is a corresponding native representation.

Note that if Google ever adds wrappers for "sint..." or "...fixed..." then this type constructor will naturally support such wrappers.

Instances

Instances details
a ~ Bool => FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bool)) (Identity Bool) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity ShortByteString) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortByteString => FieldForm 'Optional ('Message (Wrapper 'Bytes)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Double => FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Double) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Double)) (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Float => FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Float)) (Identity Float) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int32 => FieldForm 'Optional ('Message (Wrapper 'Int32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Int8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Int64 => FieldForm 'Optional ('Message (Wrapper 'Int64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ ShortText => FieldForm 'Optional ('Message (Wrapper 'String)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity Text) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'String)) (Identity ShortText) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word32 => FieldForm 'Optional ('Message (Wrapper 'UInt32)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word16) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word32) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word64) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity Word8) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

a ~ Word64 => FieldForm 'Optional ('Message (Wrapper 'UInt64)) (Identity (Auto a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode

FieldForm 'Implicit protoType a => FieldForm 'Optional ('Message (Wrapper protoType)) (Identity (Wrap a) :: Type) Source # 
Instance details

Defined in Proto3.Suite.Form.Encode.Core

type NamesOf (Wrapper protoType) Source # 
Instance details

Defined in Proto3.Suite.Form

type NamesOf (Wrapper protoType) = '["value"]
type CardinalityOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type CardinalityOf (Wrapper protoType) "value" = 'Implicit
type NumberOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type NumberOf (Wrapper protoType) "value" = 1
type OneOfOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type OneOfOf (Wrapper protoType) "value" = ""
type ProtoTypeOf (Wrapper protoType) "value" Source # 
Instance details

Defined in Proto3.Suite.Form

type ProtoTypeOf (Wrapper protoType) "value" = protoType

type family RecoverProtoType haskellType :: ProtoType where ... Source #

Given the Haskell type used by features such as MessageField to indicate the encoding of a message field, returns the corresponding type of kind ProtoType, which for repeated types is the element type. This type family is not injective because multiple types are supported for fields of protobuf type string.

class (RecoverCardinality haskellType ~ cardinality, RecoverProtoType haskellType ~ protoType) => MessageFieldType (cardinality :: Cardinality) (protoType :: ProtoType) haskellType Source #

Inhabited by Haskell types used by features such as MessageField that correspond to particular protobuf types that are repeated in the specified way.

Instances

Instances details
MessageFieldType 'Implicit 'Bool Bool Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Double Double Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Float Float Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Int32 Int32 Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Int64 Int64 Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'UInt32 Word32 Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'UInt64 Word64 Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Bytes (Bytes a) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Fixed32 (Fixed Word32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'Fixed64 (Fixed Word64) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'SFixed32 (Signed (Fixed Int32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'SFixed64 (Signed (Fixed Int64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'SInt32 (Signed Int32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'SInt64 (Signed Int64) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit 'String (String a) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Bool (Maybe (ForceEmit Bool)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Bytes (Maybe (ForceEmit (Bytes a))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Double (Maybe (ForceEmit Double)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Fixed32 (Maybe (ForceEmit (Fixed Word32))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Fixed64 (Maybe (ForceEmit (Fixed Word64))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Float (Maybe (ForceEmit Float)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Int32 (Maybe (ForceEmit Int32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'Int64 (Maybe (ForceEmit Int64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'SFixed32 (Maybe (ForceEmit (Signed (Fixed Int32)))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'SFixed64 (Maybe (ForceEmit (Signed (Fixed Int64)))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'SInt32 (Maybe (ForceEmit (Signed Int32))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'SInt64 (Maybe (ForceEmit (Signed Int64))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'String (Maybe (ForceEmit (String a))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'UInt32 (Maybe (ForceEmit Word32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional 'UInt64 (Maybe (ForceEmit Word64)) Source # 
Instance details

Defined in Proto3.Suite.Form

(OptionalMessageFieldType m haskellType, RecoverCardinality haskellType ~ 'Optional, RecoverProtoType haskellType ~ 'Message m) => MessageFieldType 'Optional ('Message m) haskellType Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Implicit ('Enumeration e) (Enumerated e) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType 'Optional ('Enumeration e) (Maybe (ForceEmit (Enumerated e))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Bool (PackedVec Bool) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Double (PackedVec Double) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Fixed32 (PackedVec (Fixed Word32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Fixed64 (PackedVec (Fixed Word64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Float (PackedVec Float) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Int32 (PackedVec Int32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'Int64 (PackedVec Int64) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'SFixed32 (PackedVec (Signed (Fixed Int32))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'SFixed64 (PackedVec (Signed (Fixed Int64))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'SInt32 (PackedVec (Signed Int32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'SInt64 (PackedVec (Signed Int64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'UInt32 (PackedVec Word32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) 'UInt64 (PackedVec Word64) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Bool (UnpackedVec Bool) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Bytes (UnpackedVec (Bytes a)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Double (UnpackedVec Double) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Fixed32 (UnpackedVec (Fixed Word32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Fixed64 (UnpackedVec (Fixed Word64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Float (UnpackedVec Float) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Int32 (UnpackedVec Int32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'Int64 (UnpackedVec Int64) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'SFixed32 (UnpackedVec (Signed (Fixed Int32))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'SFixed64 (UnpackedVec (Signed (Fixed Int64))) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'SInt32 (UnpackedVec (Signed Int32)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'SInt64 (UnpackedVec (Signed Int64)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'String (UnpackedVec (String a)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'UInt32 (UnpackedVec Word32) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) 'UInt64 (UnpackedVec Word64) Source # 
Instance details

Defined in Proto3.Suite.Form

(RepeatedMessageFieldType m haskellType, RecoverCardinality haskellType ~ 'Repeated 'Unpacked, RecoverProtoType haskellType ~ 'Message m) => MessageFieldType ('Repeated 'Unpacked) ('Message m) haskellType Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Packed) ('Enumeration e) (PackedVec (Enumerated e)) Source # 
Instance details

Defined in Proto3.Suite.Form

MessageFieldType ('Repeated 'Unpacked) ('Enumeration e) (UnpackedVec (Enumerated e)) Source # 
Instance details

Defined in Proto3.Suite.Form

(MessageFieldType 'Implicit k kh, MessageFieldType (CardinalityOfMapped v) v vh) => MessageFieldType ('Repeated 'Unpacked) ('Map k v) (Map kh vh) Source # 
Instance details

Defined in Proto3.Suite.Form

type family OptionalMessageFieldType m haskellType where ... Source #

Helps to diagnose the absence of an instance for MessageFieldType for optional submessages by requiring that the second type parameter be Nested of the first. Please try to avoid using this type family directly; it is exported only to help explain compilation errors.

Equations

OptionalMessageFieldType m (Nested m) = () 
OptionalMessageFieldType m (Nested a) = TypeError (('Text "Expected reflected protobuf submessage type " ':<>: 'ShowType m) ':$$: ('Text "Actual type: " ':<>: 'ShowType a)) :: Constraint 
OptionalMessageFieldType m haskellType = TypeError (((('Text "When using a Haskell type to specify an optional protobuf submessage" ':$$: 'Text "(as opposed to repeated one or a submessage within a oneof)") ':$$: 'Text "you must wrap the Haskell reflection type in Proto3.Suite.Nested.") ':$$: ('Text "Expected reflected protobuf submessage type " ':<>: 'ShowType m)) ':$$: ('Text "Haskell type provided: " ':<>: 'ShowType haskellType)) :: Constraint 

type family RepeatedMessageFieldType m haskellType where ... Source #

Helps to diagnose the absence of an instance for MessageFieldType for repeated submessages by requiring that the second type parameter be NestedVec of the first. Please try to avoid using this type family directly; it is exported only to help explain compilation errors.

Equations

RepeatedMessageFieldType m (NestedVec m) = () 
RepeatedMessageFieldType m (NestedVec a) = TypeError (('Text "Expected reflected protobuf submessage type " ':<>: 'ShowType m) ':$$: ('Text "Actual type: " ':<>: 'ShowType a)) :: Constraint 
RepeatedMessageFieldType m haskellType = TypeError (((('Text "When using a Haskell type to specify a repeated protobuf submessage" ':$$: 'Text "(as opposed to an optional one or a submessage within a oneof)") ':$$: 'Text "you must wrap the Haskell reflection type in Proto3.Suite.NestedVec.") ':$$: ('Text "Expected reflected protobuf submessage type " ':<>: 'ShowType m)) ':$$: ('Text "Haskell type provided: " ':<>: 'ShowType haskellType)) :: Constraint