on master help sign in
GHC-9: Change INLINABLE -> INLINE to fix perf
commite21d8429cd56c9c8a549c8f4fde0d3b0e2bc325c authorHarendra Kumar <harendra@composewell.com> dateSun 23 Jan 2022, 23:11 (5 years ago) parent7af237f
6 files changed+15−15
src/Streamly/Internal/Data/Array/Foreign/Mut/Type.hs+1−1 src/Streamly/Internal/Data/Array/Foreign/Type.hs+1−1 src/Streamly/Internal/Data/Fold.hs+1−1 src/Streamly/Internal/Data/Fold/Type.hs+1−1 src/Streamly/Internal/Data/Parser.hs+8−8 src/Streamly/Internal/Data/Parser/ParserD.hs+3−3
src/Streamly/Internal/Data/Array/Foreign/Mut/Type.hs+1−1
@@ -2042,7 +2042,7 @@ fromStreamD m = arrayStreamKFromStreamD m >>= fromArrayStreamK
20422042-- | Create an 'Array' from a list. The list must be of finite size.
20432043--
20442044-- @since 0.7.0
2045−{-# INLINABLE fromList #-}
2045+{-# INLINE fromList #-}
20462046fromList :: (MonadIO m, Storable a) => [a] -> m (Array a)
20472047fromList xs = fromStreamD $ D.fromList xs
20482048
src/Streamly/Internal/Data/Array/Foreign/Type.hs+1−1
@@ -357,7 +357,7 @@ fromListRevN _n _xs = undefined
357357-- /Since 0.7.0 (Streamly.Memory.Array)/
358358--
359359-- @since 0.8.0
360−{-# INLINABLE fromList #-}
360+{-# INLINE fromList #-}
361361fromList :: Storable a => [a] -> Array a
362362fromList xs = unsafePerformIO $ unsafeFreeze <$> MA.fromList xs
363363
src/Streamly/Internal/Data/Fold.hs+1−1
@@ -809,7 +809,7 @@ toListRev = foldl' (flip (:)) []
809809-- > drainN n = Fold.take n Fold.drain
810810--
811811-- /Pre-release/
812−{-# INLINABLE drainN #-}
812+{-# INLINE drainN #-}
813813drainN :: Monad m => Int -> Fold m a ()
814814drainN n = take n drain
815815
src/Streamly/Internal/Data/Fold/Type.hs+1−1
@@ -528,7 +528,7 @@ fromRefold (Refold step inject extract) c =
528528-- > drain = drainBy (const (return ()))
529529--
530530-- @since 0.7.0
531−{-# INLINABLE drain #-}
531+{-# INLINE drain #-}
532532drain :: Monad m => Fold m a ()
533533drain = foldl' (\_ _ -> ()) ()
534534
src/Streamly/Internal/Data/Parser.hs+8−8
@@ -534,7 +534,7 @@ drainWhile p = takeWhile p FL.drain
534534--
535535-- /Pre-release/
536536--
537−{-# INLINABLE sliceSepByP #-}
537+{-# INLINE sliceSepByP #-}
538538sliceSepByP ::
539539 MonadCatch m =>
540540 (a -> Bool) -> Parser m a b -> Parser m a b
@@ -544,7 +544,7 @@ sliceSepByP cond = K.toParserK . D.sliceSepByP cond . K.fromParserK
544544-- separator is emitted as a separate element in the output.
545545--
546546-- /Unimplemented/
547−{-# INLINABLE sliceSepWith #-}
547+{-# INLINE sliceSepWith #-}
548548sliceSepWith :: -- MonadCatch m =>
549549 (a -> Bool) -> Fold m a b -> Parser m a b
550550sliceSepWith _cond = undefined -- K.toParserK . D.sliceSepBy cond
@@ -583,7 +583,7 @@ sliceSepWith _cond = undefined -- K.toParserK . D.sliceSepBy cond
583583--
584584-- /Pre-release/
585585--
586−{-# INLINABLE sliceBeginWith #-}
586+{-# INLINE sliceBeginWith #-}
587587sliceBeginWith ::
588588 MonadCatch m =>
589589 (a -> Bool) -> Fold m a b -> Parser m a b
@@ -593,7 +593,7 @@ sliceBeginWith cond = K.toParserK . D.sliceBeginWith cond
593593-- escape char determined by the second predicate.
594594--
595595-- /Unimplemented/
596−{-# INLINABLE escapedSliceSepBy #-}
596+{-# INLINE escapedSliceSepBy #-}
597597escapedSliceSepBy :: -- MonadCatch m =>
598598 (a -> Bool) -> (a -> Bool) -> Fold m a b -> Parser m a b
599599escapedSliceSepBy _cond _esc = undefined
@@ -622,7 +622,7 @@ escapedSliceSepBy _cond _esc = undefined
622622-- @
623623--
624624-- /Unimplemented/
625−{-# INLINABLE escapedFrameBy #-}
625+{-# INLINE escapedFrameBy #-}
626626escapedFrameBy :: -- MonadCatch m =>
627627 (a -> Bool) -> (a -> Bool) -> (a -> Bool) -> Fold m a b -> Parser m a b
628628escapedFrameBy _begin _end _escape _p = undefined
@@ -672,7 +672,7 @@ wordBy f = K.toParserK . D.wordBy f
672672--
673673-- /Pre-release/
674674--
675−{-# INLINABLE groupBy #-}
675+{-# INLINE groupBy #-}
676676groupBy :: MonadCatch m => (a -> a -> Bool) -> Fold m a b -> Parser m a b
677677groupBy eq = K.toParserK . D.groupBy eq
678678
@@ -706,7 +706,7 @@ groupBy eq = K.toParserK . D.groupBy eq
706706--
707707-- /Pre-release/
708708--
709−{-# INLINABLE groupByRolling #-}
709+{-# INLINE groupByRolling #-}
710710groupByRolling :: MonadCatch m => (a -> a -> Bool) -> Fold m a b -> Parser m a b
711711groupByRolling eq = K.toParserK . D.groupByRolling eq
712712
@@ -720,7 +720,7 @@ groupByRolling eq = K.toParserK . D.groupByRolling eq
720720-- Fold.toList Fold.toList'.
721721--
722722-- /Unimplemented/
723−{-# INLINABLE groupByRollingEither #-}
723+{-# INLINE groupByRollingEither #-}
724724groupByRollingEither :: MonadCatch m =>
725725 (a -> a -> Bool) -> Fold m a b -> Fold m a c -> Parser m a (Either b c)
726726groupByRollingEither eq f1 = K.toParserK . D.groupByRollingEither eq f1
src/Streamly/Internal/Data/Parser/ParserD.hs+3−3
@@ -268,7 +268,7 @@ fromFold (Fold fstep finitial fextract) = Parser step initial fextract
268268--
269269-- /Pre-release/
270270--
271−{-# INLINABLE peek #-}
271+{-# INLINE peek #-}
272272peek :: MonadThrow m => Parser m a a
273273peek = Parser step initial extract
274274
@@ -284,7 +284,7 @@ peek = Parser step initial extract
284284--
285285-- /Pre-release/
286286--
287−{-# INLINABLE eof #-}
287+{-# INLINE eof #-}
288288eof :: Monad m => Parser m a ()
289289eof = Parser step initial return
290290
@@ -805,7 +805,7 @@ data GroupByStatePair a s1 s2
805805 | GroupByGroupingPairL !a !s1 !s2
806806 | GroupByGroupingPairR !a !s1 !s2
807807
808−{-# INLINABLE groupByRollingEither #-}
808+{-# INLINE groupByRollingEither #-}
809809groupByRollingEither :: MonadCatch m =>
810810 (a -> a -> Bool) -> Fold m a b -> Fold m a c -> Parser m a (Either b c)
811811groupByRollingEither