From: simonmar Date: Fri, 14 Dec 2001 12:05:30 +0000 (+0000) Subject: [project @ 2001-12-14 12:05:15 by simonmar] X-Git-Tag: Approximately_9120_patches~386 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=8cb83b665c1131654703fb84d80db027929db09e;p=ghc-hetmet.git [project @ 2001-12-14 12:05:15 by simonmar] shiftR# --> shiftRL# --- diff --git a/ghc/lib/std/PrelBase.lhs b/ghc/lib/std/PrelBase.lhs index cb2b702..0e7541e 100644 --- a/ghc/lib/std/PrelBase.lhs +++ b/ghc/lib/std/PrelBase.lhs @@ -1,5 +1,5 @@ % ----------------------------------------------------------------------------- -% $Id: PrelBase.lhs,v 1.57 2001/12/13 11:12:27 simonmar Exp $ +% $Id: PrelBase.lhs,v 1.58 2001/12/14 12:05:15 simonmar Exp $ % % (c) The University of Glasgow, 1992-2000 % @@ -685,12 +685,12 @@ gtInt, geInt, eqInt, neInt, ltInt, leInt :: Int -> Int -> Bool -- Note that these wrappers still produce undefined results when the -- second argument (the shift amount) is negative. -shiftL#, shiftR# :: Word# -> Int# -> Word# +shiftL#, shiftRL# :: Word# -> Int# -> Word# a `shiftL#` b | b >=# WORD_SIZE_IN_BITS# = int2Word# 0# | otherwise = a `uncheckedShiftL#` b -a `shiftR#` b | b >=# WORD_SIZE_IN_BITS# = int2Word# 0# +a `shiftRL#` b | b >=# WORD_SIZE_IN_BITS# = int2Word# 0# | otherwise = a `uncheckedShiftRL#` b iShiftL#, iShiftRA#, iShiftRL# :: Int# -> Int# -> Int#