on master help sign in
Remove unused code
f634ffeBryan O'Sullivan
Data/Text/Fusion/Internal.hs+3−1
@@ -43,7 +43,7 @@ data S s = S !s {-# UNPACK #-} !M8 {-# UNPACK #-} !M8 {-# UNPACK #-} !M8
43
43
44infixl 2 :*:
44infixl 2 :*:
45data PairS a b = !a :*: !b
45data PairS a b = !a :*: !b
46− deriving (Eq, Ord, Show)
46+ -- deriving (Eq, Ord, Show)
47
47
48-- | Allow a function over a stream to switch between two states.
48-- | Allow a function over a stream to switch between two states.
49data Switch = S1 | S2
49data Switch = S1 | S2
@@ -52,10 +52,12 @@ data Step s a = Done
52 | Skip !s
52 | Skip !s
53 | Yield !a !s
53 | Yield !a !s
54
54
55+{-
55instance (Show a) => Show (Step s a)
56instance (Show a) => Show (Step s a)
56 where show Done = "Done"
57 where show Done = "Done"
57 show (Skip _) = "Skip"
58 show (Skip _) = "Skip"
58 show (Yield x _) = "Yield " ++ show x
59 show (Yield x _) = "Yield " ++ show x
60+-}
59
61
60instance (Eq a) => Eq (Stream a) where
62instance (Eq a) => Eq (Stream a) where
61 (==) = eq
63 (==) = eq
Data/Text/Fusion/Size.hs+1−16
@@ -22,9 +22,7 @@ module Data.Text.Fusion.Size
22 , unknownSize
22 , unknownSize
23 , smaller
23 , smaller
24 , larger
24 , larger
25− , toMax
26 , upperBound
25 , upperBound
27− , lowerBound
28 , isEmpty
26 , isEmpty
29 ) where
27 ) where
30
28
@@ -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 #-}
97
95
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 #-}
121
119
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−
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