| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Proto3.Wire.Encode.Repeated
Description
Presents right-associative folds as Foldable sequences.
Synopsis
- data Repeated (e :: TYPE er) = ReverseRepeated {
- countRepeated :: Maybe Int
- reverseRepeated :: FoldR e
- nullRepeated :: Repeated e -> Bool
- class ToRepeated (c :: TYPE cr) (e :: TYPE er) | c -> e where
- toRepeated :: c -> Repeated e
- mapRepeated :: ToRepeated c e => (e -> a) -> c -> Repeated a
Documentation
data Repeated (e :: TYPE er) Source #
Expresses a sequence of values in reverse order for encoding as a repeated field.
Constructors
| ReverseRepeated | |
Fields
| |
Instances
nullRepeated :: Repeated e -> Bool Source #
class ToRepeated (c :: TYPE cr) (e :: TYPE er) | c -> e where Source #
For each container type, specifies the optimal method for reverse iteration.
Instances
| ToRepeated IntSet Int Source # | |
Defined in Proto3.Wire.Encode.Repeated | |
| ToRepeated (Identity a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Identity a -> Repeated a Source # | |
| ToRepeated (NonEmpty a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: NonEmpty a -> Repeated a Source # | |
| ToRepeated (Seq a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Seq a -> Repeated a Source # | |
| ToRepeated (Set a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Set a -> Repeated a Source # | |
| ToRepeated (Vector a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Vector a -> Repeated a Source # | |
| Storable a => ToRepeated (Vector a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Vector a -> Repeated a Source # | |
| Unbox a => ToRepeated (Vector a :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Vector a -> Repeated a Source # | |
| ToRepeated ([a] :: Type) (a :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: [a] -> Repeated a Source # | |
| ToRepeated (IntMap a :: Type) ((Int, a) :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated | |
| ToRepeated (Repeated e :: Type) (e :: TYPE er) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Repeated e -> Repeated e Source # | |
| ToRepeated (Map k a :: Type) ((k, a) :: Type) Source # | |
Defined in Proto3.Wire.Encode.Repeated Methods toRepeated :: Map k a -> Repeated (k, a) Source # | |
mapRepeated :: ToRepeated c e => (e -> a) -> c -> Repeated a Source #
A convenience function that maps a function over a sequence, provided that the relevant types are all lifted.