23 Sep
2006
23 Sep
'06
5:16 p.m.
Hello roconnor, Saturday, September 23, 2006, 4:13:39 PM, you wrote:
Also, shouldn't the calls to shiftL32# and shiftRL32# be calls to uncheckedShiftL32# and uncheckedShiftR32# since i'# and (32# -# i'#) are provably safe?
yes. below is the code used in my lib: #ifdef __GLASGOW_HASKELL__ (I# a) <<# (I# b) = (I# (a `iShiftL#` b)) (I# a) >># (I# b) = (I# (a `uncheckedIShiftRL#` b)) #else /* ! __GLASGOW_HASKELL__ */ a <<# b = a `shiftL` b a >># b = a `shiftR` b #endif /* ! __GLASGOW_HASKELL__ */ -- Best regards, Bulat mailto:Bulat.Ziganshin@gmail.com