summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTvH <>2019-12-02 19:52:00 (GMT)
committerhdiff <hdiff@hdiff.luite.com>2019-12-02 19:52:00 (GMT)
commit1126073fa3a8719857b9433d1852ebedb9f86386 (patch)
tree417f62192628212a8d92ab500fd6868e36e6ac7a
parentc5a9e0f98fc08ccb2b5703361700cd8190696072 (diff)
version 2.4.13HEAD2.4.13master
-rw-r--r--Changes76
-rw-r--r--Text/ProtocolBuffers/Basic.hs4
-rw-r--r--Text/ProtocolBuffers/Get.hs6
-rw-r--r--Text/ProtocolBuffers/WireMessage.hs2
-rw-r--r--protocol-buffers.cabal3
5 files changed, 89 insertions, 2 deletions
diff --git a/Changes b/Changes
new file mode 100644
index 0000000..6361385
--- /dev/null
+++ b/Changes
@@ -0,0 +1,76 @@
+Newest at the top.
+
+2.4.13
+
+- Fix build for GHC-8.8
+
+2.4.12
+
+- New option to derive ToJSON/FromJSON
+- Fix build for GHC-8.6
+- Drop support for GHC-7.10
+- New testsuite
+
+2.4.11
+
+- pr #66. Attach deriving Typeable to data declaration in hs-boot files
+- pr #65. Fix time complexity of serialization
+
+2.4.10
+
+- pr #59. Add Semigroup instance
+
+2.4.9
+
+- pr #48. Make parser float support natural or float data format
+
+2.4.8
+
+- pr #58. Fix build for HSE-1.20
+
+2.4.7
+
+- pr #57. Add GHC 8.4 support (add Semigroup instances)
+
+2.4.6
+
+- issue #55. Constraint haskell-src-exts to be < 1.20
+
+2.4.5
+
+- pr #54. Support haskell-src-exts 1.18
+
+2.4.4
+
+- pr #53. Allow decimal places at the end of line
+
+2.4.3
+
+- pr #50. restrict haskell-src-exts version constraint
+
+2.4.2
+
+- fix version constraints
+
+2.4.1
+
+- issue #10, pr #47. Fixed not to lookup a entity defined in the parent package
+
+2.3.1:
+
+- add Generic deriving
+
+2016-03-22 2.3.0:
+
+- Dump to text as decimal instead of octal (PR #34)
+- Oneof lenses
+
+2008-09: 0.3.1:
+
+- Change Parser.hs to allow negative enum values to match actual behavior of protoc.
+- Use runST & castSTUArray for both Float and Double conversion to Word32 and Word64.
+- Adding UnknownField support controlled by "-u" flag to hprotoc.
+- Fix messageGet to use the new 'isReallyEmpty' and Parial Results get Nothing, to work better.
+- Fix default instances of Descriptor messages to be Nothing instead of Just defaultValue.
+
+2008-09 : version 0.2.9 released. This is the first working release.
diff --git a/Text/ProtocolBuffers/Basic.hs b/Text/ProtocolBuffers/Basic.hs
index 3a405e5..76737cc 100644
--- a/Text/ProtocolBuffers/Basic.hs
+++ b/Text/ProtocolBuffers/Basic.hs
@@ -22,6 +22,7 @@ import Data.Int(Int32,Int64)
import Data.Ix(Ix)
import Data.Semigroup (Semigroup(..))
import Data.Sequence(Seq,(><))
+import Data.String (IsString(..))
import Data.Typeable(Typeable)
import Data.Word(Word8,Word32,Word64)
@@ -52,6 +53,9 @@ instance Show Utf8 where
s = showsPrec
in s d (U.toString bs)
+instance IsString Utf8 where
+ fromString = uFromString
+
instance Semigroup Utf8 where
(<>) (Utf8 x) (Utf8 y) = Utf8 (x <> y)
diff --git a/Text/ProtocolBuffers/Get.hs b/Text/ProtocolBuffers/Get.hs
index c9e878c..e8b64f5 100644
--- a/Text/ProtocolBuffers/Get.hs
+++ b/Text/ProtocolBuffers/Get.hs
@@ -75,6 +75,7 @@ import Control.Monad.Error.Class(MonadError(throwError,catchError),Error(strMsg)
--import qualified Data.ByteString as S(unpack) -- XXX testing
--import qualified Data.ByteString.Lazy as L(pack) -- XXX testing
import Control.Monad(ap) -- instead of Functor.fmap; ap for Applicative
+import qualified Control.Monad.Fail as Fail
import Data.Bits(Bits((.|.),(.&.)),shiftL)
import qualified Data.ByteString as S(concat,length,null,splitAt,findIndex)
import qualified Data.ByteString.Internal as S(ByteString(..),toForeignPtr,inlinePerformIO)
@@ -784,6 +785,11 @@ instance Monad Get where
{-# INLINE return #-}
m >>= k = Get (\sc -> unGet m (\ a -> seq a $ unGet (k a) sc))
{-# INLINE (>>=) #-}
+#if !MIN_VERSION_base(4,11,0)
+ fail = Fail.fail
+#endif
+
+instance Fail.MonadFail Get where
fail = throwError . strMsg
instance MonadError String Get where
diff --git a/Text/ProtocolBuffers/WireMessage.hs b/Text/ProtocolBuffers/WireMessage.hs
index 0f060fa..635e816 100644
--- a/Text/ProtocolBuffers/WireMessage.hs
+++ b/Text/ProtocolBuffers/WireMessage.hs
@@ -469,7 +469,7 @@ wireSizeErr :: Typeable a => FieldType -> a -> WireSize
wireSizeErr ft x = error $ concat [ "Impossible? wireSize field type mismatch error: Field type number ", show ft
, " does not match internal type ", show (typeOf x) ]
wirePutErr :: Typeable a => FieldType -> a -> PutM b
-wirePutErr ft x = fail $ concat [ "Impossible? wirePut field type mismatch error: Field type number ", show ft
+wirePutErr ft x = error $ concat [ "Impossible? wirePut field type mismatch error: Field type number ", show ft
, " does not match internal type ", show (typeOf x) ]
wireGetErr :: Typeable a => FieldType -> Get a
wireGetErr ft = answer where
diff --git a/protocol-buffers.cabal b/protocol-buffers.cabal
index 0ff6763..7329e16 100644
--- a/protocol-buffers.cabal
+++ b/protocol-buffers.cabal
@@ -1,5 +1,5 @@
name: protocol-buffers
-version: 2.4.12
+version: 2.4.13
cabal-version: >= 1.6
build-type: Simple
license: BSD3
@@ -14,6 +14,7 @@ description: Parse proto files and generate Haskell code.
category: Text
extra-source-files: TODO
README.md
+ Changes
Tested-With: GHC == 8.0.2, GHC == 8.2.1, GHC == 8.4.2, GHC == 8.6.2
source-repository head
type: git