protobuf-simple-0.1.0.0: test/Types/DoubleListPacked.hs
-- Generated by protobuf-simple. DO NOT EDIT!
module Types.DoubleListPacked where
import Control.Applicative ((<$>))
import Prelude ()
import qualified Data.ProtoBufInt as PB
newtype DoubleListPacked = DoubleListPacked
{ value :: PB.Seq PB.Double
} deriving (PB.Show, PB.Eq, PB.Ord)
instance PB.Default DoubleListPacked where
defaultVal = DoubleListPacked
{ value = PB.defaultVal
}
instance PB.Mergeable DoubleListPacked where
merge a b = DoubleListPacked
{ value = PB.merge (value a) (value b)
}
instance PB.Required DoubleListPacked where
reqTags _ = PB.fromList []
instance PB.WireMessage DoubleListPacked where
fieldToValue (PB.WireTag 1 PB.LenDelim) self = (\v -> self{value = PB.merge (value self) v}) <$> PB.getDoublePacked
fieldToValue (PB.WireTag 1 PB.Bit64) self = (\v -> self{value = PB.append (value self) v}) <$> PB.getDouble
fieldToValue tag self = PB.getUnknown tag self
messageToFields self = do
PB.putDoublePacked (PB.WireTag 1 PB.LenDelim) (value self)