[commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: It is perfectly fine to import class methods... (d288dc7)
git at git.haskell.org
git at git.haskell.org
Mon Apr 17 21:36:43 UTC 2017
- Previous message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Import only used class methods of Foldable. (6b026a7)
- Next message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Add forgotten foldMap to the imports. (4a6bbb1)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Repository : ssh://git@git.haskell.org/containers
On branches: changelog-foldtree,cleaned_bugfix394,master,merge-doc-target,merge-fixes-5.9,merge-restrict-fix-5.8,revert-184-generic,revert-408-bugfix_394
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
- Previous message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Import only used class methods of Foldable. (6b026a7)
- Next message: [commit: packages/containers] changelog-foldtree, cleaned_bugfix394, master, merge-doc-target, merge-fixes-5.9, merge-restrict-fix-5.8, revert-184-generic, revert-408-bugfix_394: Add forgotten foldMap to the imports. (4a6bbb1)
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the ghc-commits
mailing list