on master help sign in
Fix dates/typo/Functor instance
9445975Harendra Kumar
benchmark/Streamly/Benchmark/Data/Parser.hs+2−2
@@ -1,6 +1,6 @@
1-- |
1-- |
2−-- Module : Streamly.Benchmark.Data.Fold
2+-- Module : Streamly.Benchmark.Data.Parser
3−-- Copyright : (c) 2018 Composewell
3+-- Copyright : (c) 2020 Composewell Technologies
4--
4--
5-- License : MIT
5-- License : MIT
6-- Maintainer : streamly@composewell.com
6-- Maintainer : streamly@composewell.com
src/Streamly/Internal/Data/Parser/Types.hs+2−5
@@ -33,7 +33,7 @@
33-- 1. Buffer the input until explicitly asked to drop the input
33-- 1. Buffer the input until explicitly asked to drop the input
34-- 2. Drop the input stream beyond a "point of no return" in the history
34-- 2. Drop the input stream beyond a "point of no return" in the history
35-- because the input till that point has been consumed irrevocably.
35-- because the input till that point has been consumed irrevocably.
36−-- 2. Go back in the buffered stream upto the point of no return.
36+-- 3. Go back in the buffered stream upto the point of no return.
37--
37--
38-- Based on application requirements it should be possible to design even a
38-- Based on application requirements it should be possible to design even a
39-- richer interface to manipulate the input stream/buffer. For example, we
39-- richer interface to manipulate the input stream/buffer. For example, we
@@ -106,7 +106,7 @@ data Parser m a b =
106
106
107-- | Maps a function over the output of the fold.
107-- | Maps a function over the output of the fold.
108--
108--
109−instance Monad m => Functor (Parser m a) where
109+instance Functor m => Functor (Parser m a) where
110 {-# INLINE fmap #-}
110 {-# INLINE fmap #-}
111 fmap f (Parser step initial extract) =
111 fmap f (Parser step initial extract) =
112 Parser step initial (fmap3 f extract)
112 Parser step initial (fmap3 f extract)
@@ -115,9 +115,6 @@ instance Monad m => Functor (Parser m a) where
115
115
116 fmap3 g = fmap (fmap (fmap g))
116 fmap3 g = fmap (fmap (fmap g))
117
117
118− {-# INLINE (<$) #-}
119− (<$) b = \_ -> pure b
120−
121{-# ANN type SeqParseState Fuse #-}
118{-# ANN type SeqParseState Fuse #-}
122data SeqParseState sl f sr =
119data SeqParseState sl f sr =
123 SeqParseL sl | SeqParseR f sr | SeqParseLErr String
120 SeqParseL sl | SeqParseR f sr | SeqParseLErr String