summaryrefslogtreecommitdiff
path: root/dev-haskell/edisonapi
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
committerV3n3RiX <venerix@redcorelinux.org>2019-12-15 18:09:03 +0000
commit7bc9c63c9da678a7e6fceb095d56c634afd22c56 (patch)
tree4a67d50a439e9af63947e5f8b6ba3719af98b6c9 /dev-haskell/edisonapi
parentb284a3168fa91a038925d2ecf5e4791011ea5e7d (diff)
gentoo resync : 15.12.2019
Diffstat (limited to 'dev-haskell/edisonapi')
-rw-r--r--dev-haskell/edisonapi/Manifest2
-rw-r--r--dev-haskell/edisonapi/edisonapi-1.3.1-r1.ebuild32
-rw-r--r--dev-haskell/edisonapi/files/edisonapi-1.3.1-ghc-8.8.patch298
3 files changed, 332 insertions, 0 deletions
diff --git a/dev-haskell/edisonapi/Manifest b/dev-haskell/edisonapi/Manifest
index 11001beeedb4..884d439b5708 100644
--- a/dev-haskell/edisonapi/Manifest
+++ b/dev-haskell/edisonapi/Manifest
@@ -1,3 +1,5 @@
+AUX edisonapi-1.3.1-ghc-8.8.patch 12396 BLAKE2B 54431687f9bd4017932e6629da3d779dadaf53ecdc42a1cffe4cc6754dfb9cb6f80e2c3d0850855ce5e95daa7c816cebc98ab48ce9b964ea649fe4a01d7ec688 SHA512 66e2948730c80dd42254d980a66000483fd84fe5a189288354a556ba3a0a31784a2847d693e5cdb09b107cd5a0a0dbe656c1b14579f744c0ced23f95899c58fe
DIST EdisonAPI-1.3.1.tar.gz 30512 BLAKE2B 7ed05eccc78814672538e3be05fa3d265cd883f080b3e0b10ef57a73473e26597c7c01673d842a9c16306ef67f17a5fed78b7a5060dfe73bbd68a5cdd4d9ea41 SHA512 677161da64856421c834856ee2f5ef7f59880883433d5c5c4061f0ab2faa0cb39c4eb83061820b77dab852acc4cce5dc75740fe454b15dbc2e67e6e84510ce42
+EBUILD edisonapi-1.3.1-r1.ebuild 724 BLAKE2B e266985802f6280f4fd32d15f182eb61953c11856f17e4f26f54fb215f7e30c99493b16b875b1ba70db075fe86278d966b04307b9955b0447036d421120c5506 SHA512 c927acf7b127061aa67137a49c505f3bffbae1c0bb5275e30622944b3609e224f994644a487da03d7599dfa02f9ebe3cedcd26106a69ab6a982bac4bb62341d8
EBUILD edisonapi-1.3.1.ebuild 671 BLAKE2B 11cb0ab44cdb735031cfff6843f680533f63c6577ac52e8c08ba18263c5a93580af1376087d058cc53569f1ff8338003a7cc1646731ee89cb1625643068f64f3 SHA512 91737aed94e1ddfec9b0c09149f5c23ff9ec2147813ef98b6d3a7be868185e91ef19e0366a7dd0431703c086c8175d8a4995728d6f96f7eab5b49078750826b1
MISC metadata.xml 825 BLAKE2B df4da54ccc2fe1f75a6a9246e3c456e399c021b1a4955fa826a41ad753c5656153f831fc2b81b8f3c1ec9864c0e60a0815ed05dbbe5d3afc8d7b4aa1584b9487 SHA512 e9f396de6cf64bf70188595f431e434dccab4a8975ce21f03c25aa2d6c672c07ac8048106581a0729e79d7b2a7da9c3921a930afbd1f87a585bd8078d9bd210a
diff --git a/dev-haskell/edisonapi/edisonapi-1.3.1-r1.ebuild b/dev-haskell/edisonapi/edisonapi-1.3.1-r1.ebuild
new file mode 100644
index 000000000000..6469f7fa5423
--- /dev/null
+++ b/dev-haskell/edisonapi/edisonapi-1.3.1-r1.ebuild
@@ -0,0 +1,32 @@
+# Copyright 1999-2019 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+# ebuild generated by hackport 0.4.7.9999
+
+CABAL_FEATURES="lib profile haddock hoogle hscolour"
+inherit haskell-cabal
+
+MY_PN="EdisonAPI"
+MY_P="${MY_PN}-${PV}"
+
+DESCRIPTION="A library of efficient, purely-functional data structures (API)"
+HOMEPAGE="http://rwd.rdockins.name/edison/home/"
+SRC_URI="https://hackage.haskell.org/package/${MY_P}/${MY_P}.tar.gz"
+
+LICENSE="MIT"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86"
+IUSE=""
+
+RDEPEND=">=dev-haskell/mtl-1.0:=[profile?]
+ >=dev-lang/ghc-7.4.1:=
+"
+DEPEND="${RDEPEND}
+ >=dev-haskell/cabal-1.10
+"
+
+S="${WORKDIR}/${MY_P}"
+
+PATCHES=( "${FILESDIR}/${PN}-1.3.1-ghc-8.8.patch" )
diff --git a/dev-haskell/edisonapi/files/edisonapi-1.3.1-ghc-8.8.patch b/dev-haskell/edisonapi/files/edisonapi-1.3.1-ghc-8.8.patch
new file mode 100644
index 000000000000..81035f311357
--- /dev/null
+++ b/dev-haskell/edisonapi/files/edisonapi-1.3.1-ghc-8.8.patch
@@ -0,0 +1,298 @@
+commit 8da6c0f7d8666766e2f0693425c347c0adb492dc
+Author: Andrés Sicard-Ramírez <asr@eafit.edu.co>
+Date: Thu Jul 4 18:15:17 2019 -0500
+
+ Supported GHC 8.8.1.
+
+ All changes were required by the MonadFail proposal.
+
+diff --git a/EdisonAPI.cabal b/EdisonAPI.cabal
+index 0f8f161..072cbd2 100644
+--- a/EdisonAPI.cabal
++++ b/EdisonAPI.cabal
+@@ -40,6 +40,8 @@ Library
+ Build-Depends:
+ base == 4.*,
+ mtl >= 1.0
++ if impl(ghc < 8.0)
++ build-depends: fail
+ Default-Language: Haskell2010
+ Default-Extensions:
+ MultiParamTypeClasses
+diff --git a/src/Data/Edison/Assoc.hs b/src/Data/Edison/Assoc.hs
+index fac1c59..3993dce 100644
+--- a/src/Data/Edison/Assoc.hs
++++ b/src/Data/Edison/Assoc.hs
+@@ -71,6 +71,8 @@ module Data.Edison.Assoc (
+
+ import Prelude hiding (null,map,lookup,foldr,foldl,foldr1,foldl1,filter)
+
++import qualified Control.Monad.Fail as Fail
++
+ import Data.Edison.Prelude
+
+ import Data.Edison.Seq(Sequence)
+@@ -212,7 +214,7 @@ class (Eq k,Functor m) => AssocX m k | m -> k where
+ --
+ -- This function is /ambiguous/ at finite relation types if the key appears
+ -- more than once in the finite relation. Otherwise, it is /unambiguous/.
+- lookupM :: (Monad rm) => k -> m a -> rm a
++ lookupM :: (Fail.MonadFail rm) => k -> m a -> rm a
+
+ -- | Return all elements bound by the given key in an unspecified order.
+ --
+@@ -236,7 +238,7 @@ class (Eq k,Functor m) => AssocX m k | m -> k where
+ --
+ -- This function is /ambiguous/ at finite relation types if the key appears
+ -- more than once in the finite relation. Otherwise, it is /unambiguous/.
+- lookupAndDeleteM :: (Monad rm) => k -> m a -> rm (a, m a)
++ lookupAndDeleteM :: (Fail.MonadFail rm) => k -> m a -> rm (a, m a)
+
+ -- | Find all elements bound by the given key; return a sequence containing
+ -- all such bound elements in an unspecified order and the collection
+@@ -395,7 +397,7 @@ class (AssocX m k, Ord k) => OrdAssocX m k | m -> k where
+ --
+ -- This function is /ambiguous/ at finite relation types if the finite relation
+ -- contains more than one minimum key. Otherwise it is /unambiguous/.
+- minView :: (Monad rm) => m a -> rm (a, m a)
++ minView :: (Fail.MonadFail rm) => m a -> rm (a, m a)
+
+ -- | Find the binding with the minimum key and return its element. Signals
+ -- an error if the associative collection is empty. Which element is chosen
+@@ -426,7 +428,7 @@ class (AssocX m k, Ord k) => OrdAssocX m k | m -> k where
+ --
+ -- This function is /ambiguous/ at finite relation types if the finite relation
+ -- contains more than one minimum key. Otherwise it is /unambiguous/.
+- maxView :: (Monad rm) => m a -> rm (a, m a)
++ maxView :: (Fail.MonadFail rm) => m a -> rm (a, m a)
+
+ -- | Find the binding with the maximum key and return its element. Signals
+ -- an error if the associative collection is empty. Which element is chosen
+@@ -777,7 +779,7 @@ class (Assoc m k, OrdAssocX m k) => OrdAssoc m k | m -> k where
+ -- minimum key exists in the relation. Furthermore, it is /ambiguous/
+ -- with respect to the actual key observed unless the @Eq@ instance on
+ -- keys corresponds to indistinguisability.
+- minViewWithKey :: (Monad rm) => m a -> rm ((k, a), m a)
++ minViewWithKey :: (Fail.MonadFail rm) => m a -> rm ((k, a), m a)
+
+ -- | Find the binding with the minimum key in an associative collection and
+ -- return the key and the element. Signals an error if the associative
+@@ -800,7 +802,7 @@ class (Assoc m k, OrdAssocX m k) => OrdAssoc m k | m -> k where
+ -- maximum key exists in the relation. Furthermore, it is /ambiguous/
+ -- with respect to the actual key observed unless the @Eq@ instance on
+ -- keys corresponds to indistinguisability.
+- maxViewWithKey :: (Monad rm) => m a -> rm ((k, a), m a)
++ maxViewWithKey :: (Fail.MonadFail rm) => m a -> rm ((k, a), m a)
+
+ -- | Find the binding with the maximum key in an associative collection and
+ -- return the key and the element. Signals an error if the associative
+diff --git a/src/Data/Edison/Coll.hs b/src/Data/Edison/Coll.hs
+index 88ae755..be4df08 100644
+--- a/src/Data/Edison/Coll.hs
++++ b/src/Data/Edison/Coll.hs
+@@ -97,6 +97,7 @@ module Data.Edison.Coll (
+ ) where
+
+ import Prelude hiding (null,foldr,foldl,foldr1,foldl1,lookup,filter)
++import qualified Control.Monad.Fail as Fail
+ import Data.Monoid
+
+ import Data.Edison.Prelude
+@@ -421,7 +422,7 @@ class CollX c a => Coll c a | c -> a where
+ -- This function is /ambiguous/ at bag types, when more than one
+ -- element equivalent to the given item is in the bag. Otherwise
+ -- it is /unambiguous/.
+- lookupM :: (Monad m) => a -> c -> m a
++ lookupM :: (Fail.MonadFail m) => a -> c -> m a
+
+ -- | Return a sequence containing all elements in the collection equal to
+ -- the given element in an unspecified order.
+@@ -504,7 +505,7 @@ class (Coll c a, OrdCollX c a) => OrdColl c a | c -> a where
+ --
+ -- This function is /ambiguous/ at bag types, if more than one minimum
+ -- element exists in the bag. Otherwise, it is /unambiguous/.
+- minView :: (Monad m) => c -> m (a, c)
++ minView :: (Fail.MonadFail m) => c -> m (a, c)
+
+ -- | Return the minimum element in the collection. If there are multiple
+ -- copies of the minimum element, it is unspecified which is chosen.
+@@ -523,7 +524,7 @@ class (Coll c a, OrdCollX c a) => OrdColl c a | c -> a where
+ --
+ -- This function is /ambiguous/ at bag types, if more than one maximum
+ -- element exists in the bag. Otherwise, it is /unambiguous/.
+- maxView :: (Monad m) => c -> m (a, c)
++ maxView :: (Fail.MonadFail m) => c -> m (a, c)
+
+ -- | Return the maximum element in the collection. If there are multiple
+ -- copies of the maximum element, it is unspecified which is chosen.
+diff --git a/src/Data/Edison/Prelude.hs b/src/Data/Edison/Prelude.hs
+index 2ac6968..8281f46 100644
+--- a/src/Data/Edison/Prelude.hs
++++ b/src/Data/Edison/Prelude.hs
+@@ -10,14 +10,19 @@
+ -- This module is a central depository of common definitions
+ -- used throughout Edison.
+
++{-# LANGUAGE GeneralizedNewtypeDeriving #-}
++
+ module Data.Edison.Prelude (
+ -- * Hashing classes
+ Hash (..)
+ , UniqueHash
+ , ReversibleHash (..)
+ , Measured (..)
++-- * Pure MonadFail
++, runFail_
+ ) where
+
++import Control.Monad.Fail
+ import Data.Monoid
+
+ -- | This class represents hashable objects. If obeys the
+@@ -62,3 +67,14 @@ class UniqueHash a => ReversibleHash a where
+ -- the computation.
+ class (Monoid v) => Measured v a | a -> v where
+ measure :: a -> v
++
++-- From Agda source code: src/full/Agda/Utils/Fail.hs
++-- | A pure MonadFail.
++newtype Fail a = Fail { runFail :: Either String a }
++ deriving (Functor, Applicative, Monad)
++
++instance MonadFail Fail where
++ fail = Fail . Left
++
++runFail_ :: Fail a -> a
++runFail_ = either error id . runFail
+diff --git a/src/Data/Edison/Seq.hs b/src/Data/Edison/Seq.hs
+index 78ca245..0394d58 100644
+--- a/src/Data/Edison/Seq.hs
++++ b/src/Data/Edison/Seq.hs
+@@ -58,6 +58,7 @@ import Prelude hiding (concat,reverse,map,concatMap,foldr,foldl,foldr1,foldl1,
+ zip,zip3,zipWith,zipWith3,unzip,unzip3,null)
+
+ import Control.Monad
++import qualified Control.Monad.Fail as Fail
+ import Data.Monoid
+
+ import Data.Edison.Prelude
+@@ -221,7 +222,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( 1 )@
+- lview :: (Monad m) => s a -> m (a, s a)
++ lview :: (Fail.MonadFail m) => s a -> m (a, s a)
+
+ -- | Return the first element of a sequence.
+ -- Signals an error if the sequence is empty.
+@@ -249,7 +250,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( 1 )@
+- lheadM :: (Monad m) => s a -> m a
++ lheadM :: (Fail.MonadFail m) => s a -> m a
+
+ -- | Delete the first element of the sequence.
+ -- Signals error if sequence is empty.
+@@ -277,7 +278,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( 1 )@
+- ltailM :: (Monad m) => s a -> m (s a)
++ ltailM :: (Fail.MonadFail m) => s a -> m (s a)
+
+ -- | Separate a sequence into its last (rightmost) element and the
+ -- remaining sequence. Calls 'fail' if the sequence is empty.
+@@ -291,7 +292,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( n )@
+- rview :: (Monad m) => s a -> m (a, s a)
++ rview :: (Fail.MonadFail m) => s a -> m (a, s a)
+
+ -- | Return the last (rightmost) element of the sequence.
+ -- Signals error if sequence is empty.
+@@ -319,7 +320,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( n )@
+- rheadM :: (Monad m) => s a -> m a
++ rheadM :: (Fail.MonadFail m) => s a -> m a
+
+ -- | Delete the last (rightmost) element of the sequence.
+ -- Signals an error if the sequence is empty.
+@@ -347,7 +348,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( n )@
+- rtailM :: (Monad m) => s a -> m (s a)
++ rtailM :: (Fail.MonadFail m) => s a -> m (s a)
+
+ -- | Returns 'True' if the sequence is empty and 'False' otherwise.
+ --
+@@ -948,7 +949,7 @@ class (Functor s, MonadPlus s) => Sequence s where
+ -- This function is always /unambiguous/.
+ --
+ -- Default running time: @O( i )@
+- lookupM :: (Monad m) => Int -> s a -> m a
++ lookupM :: (Fail.MonadFail m) => Int -> s a -> m a
+
+ -- | Return the element at the given index, or the
+ -- default argument if the index is out of bounds. All indexes are
+diff --git a/src/Data/Edison/Seq/ListSeq.hs b/src/Data/Edison/Seq/ListSeq.hs
+index 1ad677f..890b66f 100644
+--- a/src/Data/Edison/Seq/ListSeq.hs
++++ b/src/Data/Edison/Seq/ListSeq.hs
+@@ -40,9 +40,9 @@ module Data.Edison.Seq.ListSeq (
+ import Prelude hiding (concat,reverse,map,concatMap,foldr,foldl,foldr1,foldl1,
+ filter,takeWhile,dropWhile,lookup,take,drop,splitAt,
+ zip,zip3,zipWith,zipWith3,unzip,unzip3,null)
+-import qualified Control.Monad.Identity as ID
++import qualified Control.Monad.Fail as Fail
+ import qualified Prelude
+-import Data.Edison.Prelude
++import Data.Edison.Prelude ( runFail_ )
+ import qualified Data.List
+ import Data.Monoid
+ import qualified Data.Edison.Seq as S ( Sequence(..) )
+@@ -54,16 +54,16 @@ singleton :: a -> [a]
+ lcons :: a -> [a] -> [a]
+ rcons :: a -> [a] -> [a]
+ append :: [a] -> [a] -> [a]
+-lview :: (Monad rm) => [a] -> rm (a, [a])
++lview :: (Fail.MonadFail rm) => [a] -> rm (a, [a])
+ lhead :: [a] -> a
+-lheadM :: (Monad rm) => [a] -> rm a
++lheadM :: (Fail.MonadFail rm) => [a] -> rm a
+ ltail :: [a] -> [a]
+-ltailM :: (Monad rm) => [a] -> rm [a]
+-rview :: (Monad rm) => [a] -> rm (a, [a])
++ltailM :: (Fail.MonadFail rm) => [a] -> rm [a]
++rview :: (Fail.MonadFail rm) => [a] -> rm (a, [a])
+ rhead :: [a] -> a
+-rheadM :: (Monad rm) => [a] -> rm a
++rheadM :: (Fail.MonadFail rm) => [a] -> rm a
+ rtail :: [a] -> [a]
+-rtailM :: (Monad rm) => [a] -> rm [a]
++rtailM :: (Fail.MonadFail rm) => [a] -> rm [a]
+ null :: [a] -> Bool
+ size :: [a] -> Int
+ concat :: [[a]] -> [a]
+@@ -92,7 +92,7 @@ reduce1' :: (a -> a -> a) -> [a] -> a
+ copy :: Int -> a -> [a]
+ inBounds :: Int -> [a] -> Bool
+ lookup :: Int -> [a] -> a
+-lookupM :: (Monad m) => Int -> [a] -> m a
++lookupM :: (Fail.MonadFail m) => Int -> [a] -> m a
+ lookupWithDefault :: a -> Int -> [a] -> a
+ update :: Int -> a -> [a] -> [a]
+ adjust :: (a -> a) -> Int -> [a] -> [a]
+@@ -252,7 +252,7 @@ inBounds i xs
+ | i >= 0 = not (null (drop i xs))
+ | otherwise = False
+
+-lookup i xs = ID.runIdentity (lookupM i xs)
++lookup i xs = runFail_ (lookupM i xs)
+
+ lookupM i xs
+ | i < 0 = fail "ListSeq.lookup: not found"