diff options
-rw-r--r-- | libraries/base/GHC/Bits.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libraries/base/GHC/Bits.hs b/libraries/base/GHC/Bits.hs index d0703e223f..012550a60b 100644 --- a/libraries/base/GHC/Bits.hs +++ b/libraries/base/GHC/Bits.hs @@ -601,10 +601,10 @@ instance Bits Natural where -- -- > toIntegral :: (Integral a, Integral b) => a -> Maybe b -- > toIntegral x --- > | toInteger x == y = Just (fromInteger y) --- > | otherwise = Nothing +-- > | toInteger x == toInteger y = Just y +-- > | otherwise = Nothing -- > where --- > y = toInteger x +-- > y = fromIntegral x -- -- This version requires going through 'Integer', which can be inefficient. -- However, @toIntegralSized@ is optimized to allow GHC to statically determine |