on master help sign in
Remove unused code

--HG-- extra : convert_revision : 5b81e943a522fad8a1d1ca94b3b90c7e4b7b9aaf

commitf634ffe136855e0e3e0dddb6c39668a980aa3c3a authorBryan O'Sullivan <bos@serpentine.com> dateSun 29 Aug 2010, 21:47 (16 years ago) parenta837eda
2 files changed+4−17
Data/Text/Fusion/Internal.hs+3−1 Data/Text/Fusion/Size.hs+1−16
Data/Text/Fusion/Internal.hs+3−1
@@ -43,7 +43,7 @@ data S s = S !s {-# UNPACK #-} !M8 {-# UNPACK #-} !M8 {-# UNPACK #-} !M8
4343
4444infixl 2 :*:
4545data PairS a b = !a :*: !b
46− deriving (Eq, Ord, Show)
46+ -- deriving (Eq, Ord, Show)
4747
4848-- | Allow a function over a stream to switch between two states.
4949data Switch = S1 | S2
@@ -52,10 +52,12 @@ data Step s a = Done
5252 | Skip !s
5353 | Yield !a !s
5454
55+{-
5556instance (Show a) => Show (Step s a)
5657 where show Done = "Done"
5758 show (Skip _) = "Skip"
5859 show (Yield x _) = "Yield " ++ show x
60+-}
5961
6062instance (Eq a) => Eq (Stream a) where
6163 (==) = eq
Data/Text/Fusion/Size.hs+1−16
@@ -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