on master help sign in
Switch to new mul function for Size
commita2408d10897be77fbdc04de696e4f6cc2e29474b authorBryan O'Sullivan <bos@serpentine.com> dateFri 6 Jun 2014, 00:34 (12 years ago) parentbc456b1
1 file changed+1−6
Data/Text/Internal/Fusion/Size.hs+1−6
Data/Text/Internal/Fusion/Size.hs+1−6
@@ -32,6 +32,7 @@ module Data.Text.Internal.Fusion.Size
3232 , isEmpty
3333 ) where
3434
35+import Data.Text.Internal (mul)
3536#if defined(ASSERTS)
3637import Control.Exception (assert)
3738#endif
@@ -100,12 +101,6 @@ subtractSize (Between _ mb) Unknown = Between 0 mb
100101subtractSize _ _ = Unknown
101102{-# INLINE subtractSize #-}
102103
103−mul :: Int -> Int -> Int
104−mul m n
105− | m <= maxBound `quot` n = m * n
106− | otherwise = overflowError
107−{-# INLINE mul #-}
108−
109104mulSize :: Size -> Size -> Size
110105mulSize (Between ma mb) (Between na nb) = Between (mul ma na) (mul mb nb)
111106mulSize _ _ = Unknown