[commit: packages/array] master: More forward-compat way to accomplish f7955522c45a (19b7aeb)

git at git.haskell.org git at git.haskell.org
Sun Sep 21 09:25:09 UTC 2014


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

On branch  : master
Link       : http://git.haskell.org/packages/array.git/commitdiff/19b7aebd7dff912728029778749aaa8a9ed1cffd

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

commit 19b7aebd7dff912728029778749aaa8a9ed1cffd
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Sun Sep 21 11:24:27 2014 +0200

    More forward-compat way to accomplish f7955522c45a


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

19b7aebd7dff912728029778749aaa8a9ed1cffd
 Data/Array/Base.hs | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Data/Array/Base.hs b/Data/Array/Base.hs
index b57ae4a..27e69c3 100644
--- a/Data/Array/Base.hs
+++ b/Data/Array/Base.hs
@@ -29,8 +29,9 @@ import GHC.Arr          ( STArray )
 import qualified GHC.Arr as Arr
 import qualified GHC.Arr as ArrST
 import GHC.ST           ( ST(..), runST )
-import GHC.Base
-import GHC.Ptr          ( Ptr(..), FunPtr(..), nullPtr, nullFunPtr )
+import GHC.Base         ( IO(..) )
+import GHC.Exts
+import GHC.Ptr          ( nullPtr, nullFunPtr )
 import GHC.Stable       ( StablePtr(..) )
 #if !MIN_VERSION_base(4,6,0)
 import GHC.Exts         ( Word(..) )
@@ -461,7 +462,7 @@ cmpIntUArray arr1@(UArray l1 u1 n1 _) arr2@(UArray l2 u2 n2 _) =
     if n1 == 0 then if n2 == 0 then EQ else LT else
     if n2 == 0 then GT else
     case compare l1 l2 of
-        EQ    -> GHC.Base.foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
+        EQ    -> foldr cmp (compare u1 u2) [0 .. (n1 `min` n2) - 1]
         other -> other
     where
     cmp i rest = case compare (unsafeAt arr1 i) (unsafeAt arr2 i) of



More information about the ghc-commits mailing list