Permalink
Browse files

Rebuild with hprotoc and protocol-buffers 2.0.5

  • Loading branch information...
bos committed Jul 6, 2011
1 parent d065915 commit 2601f7ad45fb7c77689e5a338393957582432437
Showing with 283 additions and 435 deletions.
  1. +6 −9 protobuf/proto.sh
  2. +3 −3 protobuf/riak-protobuf.cabal
  3. +10 −8 protobuf/src/Network/Riak/Protocol.hs
  4. +10 −16 protobuf/src/Network/Riak/Protocol/BucketProps.hs
  5. +20 −27 protobuf/src/Network/Riak/Protocol/Content.hs
  6. +11 −17 protobuf/src/Network/Riak/Protocol/DeleteRequest.hs
  7. +10 −16 protobuf/src/Network/Riak/Protocol/ErrorResponse.hs
  8. +9 −15 protobuf/src/Network/Riak/Protocol/GetBucketRequest.hs
  9. +9 −15 protobuf/src/Network/Riak/Protocol/GetBucketResponse.hs
  10. +9 −15 protobuf/src/Network/Riak/Protocol/GetClientIDRequest.hs
  11. +9 −15 protobuf/src/Network/Riak/Protocol/GetClientIDResponse.hs
  12. +11 −17 protobuf/src/Network/Riak/Protocol/GetRequest.hs
  13. +10 −16 protobuf/src/Network/Riak/Protocol/GetResponse.hs
  14. +9 −15 protobuf/src/Network/Riak/Protocol/GetServerInfoRequest.hs
  15. +11 −17 protobuf/src/Network/Riak/Protocol/Link.hs
  16. +9 −15 protobuf/src/Network/Riak/Protocol/ListBucketsRequest.hs
  17. +9 −15 protobuf/src/Network/Riak/Protocol/ListBucketsResponse.hs
  18. +9 −15 protobuf/src/Network/Riak/Protocol/ListKeysRequest.hs
  19. +10 −16 protobuf/src/Network/Riak/Protocol/ListKeysResponse.hs
  20. +11 −17 protobuf/src/Network/Riak/Protocol/MapReduce.hs
  21. +10 −16 protobuf/src/Network/Riak/Protocol/MapReduceRequest.hs
  22. +10 −16 protobuf/src/Network/Riak/Protocol/Pair.hs
  23. +9 −15 protobuf/src/Network/Riak/Protocol/PingRequest.hs
  24. +17 −23 protobuf/src/Network/Riak/Protocol/PutRequest.hs
  25. +10 −16 protobuf/src/Network/Riak/Protocol/PutResponse.hs
  26. +10 −16 protobuf/src/Network/Riak/Protocol/ServerInfo.hs
  27. +10 −16 protobuf/src/Network/Riak/Protocol/SetBucketRequest.hs
  28. +9 −15 protobuf/src/Network/Riak/Protocol/SetClientIDRequest.hs
  29. +3 −3 riak.cabal
View
@@ -7,7 +7,7 @@ if [[ -z "$root" ]]; then
exit 1
fi
-cd "$root"
+cd "$root/protobuf"
hprotoc="$(which hprotoc)"
@@ -23,18 +23,15 @@ sed -e 's/Rpb//g' -e 's/Req\>/Request/g' -e 's/Resp\>/Response/g' \
-e 's/MapRedR/MapReduceR/g' -e 's/DelR/DeleteR/' -e 's/ClientId/ClientID/' \
-e 's/GetServerInfoResponse/ServerInfo/g' \
-e 's/MapReduceResponse/MapReduce/g' \
- protobuf/riakclient.proto protobuf/riakextra.proto > protobuf/Protocol.proto
+ src/riakclient.proto src/riakextra.proto > src/Protocol.proto
-(cd protobuf && hprotoc -p Network.Riak Protocol.proto)
-for i in $(find protobuf/Network/Riak/Protocol -name '*.hs';
- echo protobuf/Network/Riak/Protocol.hs); do
+(cd src && hprotoc -p Network.Riak Protocol.proto)
+for i in $(find src/Network/Riak/Protocol -name '*.hs';
+ echo src/Network/Riak/Protocol.hs); do
cp /dev/null $i.$$
- echo '{-# LANGUAGE DeriveDataTypeable #-}' >> $i.$$
- echo '{-# LANGUAGE FlexibleInstances #-}' >> $i.$$
- echo '{-# LANGUAGE MultiParamTypeClasses #-}' >> $i.$$
echo '{-# OPTIONS_GHC -fno-warn-unused-imports #-}' >> $i.$$
cat $i >> $i.$$
mv $i.$$ $i
done
-rm protobuf/Protocol.proto
+rm src/Protocol.proto
@@ -1,5 +1,5 @@
name: riak-protobuf
-version: 0.14.0.0
+version: 0.15.0.0
synopsis: Haskell types for the Riak protocol buffer API
description:
A set of Haskell types for interacting with the protocol buffer
@@ -58,8 +58,8 @@ library
build-depends:
base == 4.*,
parsec >= 3,
- protocol-buffers >= 1.8.0,
- protocol-buffers-descriptor >= 1.8.1
+ protocol-buffers >= 2.0.5,
+ protocol-buffers-descriptor >= 2.0.5
ghc-options: -Wall -fno-warn-orphans

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -1,21 +1,15 @@
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
-{-# OPTIONS_GHC -fno-warn-unused-imports #-}
-{-# LANGUAGE DeriveDataTypeable #-}
-{-# LANGUAGE FlexibleInstances #-}
-{-# LANGUAGE MultiParamTypeClasses #-}
{-# OPTIONS_GHC -fno-warn-unused-imports #-}
+{-# LANGUAGE BangPatterns, DeriveDataTypeable, FlexibleInstances, MultiParamTypeClasses #-}
module Network.Riak.Protocol.BucketProps (BucketProps(..)) where
-import Prelude ((+))
-import qualified Prelude as P'
+import Prelude ((+), (/))
+import qualified Prelude as Prelude'
+import qualified Data.Typeable as Prelude'
import qualified Text.ProtocolBuffers.Header as P'
-data BucketProps = BucketProps{n_val :: P'.Maybe P'.Word32, allow_mult :: P'.Maybe P'.Bool}
- deriving (P'.Show, P'.Eq, P'.Ord, P'.Typeable)
+data BucketProps = BucketProps{n_val :: !(P'.Maybe P'.Word32), allow_mult :: !(P'.Maybe P'.Bool)}
+ deriving (Prelude'.Show, Prelude'.Eq, Prelude'.Ord, Prelude'.Typeable)
instance P'.Mergeable BucketProps where
- mergeEmpty = BucketProps P'.mergeEmpty P'.mergeEmpty
mergeAppend (BucketProps x'1 x'2) (BucketProps y'1 y'2) = BucketProps (P'.mergeAppend x'1 y'1) (P'.mergeAppend x'2 y'2)
instance P'.Default BucketProps where
@@ -49,8 +43,8 @@ instance P'.Wire BucketProps where
where
update'Self wire'Tag old'Self
= case wire'Tag of
- 8 -> P'.fmap (\ new'Field -> old'Self{n_val = P'.Just new'Field}) (P'.wireGet 13)
- 16 -> P'.fmap (\ new'Field -> old'Self{allow_mult = P'.Just new'Field}) (P'.wireGet 8)
+ 8 -> Prelude'.fmap (\ !new'Field -> old'Self{n_val = Prelude'.Just new'Field}) (P'.wireGet 13)
+ 16 -> Prelude'.fmap (\ !new'Field -> old'Self{allow_mult = Prelude'.Just new'Field}) (P'.wireGet 8)
_ -> let (field'Number, wire'Type) = P'.splitWireTag wire'Tag in P'.unknown field'Number wire'Type old'Self
instance P'.MessageAPI msg' (msg' -> BucketProps) BucketProps where
@@ -61,5 +55,5 @@ instance P'.GPB BucketProps
instance P'.ReflectDescriptor BucketProps where
getMessageInfo _ = P'.GetMessageInfo (P'.fromDistinctAscList []) (P'.fromDistinctAscList [8, 16])
reflectDescriptorInfo _
- = P'.read
- "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Protocol.BucketProps\", haskellPrefix = [MName \"Network\",MName \"Riak\"], parentModule = [MName \"Protocol\"], baseName = MName \"BucketProps\"}, descFilePath = [\"Network\",\"Riak\",\"Protocol\",\"BucketProps.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Protocol.BucketProps.n_val\", haskellPrefix' = [MName \"Network\",MName \"Riak\"], parentModule' = [MName \"Protocol\",MName \"BucketProps\"], baseName' = FName \"n_val\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Protocol.BucketProps.allow_mult\", haskellPrefix' = [MName \"Network\",MName \"Riak\"], parentModule' = [MName \"Protocol\",MName \"BucketProps\"], baseName' = FName \"allow_mult\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False}"
+ = Prelude'.read
+ "DescriptorInfo {descName = ProtoName {protobufName = FIName \".Protocol.BucketProps\", haskellPrefix = [MName \"Network\",MName \"Riak\"], parentModule = [MName \"Protocol\"], baseName = MName \"BucketProps\"}, descFilePath = [\"Network\",\"Riak\",\"Protocol\",\"BucketProps.hs\"], isGroup = False, fields = fromList [FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Protocol.BucketProps.n_val\", haskellPrefix' = [MName \"Network\",MName \"Riak\"], parentModule' = [MName \"Protocol\",MName \"BucketProps\"], baseName' = FName \"n_val\"}, fieldNumber = FieldId {getFieldId = 1}, wireTag = WireTag {getWireTag = 8}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 13}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing},FieldInfo {fieldName = ProtoFName {protobufName' = FIName \".Protocol.BucketProps.allow_mult\", haskellPrefix' = [MName \"Network\",MName \"Riak\"], parentModule' = [MName \"Protocol\",MName \"BucketProps\"], baseName' = FName \"allow_mult\"}, fieldNumber = FieldId {getFieldId = 2}, wireTag = WireTag {getWireTag = 16}, packedTag = Nothing, wireTagLength = 1, isPacked = False, isRequired = False, canRepeat = False, mightPack = False, typeCode = FieldType {getFieldType = 8}, typeName = Nothing, hsRawDefault = Nothing, hsDefault = Nothing}], keys = fromList [], extRanges = [], knownKeys = fromList [], storeUnknown = False, lazyFields = False}"
Oops, something went wrong.

0 comments on commit 2601f7a

Please sign in to comment.