More shifting #ifdef-ery... :-P
mkUnique (C# c) (I# i)
= MkUnique (w2i (tag `or#` bits))
where
mkUnique (C# c) (I# i)
= MkUnique (w2i (tag `or#` bits))
where
+#if __GLASGOW_HASKELL__ >= 503
+ tag = i2w (ord# c) `uncheckedShiftL#` i2w_s 24#
+#else
tag = i2w (ord# c) `shiftL#` i2w_s 24#
tag = i2w (ord# c) `shiftL#` i2w_s 24#
bits = i2w i `and#` (i2w 16777215#){-``0x00ffffff''-}
unpkUnique (MkUnique u)
bits = i2w i `and#` (i2w 16777215#){-``0x00ffffff''-}
unpkUnique (MkUnique u)
+#if __GLASGOW_HASKELL__ >= 503
+ shiftr x y = uncheckedShiftRL# x y
+#else
shiftr x y = shiftRL# x y
shiftr x y = shiftRL# x y
#if __GLASGOW_HASKELL__
{-# INLINE shiftL_ #-}
{-# INLINE shiftR_ #-}
#if __GLASGOW_HASKELL__
{-# INLINE shiftL_ #-}
{-# INLINE shiftR_ #-}
+#if __GLASGOW_HASKELL__ >= 503
+shiftL_ n p = word2Int#((int2Word# n) `uncheckedShiftL#` p)
+#else
shiftL_ n p = word2Int#((int2Word# n) `shiftL#` p)
shiftL_ n p = word2Int#((int2Word# n) `shiftL#` p)
shiftR_ n p = word2Int#((int2Word# n) `shiftr` p)
where
shiftR_ n p = word2Int#((int2Word# n) `shiftr` p)
where
+#if __GLASGOW_HASKELL__ >= 503
+ shiftr x y = uncheckedShiftRL# x y
+#else
shiftr x y = shiftRL# x y
shiftr x y = shiftRL# x y
#else {- not GHC -}
shiftL_ n p = n * (2 ^ p)
#else {- not GHC -}
shiftL_ n p = n * (2 ^ p)