[Git][haskell-team/DHG_packages][master] 2 commits: haskell-protobuf: fixes builf failures with new ghc, from Steve Langasek and upstream
Gianfranco Costamagna
gitlab at salsa.debian.org
Fri May 25 10:45:09 BST 2018
Gianfranco Costamagna pushed to branch master at Debian Haskell Group / DHG_packages
Commits:
d27f1e78 by Gianfranco Costamagna at 2018-05-25T11:43:01+02:00
haskell-protobuf: fixes builf failures with new ghc, from Steve Langasek and upstream
- - - - -
464ffe5c by Gianfranco Costamagna at 2018-05-25T11:44:52+02:00
haskell-protobuf: upload to unstable
- - - - -
4 changed files:
- p/haskell-protobuf/debian/changelog
- + p/haskell-protobuf/debian/patches/0001-Fix-compilation-on-GHC-8.0.patch
- + p/haskell-protobuf/debian/patches/0002-Fix-tests-compilation.patch
- + p/haskell-protobuf/debian/patches/series
Changes:
=====================================
p/haskell-protobuf/debian/changelog
=====================================
--- a/p/haskell-protobuf/debian/changelog
+++ b/p/haskell-protobuf/debian/changelog
@@ -1,7 +1,16 @@
-haskell-protobuf (0.2.1.1-4) UNRELEASED; urgency=medium
+haskell-protobuf (0.2.1.1-4) unstable; urgency=medium
+ [ Clint Adams ]
* Set Rules-Requires-Root to no.
+ [ Steve Langasek ]
+ * d/p/0001-Fix-compilation-on-GHC-8.0.patch,
+ d/p/0002-Fix-tests-compilation.patch: cherry-pick from upstream to fix
+ compilation with ghc 8.2. Closes: #895612.
+
+ [ Gianfranco Costamagna ]
+ * Upload to unstable
+
-- Clint Adams <clint at debian.org> Sun, 06 May 2018 22:10:23 -0400
haskell-protobuf (0.2.1.1-3) unstable; urgency=medium
=====================================
p/haskell-protobuf/debian/patches/0001-Fix-compilation-on-GHC-8.0.patch
=====================================
--- /dev/null
+++ b/p/haskell-protobuf/debian/patches/0001-Fix-compilation-on-GHC-8.0.patch
@@ -0,0 +1,154 @@
+From 0689cb6f0e5e980cb85e89eac53fa4fdb968b9ee Mon Sep 17 00:00:00 2001
+From: YoEight <yo.eight at gmail.com>
+Date: Wed, 16 May 2018 17:05:11 +0200
+Subject: [PATCH 1/3] Fix compilation on GHC >= 8.0
+
+---
+ protobuf.cabal | 3 +++
+ src/Data/Binary/Builder/Sized.hs | 6 +++++-
+ src/Data/ProtocolBuffers/Message.hs | 8 ++++++--
+ src/Data/ProtocolBuffers/Types.hs | 28 ++++++++++++++++------------
+ 4 files changed, 30 insertions(+), 15 deletions(-)
+
+Index: haskell-protobuf-0.2.1.1/protobuf.cabal
+===================================================================
+--- haskell-protobuf-0.2.1.1.orig/protobuf.cabal
++++ haskell-protobuf-0.2.1.1/protobuf.cabal
+@@ -58,6 +58,9 @@
+ ghc-options:
+ -Wall
+
++ if impl(ghc < 8.0)
++ build-depends: semigroups == 0.18.*
++
+ -- executable protoc-gen-hs
+ -- default-language:
+ -- Haskell2010
+Index: haskell-protobuf-0.2.1.1/src/Data/ProtocolBuffers/Message.hs
+===================================================================
+--- haskell-protobuf-0.2.1.1.orig/src/Data/ProtocolBuffers/Message.hs
++++ haskell-protobuf-0.2.1.1/src/Data/ProtocolBuffers/Message.hs
+@@ -17,10 +17,11 @@
+ import Control.Applicative
+ import Control.DeepSeq (NFData(..))
+ import Data.Foldable
+-import Data.Monoid
++import Data.Monoid hiding ((<>))
+ import Data.Serialize.Get
+ import Data.Serialize.Put
+ import Data.Traversable
++import Data.Semigroup (Semigroup(..))
+
+ import GHC.Generics
+ import GHC.TypeLits
+@@ -96,9 +97,12 @@
+ newtype Message m = Message {runMessage :: m}
+ deriving (Eq, Foldable, Functor, Ord, Show, Traversable)
+
++instance (Generic m, GMessageMonoid (Rep m)) => Semigroup (Message m) where
++ Message x <> Message y = Message . to $ gmappend (from x) (from y)
++
+ instance (Generic m, GMessageMonoid (Rep m)) => Monoid (Message m) where
+ mempty = Message . to $ gmempty
+- Message x `mappend` Message y = Message . to $ gmappend (from x) (from y)
++ mappend = (<>)
+
+ instance (Decode a, Monoid (Message a), KnownNat n) => GDecode (K1 i (Field n (RequiredField (Always (Message a))))) where
+ gdecode = fieldDecode (Required . Always)
+Index: haskell-protobuf-0.2.1.1/src/Data/ProtocolBuffers/Types.hs
+===================================================================
+--- haskell-protobuf-0.2.1.1.orig/src/Data/ProtocolBuffers/Types.hs
++++ haskell-protobuf-0.2.1.1/src/Data/ProtocolBuffers/Types.hs
+@@ -29,7 +29,8 @@
+ import Control.DeepSeq (NFData)
+ import Data.Bits
+ import Data.Foldable as Fold
+-import Data.Monoid
++import Data.Monoid hiding ((<>))
++import Data.Semigroup (Semigroup(..))
+ import Data.Traversable
+ import Data.Typeable
+
+@@ -38,25 +39,25 @@
+ -- |
+ -- 'Value' selects the normal/typical way for encoding scalar (primitive) values.
+ newtype Value a = Value {runValue :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Monoid, Ord, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Semigroup, Monoid, Ord, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- 'RequiredField' is a newtype wrapped used to break overlapping instances
+ -- for encoding and decoding values
+ newtype RequiredField a = Required {runRequired :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Monoid, Ord, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Semigroup, Monoid, Ord, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- 'OptionalField' is a newtype wrapped used to break overlapping instances
+ -- for encoding and decoding values
+ newtype OptionalField a = Optional {runOptional :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Monoid, Ord, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Semigroup, Monoid, Ord, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- 'RepeatedField' is a newtype wrapped used to break overlapping instances
+ -- for encoding and decoding values
+ newtype RepeatedField a = Repeated {runRepeated :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Monoid, Ord, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Semigroup, Monoid, Ord, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- Fields are merely a way to hold a field tag along with its type, this shouldn't normally be referenced directly.
+@@ -64,7 +65,7 @@
+ -- This provides better error messages than older versions which used 'Data.Tagged.Tagged'
+ --
+ newtype Field (n :: Nat) a = Field {runField :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Monoid, Ord, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Semigroup, Monoid, Ord, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- To provide consistent instances for serialization a 'Traversable' 'Functor' is needed to
+@@ -74,9 +75,12 @@
+ newtype Always a = Always {runAlways :: a}
+ deriving (Bounded, Eq, Enum, Foldable, Functor, Ord, NFData, Show, Traversable, Typeable)
+
++instance Semigroup (Always a) where
++ _ <> y = y
++
+ instance Monoid (Always a) where
+ mempty = error "Always is not a Monoid"
+- mappend _ y = y
++ mappend = (<>)
+
+ -- |
+ -- Functions for wrapping and unwrapping record fields.
+@@ -175,24 +179,24 @@
+ -- |
+ -- 'Enumeration' fields use 'Prelude.fromEnum' and 'Prelude.toEnum' when encoding and decoding messages.
+ newtype Enumeration a = Enumeration {runEnumeration :: a}
+- deriving (Bounded, Eq, Enum, Foldable, Functor, Ord, Monoid, NFData, Show, Traversable, Typeable)
++ deriving (Bounded, Eq, Enum, Foldable, Functor, Ord, Semigroup, Monoid, NFData, Show, Traversable, Typeable)
+
+ -- |
+ -- A 'Traversable' 'Functor' used to select packed sequence encoding/decoding.
+ newtype PackedField a = PackedField {runPackedField :: a}
+- deriving (Eq, Foldable, Functor, Monoid, NFData, Ord, Show, Traversable, Typeable)
++ deriving (Eq, Foldable, Functor, Semigroup, Monoid, NFData, Ord, Show, Traversable, Typeable)
+
+ -- |
+ -- A list that is stored in a packed format.
+ newtype PackedList a = PackedList {unPackedList :: [a]}
+- deriving (Eq, Foldable, Functor, Monoid, NFData, Ord, Show, Traversable, Typeable)
++ deriving (Eq, Foldable, Functor, Semigroup, Monoid, NFData, Ord, Show, Traversable, Typeable)
+
+ -- |
+ -- Signed integers are stored in a zz-encoded form.
+ newtype Signed a = Signed a
+- deriving (Bits, Bounded, Enum, Eq, Floating, Foldable, Fractional, Functor, Integral, Monoid, NFData, Num, Ord, Real, RealFloat, RealFrac, Show, Traversable, Typeable)
++ deriving (Bits, Bounded, Enum, Eq, Floating, Foldable, Fractional, Functor, Integral, Semigroup, Monoid, NFData, Num, Ord, Real, RealFloat, RealFrac, Show, Traversable, Typeable)
+
+ -- |
+ -- Fixed integers are stored in little-endian form without additional encoding.
+ newtype Fixed a = Fixed a
+- deriving (Bits, Bounded, Enum, Eq, Floating, Foldable, Fractional, Functor, Integral, Monoid, NFData, Num, Ord, Real, RealFloat, RealFrac, Show, Traversable, Typeable)
++ deriving (Bits, Bounded, Enum, Eq, Floating, Foldable, Fractional, Functor, Integral, Semigroup, Monoid, NFData, Num, Ord, Real, RealFloat, RealFrac, Show, Traversable, Typeable)
=====================================
p/haskell-protobuf/debian/patches/0002-Fix-tests-compilation.patch
=====================================
--- /dev/null
+++ b/p/haskell-protobuf/debian/patches/0002-Fix-tests-compilation.patch
@@ -0,0 +1,25 @@
+From 904fbe1f964436dc525cb0ac2d85587977534cea Mon Sep 17 00:00:00 2001
+From: YoEight <yo.eight at gmail.com>
+Date: Wed, 16 May 2018 17:05:37 +0200
+Subject: [PATCH 2/3] Fix tests compilation
+
+---
+ tests/Main.hs | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tests/Main.hs b/tests/Main.hs
+index a6b1b01..569a90f 100644
+--- a/tests/Main.hs
++++ b/tests/Main.hs
+@@ -13,7 +13,7 @@
+ {-# OPTIONS_GHC -fno-warn-orphans #-}
+
+ import Test.QuickCheck
+-import Test.QuickCheck.Property
++import Test.QuickCheck.Property hiding (testCase)
+ import Test.Tasty
+ import Test.Tasty.HUnit
+ import Test.Tasty.QuickCheck
+--
+2.17.0
+
=====================================
p/haskell-protobuf/debian/patches/series
=====================================
--- /dev/null
+++ b/p/haskell-protobuf/debian/patches/series
@@ -0,0 +1,2 @@
+0001-Fix-compilation-on-GHC-8.0.patch
+0002-Fix-tests-compilation.patch
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/c97c5ec0bddaf377177fea398bec2badf7737049...464ffe5c669b8bde886a073b9f5cef381ce02e90
--
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/compare/c97c5ec0bddaf377177fea398bec2badf7737049...464ffe5c669b8bde886a073b9f5cef381ce02e90
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20180525/66c0152d/attachment-0001.html>
More information about the Pkg-haskell-commits
mailing list