on master help sign in
Fix doctests for GHC >= 9.6
commit637fb666b6c957be25a59914d056886171c5e95e authorHarendra Kumar <harendra@composewell.com> dateSun 17 Dec 2023, 00:54 (3 years ago) parent00b4142
1 file changed+22−26
src/Streamly/Internal/Data/Stream/MkType.hs+22−26
src/Streamly/Internal/Data/Stream/MkType.hs+22−26
@@ -504,7 +504,7 @@ flattenDec (ma:mas) = do
504504-- >>> expr <- runQ (mkZipType "ZipStream" "zipApply" False)
505505-- >>> putStrLn $ pprint expr
506506-- newtype ZipStream m a
507−-- = ZipStream (Stream.Stream m a)
507+-- = ZipStream (Stream.Stream m a)
508508-- deriving Foldable
509509-- mkZipStream :: Stream.Stream m a -> ZipStream m a
510510-- mkZipStream = ZipStream
@@ -516,19 +516,17 @@ flattenDec (ma:mas) = do
516516-- deriving instance GHC.Classes.Eq a => Eq (ZipStream Identity a)
517517-- deriving instance GHC.Classes.Ord a => Ord (ZipStream Identity a)
518518-- instance Show a => Show (ZipStream Identity a)
519−-- where {-# INLINE show #-}
520−-- show (ZipStream strm) = show strm
519+-- where {{-# INLINE show #-}; show (ZipStream strm) = show strm}
521520-- instance Read a => Read (ZipStream Identity a)
522−-- where {-# INLINE readPrec #-}
523−-- readPrec = fmap ZipStream readPrec
521+-- where {{-# INLINE readPrec #-}; readPrec = fmap ZipStream readPrec}
524522-- instance Monad m => Functor (ZipStream m)
525−-- where {-# INLINE fmap #-}
526−-- fmap f (ZipStream strm) = ZipStream (fmap f strm)
523+-- where {{-# INLINE fmap #-};
524+-- fmap f (ZipStream strm) = ZipStream (fmap f strm)}
527525-- instance Monad m => Applicative (ZipStream m)
528−-- where {-# INLINE pure #-}
529−-- pure = ZipStream . Stream.repeat
530−-- {-# INLINE (<*>) #-}
531−-- (<*>) (ZipStream strm1) (ZipStream strm2) = ZipStream (zipApply strm1 strm2)
526+-- where {{-# INLINE pure #-};
527+-- pure = ZipStream . Stream.repeat;
528+-- {-# INLINE (<*>) #-};
529+-- (<*>) (ZipStream strm1) (ZipStream strm2) = ZipStream (zipApply strm1 strm2)}
532530mkZipType
533531 :: String -- ^ Name of the type
534532 -> String -- ^ Function to use for (\<*\>)
@@ -577,27 +575,25 @@ mkZipType dtNameStr apOpStr isConcurrent =
577575-- unParallel :: Parallel m a -> Stream.Stream m a
578576-- unParallel (Parallel strm) = strm
579577-- instance Monad m => Functor (Parallel m)
580−-- where {-# INLINE fmap #-}
581−-- fmap f (Parallel strm) = Parallel (fmap f strm)
578+-- where {{-# INLINE fmap #-};
579+-- fmap f (Parallel strm) = Parallel (fmap f strm)}
582580-- instance Stream.MonadAsync m => Monad (Parallel m)
583−-- where {-# INLINE (>>=) #-}
584−-- (>>=) (Parallel strm1) f = let f1 a = unParallel (f a)
585−-- in Parallel (parBind strm1 f1)
581+-- where {{-# INLINE (>>=) #-};
582+-- (>>=) (Parallel strm1) f = let f1 a = unParallel (f a)
583+-- in Parallel (parBind strm1 f1)}
586584-- instance Stream.MonadAsync m => Applicative (Parallel m)
587−-- where {-# INLINE pure #-}
588−-- pure = Parallel . Stream.fromPure
589−-- {-# INLINE (<*>) #-}
590−-- (<*>) = ap
585+-- where {{-# INLINE pure #-};
586+-- pure = Parallel . Stream.fromPure;
587+-- {-# INLINE (<*>) #-};
588+-- (<*>) = ap}
591589-- instance (Monad (Parallel m), MonadIO m) => MonadIO (Parallel m)
592−-- where {-# INLINE liftIO #-}
593−-- liftIO = Parallel . (Stream.fromEffect . liftIO)
590+-- where {{-# INLINE liftIO #-};
591+-- liftIO = Parallel . (Stream.fromEffect . liftIO)}
594592-- instance MonadTrans Parallel
595−-- where {-# INLINE lift #-}
596−-- lift = Parallel . Stream.fromEffect
593+-- where {{-# INLINE lift #-}; lift = Parallel . Stream.fromEffect}
597594-- instance (Monad (Parallel m),
598595-- MonadThrow m) => MonadThrow (Parallel m)
599−-- where {-# INLINE throwM #-}
600−-- throwM = lift . throwM
596+-- where {{-# INLINE throwM #-}; throwM = lift . throwM}
601597mkCrossType
602598 :: String -- ^ Name of the type
603599 -> String -- ^ Function to use for (>>=)