Commits

Bryan O'Sullivan committed beb5015

Cast to widest fixed integer to avoid truncation trouble

  • Participants
  • Parent commits aaefee9

Comments (0)

Files changed (1)

Data/Text/Lazy/Builder/Int.hs

 
 countDigits :: (Integral a) => a -> Int
 {-# INLINE countDigits #-}
-countDigits = go 1
+countDigits v0 = go 1 (fromIntegral v0 :: Word64)
   where go !k v
            | v < 10 = k
            | v < 100 = k + 1