diff options
author | John Ericson <git@JohnEricson.me> | 2019-06-03 23:47:10 -0400 |
---|---|---|
committer | John Ericson <John.Ericson@Obsidian.Systems> | 2021-12-17 11:12:08 -0500 |
commit | 249b63c95975ce821981adaea27233c8ce5083da (patch) | |
tree | c34a8c790e49cf06bdc1b42b3df49d01b7e72e86 /libraries/base | |
parent | 6cea73113e63650e3eeee9c187ae3de7ffc19af6 (diff) | |
download | haskell-wip/prep-int64.tar.gz |
Try to do more fixed-size `Int64#` and `Word64#`wip/prep-int64
We still have lots of CPP, but we are trying to make the 64-bit ones
more ready.
Co-authored-by: Sylvain Henry <hsyl20@gmail.com>
Diffstat (limited to 'libraries/base')
-rw-r--r-- | libraries/base/GHC/Int.hs | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/libraries/base/GHC/Int.hs b/libraries/base/GHC/Int.hs index b5c5530688..84ef2b06fe 100644 --- a/libraries/base/GHC/Int.hs +++ b/libraries/base/GHC/Int.hs @@ -825,30 +825,6 @@ instance Integral Int64 where #endif toInteger (I64# x) = integerFromInt64# x - -divInt64#, modInt64# :: Int64# -> Int64# -> Int64# - --- Define div in terms of quot, being careful to avoid overflow (#7233) -x# `divInt64#` y# - | isTrue# (x# `gtInt64#` zero) && isTrue# (y# `ltInt64#` zero) - = ((x# `subInt64#` one) `quotInt64#` y#) `subInt64#` one - | isTrue# (x# `ltInt64#` zero) && isTrue# (y# `gtInt64#` zero) - = ((x# `plusInt64#` one) `quotInt64#` y#) `subInt64#` one - | otherwise - = x# `quotInt64#` y# - where - !zero = intToInt64# 0# - !one = intToInt64# 1# - -x# `modInt64#` y# - | isTrue# (x# `gtInt64#` zero) && isTrue# (y# `ltInt64#` zero) || - isTrue# (x# `ltInt64#` zero) && isTrue# (y# `gtInt64#` zero) - = if isTrue# (r# `neInt64#` zero) then r# `plusInt64#` y# else zero - | otherwise = r# - where - !zero = intToInt64# 0# - !r# = x# `remInt64#` y# - -- | @since 2.01 instance Read Int64 where readsPrec p s = [(fromInteger x, r) | (x, r) <- readsPrec p s] |