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