-- | This provides instance of 'Mergeable' for the basic field types.moduleText.ProtocolBuffers.Mergeable()whereimportText.ProtocolBuffers.Basic-- import Data.Monoid(mempty,mappend)importData.Sequence(empty,(><))-- Base types are not very mergeable, but their Maybe and Seq versions are:instanceMergeablea=>Mergeable(Maybea)wheremergeEmpty=NothingmergeAppend=mayMergeinstanceMergeable(Seqa)wheremergeEmpty=emptymergeAppend=(><)-- These all have errors as mergeEmpty and use the second paramater for mergeAppendinstanceMergeableBoolinstanceMergeableUtf8instanceMergeableByteStringinstanceMergeableDoubleinstanceMergeableFloatinstanceMergeableInt32instanceMergeableInt64instanceMergeableWord32instanceMergeableWord64{-# INLINE mayMerge #-}mayMerge::(Mergeableb)=>Maybeb->Maybeb->MaybebmayMergeNothingy=ymayMergexNothing=xmayMerge(Justx)(Justy)=Just(mergeAppendxy)