[commit: packages/containers] develop-0.6, develop-0.6-questionable, master, zip-devel: Replace `MIN_VERSION_base_4_[57]_0` by `MIN_VERSION_base()` (3582252)

git at git.haskell.org git at git.haskell.org
Sun Dec 20 16:21:00 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/3582252bda944421c0a38c86684657e59dbe81be

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

commit 3582252bda944421c0a38c86684657e59dbe81be
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Thu Oct 16 22:35:13 2014 +0200

    Replace `MIN_VERSION_base_4_[57]_0` by `MIN_VERSION_base()`


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

3582252bda944421c0a38c86684657e59dbe81be
 Data/IntSet/Base.hs | 24 ++----------------------
 1 file changed, 2 insertions(+), 22 deletions(-)

diff --git a/Data/IntSet/Base.hs b/Data/IntSet/Base.hs
index 309ab42..c8e70f6 100644
--- a/Data/IntSet/Base.hs
+++ b/Data/IntSet/Base.hs
@@ -162,26 +162,6 @@ module Data.IntSet.Base (
     , bitmapOf
     ) where
 
--- We want to be able to compile without cabal. Nevertheless
--- #if defined(MIN_VERSION_base) && MIN_VERSION_base(4,5,0)
--- does not work, because if MIN_VERSION_base is undefined,
--- the last condition is syntactically wrong.
-#define MIN_VERSION_base_4_5_0 0
-#ifdef MIN_VERSION_base
-#if MIN_VERSION_base(4,5,0)
-#undef MIN_VERSION_base_4_5_0
-#define MIN_VERSION_base_4_5_0 1
-#endif
-#endif
-
-#define MIN_VERSION_base_4_7_0 0
-#ifdef MIN_VERSION_base
-#if MIN_VERSION_base(4,7,0)
-#undef MIN_VERSION_base_4_7_0
-#define MIN_VERSION_base_4_7_0 1
-#endif
-#endif
-
 import Control.DeepSeq (NFData)
 import Data.Bits
 import qualified Data.List as List
@@ -1228,7 +1208,7 @@ tip kx bm = Tip kx bm
 ----------------------------------------------------------------------}
 
 suffixBitMask :: Int
-#if MIN_VERSION_base_4_7_0
+#if MIN_VERSION_base(4,7,0)
 suffixBitMask = finiteBitSize (undefined::Word) - 1
 #else
 suffixBitMask = bitSize (undefined::Word) - 1
@@ -1479,7 +1459,7 @@ foldr'Bits prefix f z bm = let lb = lowestBitSet bm
 ----------------------------------------------------------------------}
 
 bitcount :: Int -> Word -> Int
-#if MIN_VERSION_base_4_5_0
+#if MIN_VERSION_base(4,5,0)
 bitcount a x = a + popCount x
 #else
 bitcount a0 x0 = go a0 x0



More information about the ghc-commits mailing list