Commit abc910df authored by Herbert Valerio Riedel's avatar Herbert Valerio Riedel 🕺

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's avatarHerbert Valerio Riedel <hvr@gnu.org>
parent 83be3d7b
......@@ -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
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment