packages feed

protobuf 0.2.1.2 → 0.2.1.3

raw patch · 2 files changed

+12/−4 lines, 2 filesnew-uploaderPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

protobuf.cabal view
@@ -1,5 +1,5 @@ name:                protobuf-version:             0.2.1.2+version:             0.2.1.3 synopsis:            Google Protocol Buffers via GHC.Generics description:   Google Protocol Buffers via GHC.Generics.
src/Data/ProtocolBuffers/Wire.hs view
@@ -1,4 +1,5 @@ {-# LANGUAGE BangPatterns #-}+{-# LANGUAGE CPP #-} {-# LANGUAGE DeriveDataTypeable #-} {-# LANGUAGE FlexibleContexts #-} {-# LANGUAGE FlexibleInstances #-}@@ -89,8 +90,8 @@ putWireTag :: Tag -> Word32 -> Put putWireTag tag typ   | tag <= 0x1FFFFFFF, typ <= 7 = putVarUInt $ tag `shiftL` 3 .|. (typ .&. 7)-  | tag  > 0x1FFFFFFF = fail $ "Wire tag out of range: "  ++ show tag-  | otherwise         = fail $ "Wire type out of range: " ++ show typ+  | tag  > 0x1FFFFFFF = legacyFail $ "Wire tag out of range: "  ++ show tag+  | otherwise         = legacyFail $ "Wire type out of range: " ++ show typ  getVarInt :: (Integral a, Bits a) => Get a getVarInt = go 0 0 where@@ -151,7 +152,7 @@ instance EncodeWire WireField where   encodeWire t f     | t == wireFieldTag f = putWireField f-    | otherwise           = fail "Specified tag and field tag do not match"+    | otherwise           = legacyFail "Specified tag and field tag do not match"  instance DecodeWire WireField where   decodeWire = pure@@ -460,3 +461,10 @@ zzDecode32 w = fromIntegral (w `shiftR` 1) `xor` negate (fromIntegral (w .&. 1)) zzDecode64 :: Word64 -> Int64 zzDecode64 w = fromIntegral (w `shiftR` 1) `xor` negate (fromIntegral (w .&. 1))++legacyFail :: Monad m => String -> m a+#if __GLASGOW_HASKELL__ <= 710+legacyFail = fail+#else+legacyFail = errorWithoutStackTrace+#endif