[commit: packages/containers] master: It is perfectly fine to import class methods... (d288dc7)

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


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

On branch  : master
Link       : http://git.haskell.org/packages/containers.git/commitdiff/d288dc750949e476af221a832dea8d8c053808a4

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

commit d288dc750949e476af221a832dea8d8c053808a4
Author: Milan Straka <fox at ucw.cz>
Date:   Tue Dec 16 14:16:20 2014 +0100

    It is perfectly fine to import class methods...
    
    ...without specifying the class, see Haskell 2010 5.2.1.
    That allows us to get rid of some conditional includes.
    
    Nevetheless, we still conditionally include foldr', as we do not
    use it for base <4.8.


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

d288dc750949e476af221a832dea8d8c053808a4
 Data/Sequence.hs | 9 ++-------
 1 file changed, 2 insertions(+), 7 deletions(-)

diff --git a/Data/Sequence.hs b/Data/Sequence.hs
index b540978..7d31f79 100644
--- a/Data/Sequence.hs
+++ b/Data/Sequence.hs
@@ -158,14 +158,9 @@ 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'), toList)
-#else
 import Data.Foldable (Foldable(foldl, foldl1, foldr, foldr1, foldMap), foldl', toList)
-#endif
+#if MIN_VERSION_base(4,8,0)
+import Data.Foldable (foldr')
 #endif
 import Data.Traversable
 import Data.Typeable



More information about the ghc-commits mailing list