Safe Haskell | None |
---|---|
Language | Haskell98 |
Synopsis
- data Double
- data Float
- data Bool
- data Maybe a
- data Seq a
- newtype Utf8 = Utf8 ByteString
- data ByteString
- data Int32
- data Int64
- data Word32
- data Word64
- newtype WireTag = WireTag {
- getWireTag :: Word32
- newtype FieldId = FieldId {
- getFieldId :: Int32
- newtype WireType = WireType {}
- newtype FieldType = FieldType {
- getFieldType :: Int
- newtype EnumCode = EnumCode {
- getEnumCode :: Int32
- type WireSize = Int64
- class Default a => Mergeable a where
- mergeAppend :: a -> a -> a
- mergeConcat :: Foldable t => t a -> a
- class Default a where
- defaultValue :: a
- isValidUTF8 :: ByteString -> Maybe Int
- toUtf8 :: ByteString -> Either Int Utf8
- utf8 :: Utf8 -> ByteString
- uToString :: Utf8 -> String
- uFromString :: String -> Utf8
Basic types for protocol buffer fields in Haskell
Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type.
Instances
Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.
Instances
Eq Float | Note that due to the presence of
Also note that
|
Floating Float | Since: base-2.1 |
Data Float | Since: base-4.0.0.0 |
Defined in Data.Data gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Float -> c Float # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Float # dataTypeOf :: Float -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Float) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Float) # gmapT :: (forall b. Data b => b -> b) -> Float -> Float # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Float -> r # gmapQ :: (forall d. Data d => d -> u) -> Float -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Float -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Float -> m Float # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Float -> m Float # | |
Ord Float | Note that due to the presence of
Also note that, due to the same,
|
Read Float | Since: base-2.1 |
RealFloat Float | Since: base-2.1 |
Defined in GHC.Float floatRadix :: Float -> Integer # floatDigits :: Float -> Int # floatRange :: Float -> (Int, Int) # decodeFloat :: Float -> (Integer, Int) # encodeFloat :: Integer -> Int -> Float # significand :: Float -> Float # scaleFloat :: Int -> Float -> Float # isInfinite :: Float -> Bool # isDenormalized :: Float -> Bool # isNegativeZero :: Float -> Bool # | |
Hashable Float | Note: prior to The Since: hashable-1.3.0.0 |
Defined in Data.Hashable.Class | |
ToJSON Float | |
Defined in Data.Aeson.Types.ToJSON | |
ToJSONKey Float | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON Float | |
FromJSONKey Float | |
Defined in Data.Aeson.Types.FromJSON | |
PrintfArg Float | Since: base-2.1 |
Defined in Text.Printf formatArg :: Float -> FieldFormatter # parseFormat :: Float -> ModifierParser # | |
Storable Float | Since: base-2.1 |
Unbox Float | |
Defined in Data.Vector.Unboxed.Base | |
Default Float Source # | |
Defined in Text.ProtocolBuffers.Basic defaultValue :: Float Source # | |
Mergeable Float Source # | |
Defined in Text.ProtocolBuffers.Basic | |
TextType Float Source # | |
Wire Float Source # | |
GPB Float Source # | |
Defined in Text.ProtocolBuffers.Extensions | |
IArray UArray Float | |
Defined in Data.Array.Base bounds :: Ix i => UArray i Float -> (i, i) # numElements :: Ix i => UArray i Float -> Int unsafeArray :: Ix i => (i, i) -> [(Int, Float)] -> UArray i Float unsafeAt :: Ix i => UArray i Float -> Int -> Float unsafeReplace :: Ix i => UArray i Float -> [(Int, Float)] -> UArray i Float unsafeAccum :: Ix i => (Float -> e' -> Float) -> UArray i Float -> [(Int, e')] -> UArray i Float unsafeAccumArray :: Ix i => (Float -> e' -> Float) -> Float -> (i, i) -> [(Int, e')] -> UArray i Float | |
Vector Vector Float | |
Defined in Data.Vector.Unboxed.Base basicUnsafeFreeze :: PrimMonad m => Mutable Vector (PrimState m) Float -> m (Vector Float) # basicUnsafeThaw :: PrimMonad m => Vector Float -> m (Mutable Vector (PrimState m) Float) # basicLength :: Vector Float -> Int # basicUnsafeSlice :: Int -> Int -> Vector Float -> Vector Float # basicUnsafeIndexM :: Monad m => Vector Float -> Int -> m Float # basicUnsafeCopy :: PrimMonad m => Mutable Vector (PrimState m) Float -> Vector Float -> m () # | |
MVector MVector Float | |
Defined in Data.Vector.Unboxed.Base basicLength :: MVector s Float -> Int # basicUnsafeSlice :: Int -> Int -> MVector s Float -> MVector s Float # basicOverlaps :: MVector s Float -> MVector s Float -> Bool # basicUnsafeNew :: PrimMonad m => Int -> m (MVector (PrimState m) Float) # basicInitialize :: PrimMonad m => MVector (PrimState m) Float -> m () # basicUnsafeReplicate :: PrimMonad m => Int -> Float -> m (MVector (PrimState m) Float) # basicUnsafeRead :: PrimMonad m => MVector (PrimState m) Float -> Int -> m Float # basicUnsafeWrite :: PrimMonad m => MVector (PrimState m) Float -> Int -> Float -> m () # basicClear :: PrimMonad m => MVector (PrimState m) Float -> m () # basicSet :: PrimMonad m => MVector (PrimState m) Float -> Float -> m () # basicUnsafeCopy :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m () # basicUnsafeMove :: PrimMonad m => MVector (PrimState m) Float -> MVector (PrimState m) Float -> m () # basicUnsafeGrow :: PrimMonad m => MVector (PrimState m) Float -> Int -> m (MVector (PrimState m) Float) # | |
Generic1 (URec Float :: k -> Type) | |
MessageAPI msg (msg -> Float) Float Source # | |
MArray (STUArray s) Float (ST s) | |
Defined in Data.Array.Base getBounds :: Ix i => STUArray s i Float -> ST s (i, i) # getNumElements :: Ix i => STUArray s i Float -> ST s Int newArray :: Ix i => (i, i) -> Float -> ST s (STUArray s i Float) # newArray_ :: Ix i => (i, i) -> ST s (STUArray s i Float) # unsafeNewArray_ :: Ix i => (i, i) -> ST s (STUArray s i Float) unsafeRead :: Ix i => STUArray s i Float -> Int -> ST s Float unsafeWrite :: Ix i => STUArray s i Float -> Int -> Float -> ST s () | |
Functor (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
Foldable (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Foldable fold :: Monoid m => URec Float m -> m # foldMap :: Monoid m => (a -> m) -> URec Float a -> m # foldr :: (a -> b -> b) -> b -> URec Float a -> b # foldr' :: (a -> b -> b) -> b -> URec Float a -> b # foldl :: (b -> a -> b) -> b -> URec Float a -> b # foldl' :: (b -> a -> b) -> b -> URec Float a -> b # foldr1 :: (a -> a -> a) -> URec Float a -> a # foldl1 :: (a -> a -> a) -> URec Float a -> a # toList :: URec Float a -> [a] # null :: URec Float a -> Bool # length :: URec Float a -> Int # elem :: Eq a => a -> URec Float a -> Bool # maximum :: Ord a => URec Float a -> a # minimum :: Ord a => URec Float a -> a # | |
Traversable (URec Float :: Type -> Type) | Since: base-4.9.0.0 |
Defined in Data.Traversable | |
Eq (URec Float p) | |
Ord (URec Float p) | |
Defined in GHC.Generics | |
Show (URec Float p) | |
Generic (URec Float p) | |
newtype Vector Float | |
data URec Float (p :: k) | Used for marking occurrences of Since: base-4.9.0.0 |
newtype MVector s Float | |
type Rep1 (URec Float :: k -> Type) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
type Rep (URec Float p) | |
Defined in GHC.Generics |
Instances
The Maybe
type encapsulates an optional value. A value of type
either contains a value of type Maybe
aa
(represented as
),
or it is empty (represented as Just
aNothing
). Using Maybe
is a good way to
deal with errors or exceptional cases without resorting to drastic
measures such as error
.
The Maybe
type is also a monad. It is a simple kind of error
monad, where all errors are represented by Nothing
. A richer
error monad can be built using the Either
type.
Instances
Monad Maybe | Since: base-2.1 |
Functor Maybe | Since: base-2.1 |
MonadFail Maybe | Since: base-4.9.0.0 |
Defined in Control.Monad.Fail | |
Applicative Maybe | Since: base-2.1 |
Foldable Maybe | Since: base-2.1 |
Defined in Data.Foldable fold :: Monoid m => Maybe m -> m # foldMap :: Monoid m => (a -> m) -> Maybe a -> m # foldr :: (a -> b -> b) -> b -> Maybe a -> b # foldr' :: (a -> b -> b) -> b -> Maybe a -> b # foldl :: (b -> a -> b) -> b -> Maybe a -> b # foldl' :: (b -> a -> b) -> b -> Maybe a -> b # foldr1 :: (a -> a -> a) -> Maybe a -> a # foldl1 :: (a -> a -> a) -> Maybe a -> a # elem :: Eq a => a -> Maybe a -> Bool # maximum :: Ord a => Maybe a -> a # minimum :: Ord a => Maybe a -> a # | |
Traversable Maybe | Since: base-2.1 |
ToJSON1 Maybe | |
Defined in Data.Aeson.Types.ToJSON liftToJSON :: (a -> Value) -> ([a] -> Value) -> Maybe a -> Value # liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Maybe a] -> Value # liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Maybe a -> Encoding # liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Maybe a] -> Encoding # | |
FromJSON1 Maybe | |
Alternative Maybe | Since: base-2.1 |
MonadPlus Maybe | Since: base-2.1 |
Eq1 Maybe | Since: base-4.9.0.0 |
Ord1 Maybe | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Read1 Maybe | Since: base-4.9.0.0 |
Defined in Data.Functor.Classes | |
Show1 Maybe | Since: base-4.9.0.0 |
Hashable1 Maybe | |
Defined in Data.Hashable.Class | |
ExtKey Maybe Source # | |
MonadError () Maybe | Since: mtl-2.2.2 |
Defined in Control.Monad.Error.Class throwError :: () -> Maybe a # catchError :: Maybe a -> (() -> Maybe a) -> Maybe a # | |
(Selector s, GToJSON enc arity (K1 i (Maybe a) :: Type -> Type), KeyValuePair enc pairs, Monoid pairs) => RecordToPairs enc pairs arity (S1 s (K1 i (Maybe a) :: Type -> Type)) | |
Defined in Data.Aeson.Types.ToJSON | |
(Default msg, Default a) => MessageAPI msg (msg -> Maybe a) a Source # | |
(Selector s, FromJSON a) => RecordFromJSON arity (S1 s (K1 i (Maybe a) :: Type -> Type)) | |
Defined in Data.Aeson.Types.FromJSON | |
Default v => MessageAPI msg (Key Maybe msg v) v Source # | |
Eq a => Eq (Maybe a) | Since: base-2.1 |
Data a => Data (Maybe a) | Since: base-4.0.0.0 |
Defined in Data.Data gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) # toConstr :: Maybe a -> Constr # dataTypeOf :: Maybe a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Maybe a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Maybe a)) # gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r # gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) # | |
Ord a => Ord (Maybe a) | Since: base-2.1 |
Read a => Read (Maybe a) | Since: base-2.1 |
Show a => Show (Maybe a) | Since: base-2.1 |
Generic (Maybe a) | |
Semigroup a => Semigroup (Maybe a) | Since: base-4.9.0.0 |
Semigroup a => Monoid (Maybe a) | Lift a semigroup into Since 4.11.0: constraint on inner Since: base-2.1 |
Hashable a => Hashable (Maybe a) | |
Defined in Data.Hashable.Class | |
ToJSON a => ToJSON (Maybe a) | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON a => FromJSON (Maybe a) | |
SingKind a => SingKind (Maybe a) | Since: base-4.9.0.0 |
Default (Maybe a) Source # | |
Defined in Text.ProtocolBuffers.Basic defaultValue :: Maybe a Source # | |
Mergeable a => Mergeable (Maybe a) Source # | |
Defined in Text.ProtocolBuffers.Basic | |
TextType a => TextType (Maybe a) Source # | |
Generic1 Maybe | |
SingI (Nothing :: Maybe a) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
SingI a2 => SingI (Just a2 :: Maybe a1) | Since: base-4.9.0.0 |
Defined in GHC.Generics | |
type Rep (Maybe a) | Since: base-4.6.0.0 |
data Sing (b :: Maybe a) | |
type DemoteRep (Maybe a) | |
Defined in GHC.Generics | |
type Rep1 Maybe | Since: base-4.6.0.0 |
General-purpose finite sequences.
Instances
Monad Seq | |
Functor Seq | |
MonadFix Seq | Since: containers-0.5.11 |
Defined in Data.Sequence.Internal | |
Applicative Seq | Since: containers-0.5.4 |
Foldable Seq | |
Defined in Data.Sequence.Internal fold :: Monoid m => Seq m -> m # foldMap :: Monoid m => (a -> m) -> Seq a -> m # foldr :: (a -> b -> b) -> b -> Seq a -> b # foldr' :: (a -> b -> b) -> b -> Seq a -> b # foldl :: (b -> a -> b) -> b -> Seq a -> b # foldl' :: (b -> a -> b) -> b -> Seq a -> b # foldr1 :: (a -> a -> a) -> Seq a -> a # foldl1 :: (a -> a -> a) -> Seq a -> a # elem :: Eq a => a -> Seq a -> Bool # maximum :: Ord a => Seq a -> a # | |
Traversable Seq | |
ToJSON1 Seq | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON1 Seq | |
Alternative Seq | Since: containers-0.5.4 |
MonadPlus Seq | |
Eq1 Seq | Since: containers-0.5.9 |
Ord1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Read1 Seq | Since: containers-0.5.9 |
Defined in Data.Sequence.Internal | |
Show1 Seq | Since: containers-0.5.9 |
MonadZip Seq |
|
UnzipWith Seq | |
Defined in Data.Sequence.Internal unzipWith' :: (x -> (a, b)) -> Seq x -> (Seq a, Seq b) | |
ExtKey Seq Source # | |
MessageAPI msg (msg -> Seq a) (Seq a) Source # | |
Default v => MessageAPI msg (Key Seq msg v) (Seq v) Source # | |
IsList (Seq a) | |
Eq a => Eq (Seq a) | |
Data a => Data (Seq a) | |
Defined in Data.Sequence.Internal gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Seq a -> c (Seq a) # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Seq a) # dataTypeOf :: Seq a -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Seq a)) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Seq a)) # gmapT :: (forall b. Data b => b -> b) -> Seq a -> Seq a # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Seq a -> r # gmapQ :: (forall d. Data d => d -> u) -> Seq a -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> Seq a -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Seq a -> m (Seq a) # | |
Ord a => Ord (Seq a) | |
Read a => Read (Seq a) | |
Show a => Show (Seq a) | |
a ~ Char => IsString (Seq a) | Since: containers-0.5.7 |
Defined in Data.Sequence.Internal fromString :: String -> Seq a # | |
Semigroup (Seq a) | Since: containers-0.5.7 |
Monoid (Seq a) | |
ToJSON a => ToJSON (Seq a) | |
Defined in Data.Aeson.Types.ToJSON | |
FromJSON a => FromJSON (Seq a) | |
NFData a => NFData (Seq a) | |
Defined in Data.Sequence.Internal | |
Default (Seq a) Source # | |
Defined in Text.ProtocolBuffers.Basic defaultValue :: Seq a Source # | |
Mergeable (Seq a) Source # | |
Defined in Text.ProtocolBuffers.Basic | |
TextType a => TextType (Seq a) Source # | |
type Item (Seq a) | |
Defined in Data.Sequence.Internal |
Utf8
is used to mark ByteString
values that (should) contain
valid utf8 encoded strings. This type is used to represent
TYPE_STRING
values.
Instances
data ByteString #
A space-efficient representation of a Word8
vector, supporting many
efficient operations.
A lazy ByteString
contains 8-bit bytes, or by using the operations
from Data.ByteString.Lazy.Char8 it can be interpreted as containing
8-bit characters.
Instances
32-bit signed integer type
Instances
64-bit signed integer type
Instances
32-bit unsigned integer type
Instances
64-bit unsigned integer type
Instances
Haskell types that act in the place of DescritorProto values
WireTag
is the 32 bit value with the upper 29 bits being the
FieldId
and the lower 3 bits being the WireType
Instances
FieldId
is the field number which can be in the range 1 to
2^29-1 but the value from 19000 to 19999 are forbidden (so sayeth
Google).
Instances
Bounded FieldId Source # | |
Enum FieldId Source # | |
Eq FieldId Source # | |
Data FieldId Source # | |
Defined in Text.ProtocolBuffers.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> FieldId -> c FieldId # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c FieldId # toConstr :: FieldId -> Constr # dataTypeOf :: FieldId -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c FieldId) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c FieldId) # gmapT :: (forall b. Data b => b -> b) -> FieldId -> FieldId # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> FieldId -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> FieldId -> r # gmapQ :: (forall d. Data d => d -> u) -> FieldId -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> FieldId -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> FieldId -> m FieldId # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldId -> m FieldId # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> FieldId -> m FieldId # | |
Num FieldId Source # | |
Ord FieldId Source # | |
Read FieldId Source # | |
Show FieldId Source # | |
Ix FieldId Source # | |
Defined in Text.ProtocolBuffers.Basic |
WireType
is the 3 bit wire encoding value, and is currently in
the range 0 to 5, leaving 6 and 7 currently invalid.
- 0 Varint : int32, int64, uint32, uint64, sint32, sint64, bool, enum
- 1 64-bit : fixed64, sfixed64, double
- 2 Length-delimited : string, bytes, embedded messages
- 3 Start group : groups (deprecated)
- 4 End group : groups (deprecated)
- 5 32-bit : fixed32, sfixed32, float
Instances
Bounded WireType Source # | |
Enum WireType Source # | |
Defined in Text.ProtocolBuffers.Basic | |
Eq WireType Source # | |
Data WireType Source # | |
Defined in Text.ProtocolBuffers.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WireType -> c WireType # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c WireType # toConstr :: WireType -> Constr # dataTypeOf :: WireType -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c WireType) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c WireType) # gmapT :: (forall b. Data b => b -> b) -> WireType -> WireType # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WireType -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WireType -> r # gmapQ :: (forall d. Data d => d -> u) -> WireType -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> WireType -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> WireType -> m WireType # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WireType -> m WireType # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WireType -> m WireType # | |
Num WireType Source # | |
Ord WireType Source # | |
Defined in Text.ProtocolBuffers.Basic | |
Read WireType Source # | |
Show WireType Source # | |
FieldType
is the integer associated with the
FieldDescriptorProto's Type. The allowed range is currently 1 to
18, as shown below (excerpt from descritor.proto)
// 0 is reserved for errors. // Order is weird for historical reasons. TYPE_DOUBLE = 1; TYPE_FLOAT = 2; TYPE_INT64 = 3; // Not ZigZag encoded. Negative numbers // take 10 bytes. Use TYPE_SINT64 if negative // values are likely. TYPE_UINT64 = 4; TYPE_INT32 = 5; // Not ZigZag encoded. Negative numbers // take 10 bytes. Use TYPE_SINT32 if negative // values are likely. TYPE_FIXED64 = 6; TYPE_FIXED32 = 7; TYPE_BOOL = 8; TYPE_STRING = 9; TYPE_GROUP = 10; // Tag-delimited aggregate. TYPE_MESSAGE = 11; // Length-delimited aggregate. // New in version 2. TYPE_BYTES = 12; TYPE_UINT32 = 13; TYPE_ENUM = 14; TYPE_SFIXED32 = 15; TYPE_SFIXED64 = 16; TYPE_SINT32 = 17; // Uses ZigZag encoding. TYPE_SINT64 = 18; // Uses ZigZag encoding.
Instances
EnumCode
is the Int32 assoicated with a
EnumValueDescriptorProto and is in the range 0 to 2^31-1.
Instances
Bounded EnumCode Source # | |
Eq EnumCode Source # | |
Data EnumCode Source # | |
Defined in Text.ProtocolBuffers.Basic gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> EnumCode -> c EnumCode # gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c EnumCode # toConstr :: EnumCode -> Constr # dataTypeOf :: EnumCode -> DataType # dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c EnumCode) # dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c EnumCode) # gmapT :: (forall b. Data b => b -> b) -> EnumCode -> EnumCode # gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> EnumCode -> r # gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> EnumCode -> r # gmapQ :: (forall d. Data d => d -> u) -> EnumCode -> [u] # gmapQi :: Int -> (forall d. Data d => d -> u) -> EnumCode -> u # gmapM :: Monad m => (forall d. Data d => d -> m d) -> EnumCode -> m EnumCode # gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumCode -> m EnumCode # gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> EnumCode -> m EnumCode # | |
Num EnumCode Source # | |
Ord EnumCode Source # | |
Defined in Text.ProtocolBuffers.Basic | |
Read EnumCode Source # | |
Show EnumCode Source # | |
type WireSize = Int64 Source #
WireSize
is the Int64 size type associated with the lazy
bytestrings used in the Put
and Get
monads.
Some of the type classes implemented messages and fields
class Default a => Mergeable a where Source #
The Mergeable
class is not a Monoid
, mergeEmpty
is not a
left or right unit like mempty
. The default mergeAppend
is to
take the second parameter and discard the first one. The
mergeConcat
defaults to foldl
associativity.
NOTE: mergeEmpty
has been removed in protocol buffers version 2.
Use defaultValue
instead. New strict fields would mean that required
fields in messages will be automatic errors with mergeEmpty
.
Nothing
mergeAppend :: a -> a -> a Source #
mergeAppend
is the right-biased merge of two values. A
message (or group) is merged recursively. Required field are
always taken from the second message. Optional field values are
taken from the most defined message or the second message if
both are set. Repeated fields have the sequences concatenated.
Note that strings and bytes are NOT concatenated.
mergeConcat :: Foldable t => t a -> a Source #
mergeConcat
is F.foldl mergeAppend defaultValue
and this
default definition is not overridden in any of the code except
for the (Seq a) instance.
Instances
class Default a where Source #
The Default class has the default-default values of types. See
http://code.google.com/apis/protocolbuffers/docs/proto.html#optional
and also note that Enum
types have a defaultValue
that is the
first one in the .proto
file (there is always at least one
value). Instances of this for messages hold any default value
defined in the .proto
file. defaultValue
is where the
MessageAPI
function getVal
looks when an optional field is not
set.
defaultValue :: a Source #
The defaultValue
is never undefined or an error to evalute.
This makes it much more useful compared to mergeEmpty
. In a
default message all Optional field values are set to Nothing
and Repeated field values are empty.
Instances
isValidUTF8 :: ByteString -> Maybe Int Source #
utf8 :: Utf8 -> ByteString Source #
uFromString :: String -> Utf8 Source #