on master help sign in
Fix hlint hints
9851d18Harendra Kumar
src/Streamly/Internal/Data/Parser/ParserD/Types.hs+2−2
@@ -342,7 +342,7 @@ split_ (Parser stepL initialL extractL) (Parser stepR initialR extractR) =
342
342
343 -- Note: For the composed parse to terminate, the left parser has to be
343 -- Note: For the composed parse to terminate, the left parser has to be
344 -- a terminating parser returning a Done at some point.
344 -- a terminating parser returning a Done at some point.
345− step (SeqAL st) a = do
345+ step (SeqAL st) a =
346 (\r i -> case r of
346 (\r i -> case r of
347 -- Note: this leads to buffering even if we are not in an
347 -- Note: this leads to buffering even if we are not in an
348 -- Alternative composition.
348 -- Alternative composition.
@@ -352,7 +352,7 @@ split_ (Parser stepL initialL extractL) (Parser stepR initialR extractR) =
352 -- XXX should we sequence initialR monadically?
352 -- XXX should we sequence initialR monadically?
353 Error err -> Error err) <$> stepL st a <*> initialR
353 Error err -> Error err) <$> stepL st a <*> initialR
354
354
355− step (SeqAR st) a = do
355+ step (SeqAR st) a =
356 (\case
356 (\case
357 Partial n s -> Partial n (SeqAR s)
357 Partial n s -> Partial n (SeqAR s)
358 Continue n s -> Continue n (SeqAR s)
358 Continue n s -> Continue n (SeqAR s)
src/Streamly/Internal/Data/Parser/ParserK/Types.hs+1−1
@@ -231,7 +231,7 @@ parse pstep initial extract (Zipper (cp:cps) backward forward) cont =
231 fwd = Prelude.reverse fwd0
231 fwd = Prelude.reverse fwd0
232 assert (cp + cnt1 - n >= 0) (return ())
232 assert (cp + cnt1 - n >= 0) (return ())
233 cont (Zipper (cp + cnt1 - n : cps) [] fwd) (Done b)
233 cont (Zipper (cp + cnt1 - n : cps) [] fwd) (Done b)
234− D.Partial 0 pst1 -> do
234+ D.Partial 0 pst1 ->
235 return $ Partial (parseCont cnt1 [] (return pst1))
235 return $ Partial (parseCont cnt1 [] (return pst1))
236 D.Partial n pst1 -> do
236 D.Partial n pst1 -> do
237 assert (n <= length (x:back)) (return ())
237 assert (n <= length (x:back)) (return ())
src/Streamly/Internal/Data/Unfold.hs+1−1
@@ -373,7 +373,7 @@ consM action unf = Unfold step inject
373 inject = return . Left
373 inject = return . Left
374
374
375 {-# INLINE_LATE step #-}
375 {-# INLINE_LATE step #-}
376− step (Left a) = do
376+ step (Left a) =
377 action a >>= \r -> return $ Yield r (Right (D.unfold unf a))
377 action a >>= \r -> return $ Yield r (Right (D.unfold unf a))
378 step (Right (UnStream step1 st)) = do
378 step (Right (UnStream step1 st)) = do
379 res <- step1 defState st
379 res <- step1 defState st
src/Streamly/Internal/Data/Zipper.hs+1−1
@@ -105,7 +105,7 @@ nil = Zipper [] [] []
105--
105--
106{-# INLINE fromList #-}
106{-# INLINE fromList #-}
107fromList :: [a] -> Zipper a
107fromList :: [a] -> Zipper a
108−fromList xs = Zipper [] [] xs
108+fromList = Zipper [] []
109
109
110-------------------------------------------------------------------------------
110-------------------------------------------------------------------------------
111-- Checkpointing
111-- Checkpointing