@@ -22,9 +22,7 @@ module Data.Text.Fusion.Size
22 , unknownSize
22 , unknownSize
26 , upperBound
25 , upperBound
@@ -92,7 +90,7 @@ mulSize (Exact m) (Exact n) = Exact (m*n)
92mulSize (Exact m) (Max n) = Max (m*n)
90mulSize (Exact m) (Max n) = Max (m*n)
93mulSize (Max m) (Exact n) = Max (m*n)
91mulSize (Max m) (Exact n) = Max (m*n)
94mulSize (Max m) (Max n) = Max (m*n)
92mulSize (Max m) (Max n) = Max (m*n)
95−mulSize _ _ = Unknown
93+mulSize _ _ = Unknown
96{-# INLINE mulSize #-}
94{-# INLINE mulSize #-}
98-- | Minimum of two size hints.
96-- | Minimum of two size hints.
@@ -119,19 +117,6 @@ larger (Max m) (Max n) = Max (m `max` n)
119larger _ _ = Unknown
117larger _ _ = Unknown
120{-# INLINE larger #-}
118{-# INLINE larger #-}
122−-- | Convert a size hint to an upper bound.
123−toMax :: Size -> Size
124−toMax (Exact n) = Max n
126−toMax Unknown = Unknown
129−-- | Compute the minimum size from a size hint.
130−lowerBound :: Size -> Int
131−lowerBound (Exact n) = n
133−{-# INLINE lowerBound #-}
135-- | Compute the maximum size from a size hint, if possible.
120-- | Compute the maximum size from a size hint, if possible.
136upperBound :: Int -> Size -> Int
121upperBound :: Int -> Size -> Int
137upperBound _ (Exact n) = n
122upperBound _ (Exact n) = n