Date: Friday, May 18, 2018 @ 07:43:29 Author: felixonmars Revision: 324257
upgpkg: haskell-tamarin-prover-utils 1.4.0-2 rebuild with ghc 8.4.2 Added: haskell-tamarin-prover-utils/trunk/ghc-8.4.patch Modified: haskell-tamarin-prover-utils/trunk/PKGBUILD ---------------+ PKGBUILD | 15 +++++-- ghc-8.4.patch | 110 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 121 insertions(+), 4 deletions(-) Modified: PKGBUILD =================================================================== --- PKGBUILD 2018-05-18 07:27:52 UTC (rev 324256) +++ PKGBUILD 2018-05-18 07:43:29 UTC (rev 324257) @@ -5,17 +5,24 @@ _hkgname=tamarin-prover-utils pkgname=haskell-tamarin-prover-utils pkgver=1.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="Utility library for the tamarin prover" url="http://www.infsec.ethz.ch/research/software/tamarin" license=("GPL") arch=('x86_64') depends=('ghc-libs' 'haskell-sha' 'haskell-base64-bytestring' 'haskell-blaze-builder' - 'haskell-dlist' 'haskell-fclabels' 'haskell-mtl' 'haskell-safe' 'haskell-syb') + 'haskell-dlist' 'haskell-fclabels' 'haskell-safe' 'haskell-syb') makedepends=('ghc') -source=("tamarin-prover-$pkgver.tar.gz::https://github.com/tamarin-prover/tamarin-prover/archive/$pkgver.tar.gz") -sha512sums=('7c1afe6a53b596c2ce01e9ad7a7f464af1f4efbc5f8edc13d5ec8bc32ce4e91ddde91dff6ab8e01cf3cf30a37a3a18953d937debc36c9df664f718d968e2ae74') +source=("tamarin-prover-$pkgver.tar.gz::https://github.com/tamarin-prover/tamarin-prover/archive/$pkgver.tar.gz" + ghc-8.4.patch) +sha512sums=('7c1afe6a53b596c2ce01e9ad7a7f464af1f4efbc5f8edc13d5ec8bc32ce4e91ddde91dff6ab8e01cf3cf30a37a3a18953d937debc36c9df664f718d968e2ae74' + '14a34dccb77582977f1df0ea74049a22f136161c7afc9c213cb90436b9b2c3ef4ab8f0049417ea4ab3b5c861eab140fe6255c59d5b29a706a330117676cc6047') +prepare() { + cd tamarin-prover-$pkgver + patch -p1 -i ../ghc-8.4.patch +} + build() { cd "${srcdir}/tamarin-prover-${pkgver}/lib/utils" Added: ghc-8.4.patch =================================================================== --- ghc-8.4.patch (rev 0) +++ ghc-8.4.patch 2018-05-18 07:43:29 UTC (rev 324257) @@ -0,0 +1,110 @@ +diff --git a/lib/utils/src/Extension/Data/Bounded.hs b/lib/utils/src/Extension/Data/Bounded.hs +index 5f166006..6ca7970d 100644 +--- a/lib/utils/src/Extension/Data/Bounded.hs ++++ b/lib/utils/src/Extension/Data/Bounded.hs +@@ -16,14 +16,18 @@ module Extension.Data.Bounded ( + newtype BoundedMax a = BoundedMax {getBoundedMax :: a} + deriving( Eq, Ord, Show ) + ++instance (Ord a, Bounded a) => Semigroup (BoundedMax a) where ++ BoundedMax x <> BoundedMax y = BoundedMax (max x y) ++ + instance (Ord a, Bounded a) => Monoid (BoundedMax a) where + mempty = BoundedMax minBound +- (BoundedMax x) `mappend` (BoundedMax y) = BoundedMax (max x y) + + -- | A newtype wrapper for a monoid of the minimum of a bounded type. + newtype BoundedMin a = BoundedMin {getBoundedMin :: a} + deriving( Eq, Ord, Show ) + ++instance (Ord a, Bounded a) => Semigroup (BoundedMin a) where ++ BoundedMin x <> BoundedMin y = BoundedMin (min x y) ++ + instance (Ord a, Bounded a) => Monoid (BoundedMin a) where + mempty = BoundedMin maxBound +- (BoundedMin x) `mappend` (BoundedMin y) = BoundedMin (min x y) +\ No newline at end of file +diff --git a/lib/utils/src/Extension/Data/Monoid.hs b/lib/utils/src/Extension/Data/Monoid.hs +index 83655c34..ca4f53c2 100644 +--- a/lib/utils/src/Extension/Data/Monoid.hs ++++ b/lib/utils/src/Extension/Data/Monoid.hs +@@ -38,10 +38,12 @@ newtype MinMax a = MinMax { getMinMax :: Maybe (a, a) } + minMaxSingleton :: a -> MinMax a + minMaxSingleton x = MinMax (Just (x, x)) + ++instance Ord a => Semigroup (MinMax a) where ++ MinMax Nothing <> y = y ++ x <> MinMax Nothing = x ++ MinMax (Just (xMin, xMax)) <> MinMax (Just (yMin, yMax)) = ++ MinMax (Just (min xMin yMin, max xMax yMax)) ++ ++ + instance Ord a => Monoid (MinMax a) where + mempty = MinMax Nothing +- +- MinMax Nothing `mappend` y = y +- x `mappend` MinMax Nothing = x +- MinMax (Just (xMin, xMax)) `mappend` MinMax (Just (yMin, yMax)) = +- MinMax (Just (min xMin yMin, max xMax yMax)) +diff --git a/lib/utils/src/Logic/Connectives.hs b/lib/utils/src/Logic/Connectives.hs +index 2e441172..7206cc2c 100644 +--- a/lib/utils/src/Logic/Connectives.hs ++++ b/lib/utils/src/Logic/Connectives.hs +@@ -23,12 +23,12 @@ import Control.DeepSeq + + -- | A conjunction of atoms of type a. + newtype Conj a = Conj { getConj :: [a] } +- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary, ++ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary, + Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData) + + -- | A disjunction of atoms of type a. + newtype Disj a = Disj { getDisj :: [a] } +- deriving (Monoid, Foldable, Traversable, Eq, Ord, Show, Binary, ++ deriving (Monoid, Semigroup, Foldable, Traversable, Eq, Ord, Show, Binary, + Functor, Applicative, Monad, Alternative, MonadPlus, Typeable, Data, NFData) + + instance MonadDisj Disj where +diff --git a/lib/utils/src/Text/PrettyPrint/Class.hs b/lib/utils/src/Text/PrettyPrint/Class.hs +index f5eb42fe..13be6515 100644 +--- a/lib/utils/src/Text/PrettyPrint/Class.hs ++++ b/lib/utils/src/Text/PrettyPrint/Class.hs +@@ -187,9 +187,11 @@ instance Document Doc where + nest i (Doc d) = Doc $ P.nest i d + caseEmptyDoc yes no (Doc d) = if P.isEmpty d then yes else no + ++instance Semigroup Doc where ++ Doc d1 <> Doc d2 = Doc $ (P.<>) d1 d2 ++ + instance Monoid Doc where + mempty = Doc $ P.empty +- mappend (Doc d1) (Doc d2) = Doc $ (P.<>) d1 d2 + + ------------------------------------------------------------------------------ + -- Additional combinators +diff --git a/lib/utils/src/Text/PrettyPrint/Html.hs b/lib/utils/src/Text/PrettyPrint/Html.hs +index 3de5e307..10103eb7 100644 +--- a/lib/utils/src/Text/PrettyPrint/Html.hs ++++ b/lib/utils/src/Text/PrettyPrint/Html.hs +@@ -90,7 +90,7 @@ attribute (key,value) = " " ++ key ++ "=\"" ++ escapeHtmlEntities value ++ "\"" + + -- | A 'Document' transformer that adds proper HTML escaping. + newtype HtmlDoc d = HtmlDoc { getHtmlDoc :: d } +- deriving( Monoid ) ++ deriving( Monoid, Semigroup ) + + -- | Wrap a document such that HTML markup can be added without disturbing the + -- layout. +@@ -182,9 +182,11 @@ getNoHtmlDoc = runIdentity . unNoHtmlDoc + instance NFData d => NFData (NoHtmlDoc d) where + rnf = rnf . getNoHtmlDoc + ++instance Semigroup d => Semigroup (NoHtmlDoc d) where ++ (<>) = liftA2 (<>) ++ + instance Monoid d => Monoid (NoHtmlDoc d) where + mempty = pure mempty +- mappend = liftA2 mappend + + instance Document d => Document (NoHtmlDoc d) where + char = pure . char