From: simonmar Date: Tue, 11 Dec 2001 12:21:06 +0000 (+0000) Subject: [project @ 2001-12-11 12:21:06 by simonmar] X-Git-Tag: Approximately_9120_patches~416 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=abf79717055ffefb997877b80ebd6ff237d12024;p=ghc-hetmet.git [project @ 2001-12-11 12:21:06 by simonmar] Make this module compile with the recent changes to the names of the shift primops. --- diff --git a/ghc/compiler/utils/BitSet.lhs b/ghc/compiler/utils/BitSet.lhs index 22afea6..071e166 100644 --- a/ghc/compiler/utils/BitSet.lhs +++ b/ghc/compiler/utils/BitSet.lhs @@ -47,7 +47,11 @@ mkBS xs = foldr (unionBS . unitBS) emptyBS xs unitBS :: Int -> BitSet unitBS x = case x of +#if __GLASGOW_HASKELL__ >= 503 + I# i# -> MkBS ((int2Word# 1#) `uncheckedShiftL#` i#) +#else I# i# -> MkBS ((int2Word# 1#) `shiftL#` i#) +#endif unionBS :: BitSet -> BitSet -> BitSet unionBS (MkBS x#) (MkBS y#) = MkBS (x# `or#` y#) @@ -83,7 +87,11 @@ listBS s = listify s 0 in case word2Int# (s# `and#` (int2Word# 1#)) of 0# -> more _ -> n : more +#if __GLASGOW_HASKELL__ >= 503 + shiftr x y = uncheckedShiftRL# x y +#else shiftr x y = shiftRL# x y +#endif -- intBS is a bit naughty. intBS :: BitSet -> Int