@@ -22,9 +22,7 @@ module Data.Text.Fusion.Size
2222 , unknownSize
2323 , smaller
2424 , larger
25− , toMax
2625 , upperBound
27− , lowerBound
2826 , isEmpty
2927 ) where
3028
@@ -92,7 +90,7 @@ mulSize (Exact m) (Exact n) = Exact (m*n)
9290mulSize (Exact m) (Max n) = Max (m*n)
9391mulSize (Max m) (Exact n) = Max (m*n)
9492mulSize (Max m) (Max n) = Max (m*n)
95−mulSize _ _ = Unknown
93+mulSize _ _ = Unknown
9694{-# INLINE mulSize #-}
9795
9896-- | Minimum of two size hints.
@@ -119,19 +117,6 @@ larger (Max m) (Max n) = Max (m `max` n)
119117larger _ _ = Unknown
120118{-# INLINE larger #-}
121119
122−-- | Convert a size hint to an upper bound.
123−toMax :: Size -> Size
124−toMax (Exact n) = Max n
125−toMax a@(Max _) = a
126−toMax Unknown = Unknown
127−{-# INLINE toMax #-}
128−
129−-- | Compute the minimum size from a size hint.
130−lowerBound :: Size -> Int
131−lowerBound (Exact n) = n
132−lowerBound _ = 0
133−{-# INLINE lowerBound #-}
134−
135120-- | Compute the maximum size from a size hint, if possible.
136121upperBound :: Int -> Size -> Int
137122upperBound _ (Exact n) = n