[commit: ghc] master: Future-proof code for upcoming `array-0.5.0.0` (abc910d)

git at git.haskell.org git
Fri Oct 11 21:05:35 UTC 2013


Repository : ssh://git at git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/abc910df622e11a20fb858750038c7ffa5767d2c/ghc

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

commit abc910df622e11a20fb858750038c7ffa5767d2c
Author: Herbert Valerio Riedel <hvr at gnu.org>
Date:   Fri Oct 11 21:24:31 2013 +0200

    Future-proof code for upcoming `array-0.5.0.0`
    
    This way CPP conditionals can be avoided for the transition period.
    
    Signed-off-by: Herbert Valerio Riedel <hvr at gnu.org>


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

abc910df622e11a20fb858750038c7ffa5767d2c
 compiler/cmm/PprC.hs          |    8 ++++----
 compiler/nativeGen/PprBase.hs |    8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/compiler/cmm/PprC.hs b/compiler/cmm/PprC.hs
index 32fd8b4..a8d4c5e 100644
--- a/compiler/cmm/PprC.hs
+++ b/compiler/cmm/PprC.hs
@@ -55,8 +55,8 @@ import qualified Data.Map as Map
 import Control.Monad (liftM, ap)
 import Control.Applicative (Applicative(..))
 
-import Data.Array.Unsafe ( castSTUArray )
-import Data.Array.ST hiding ( castSTUArray )
+import qualified Data.Array.Unsafe as U ( castSTUArray )
+import Data.Array.ST
 
 -- --------------------------------------------------------------------------
 -- Top level
@@ -1162,10 +1162,10 @@ big_doubles dflags
   | otherwise = panic "big_doubles"
 
 castFloatToIntArray :: STUArray s Int Float -> ST s (STUArray s Int Int)
-castFloatToIntArray = castSTUArray
+castFloatToIntArray = U.castSTUArray
 
 castDoubleToIntArray :: STUArray s Int Double -> ST s (STUArray s Int Int)
-castDoubleToIntArray = castSTUArray
+castDoubleToIntArray = U.castSTUArray
 
 -- floats are always 1 word
 floatToWord :: DynFlags -> Rational -> CmmLit
diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs
index 275d329..90a3b30 100644
--- a/compiler/nativeGen/PprBase.hs
+++ b/compiler/nativeGen/PprBase.hs
@@ -15,8 +15,8 @@ module PprBase (
 
 where
 
-import Data.Array.Unsafe( castSTUArray )
-import Data.Array.ST hiding( castSTUArray )
+import qualified Data.Array.Unsafe as U ( castSTUArray )
+import Data.Array.ST
 
 import Control.Monad.ST
 
@@ -28,10 +28,10 @@ import Data.Word
 -- Converting floating-point literals to integrals for printing
 
 castFloatToWord8Array :: STUArray s Int Float -> ST s (STUArray s Int Word8)
-castFloatToWord8Array = castSTUArray
+castFloatToWord8Array = U.castSTUArray
 
 castDoubleToWord8Array :: STUArray s Int Double -> ST s (STUArray s Int Word8)
-castDoubleToWord8Array = castSTUArray
+castDoubleToWord8Array = U.castSTUArray
 
 -- floatToBytes and doubleToBytes convert to the host's byte
 -- order.  Providing that we're not cross-compiling for a




More information about the ghc-commits mailing list