[commit: packages/containers] develop-0.6, develop-0.6-questionable, master, zip-devel: Make version-appropriate Foldable imports (39e9ee9)

git at git.haskell.org git at git.haskell.org
Fri Jan 23 22:41:44 UTC 2015


Repository : ssh://git@git.haskell.org/containers

On branches: develop-0.6,develop-0.6-questionable,master,zip-devel
Link       : http://git.haskell.org/packages/containers.git/commitdiff/39e9ee9992269eb2ad3a9b7e608457c6d1a92b04

>---------------------------------------------------------------

commit 39e9ee9992269eb2ad3a9b7e608457c6d1a92b04
Author: David Feuer <David.Feuer at gmail.com>
Date:   Thu Dec 4 10:59:22 2014 -0500

    Make version-appropriate Foldable imports
    
    foldl' and foldr' moved into the Foldable class, then toList.
    This gets rid of a warning about the imports.


>---------------------------------------------------------------

39e9ee9992269eb2ad3a9b7e608457c6d1a92b04
 Data/Sequence.hs | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index 511cad9..88faf62 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -155,7 +155,15 @@ import Control.DeepSeq (NFData(rnf))
 import Control.Monad (MonadPlus(..), ap)
 import Data.Monoid (Monoid(..))
 import Data.Functor (Functor(..))
+#if MIN_VERSION_base(4,8,0)
+import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr', toList))
+#else
+#if MIN_VERSION_base(4,6,0)
+import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap, foldl', foldr'), toList)
+#else
 import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), foldl', foldr', toList)
+#endif
+#endif
 import Data.Traversable
 import Data.Typeable
 



More information about the ghc-commits mailing list