File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
core/src/Streamly/Internal/Data Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -117,19 +117,23 @@ module Streamly.Internal.Data.StreamK
117117 , the
118118
119119 -- ** Transforming Inner Monad
120- , hoist
120+ , morphInner
121121
122122 -- * Exceptions
123123 , handle
124124
125125 -- * Resource Management
126126 , bracketIO
127+
128+ -- * Deprecated
129+ , hoist
127130 )
128131where
129132
130133#include "ArrayMacros.h"
131134#include "inline.hs"
132135#include "assert.hs"
136+ #include "deprecation.h"
133137
134138import Control.Exception (mask_ , Exception )
135139import Control.Monad (void , join )
@@ -687,16 +691,17 @@ toList :: Monad m => StreamK m a -> m [a]
687691toList = foldr (:) []
688692
689693-- Based on suggestions by David Feuer and Pranay Sashank
690- {-# INLINE hoist #-}
691- hoist :: (Monad m , Monad n )
694+ {-# INLINE morphInner #-}
695+ morphInner , hoist :: (Monad m , Monad n )
692696 => (forall x . m x -> n x ) -> StreamK m a -> StreamK n a
693- hoist f str =
697+ morphInner f str =
694698 mkStream $ \ st yld sng stp ->
695699 let single = return . sng
696700 yieldk a s = return $ yld a (hoist f s)
697701 stop = return stp
698702 state = adaptState st
699703 in join . f $ foldStreamShared state yieldk single stop str
704+ RENAME (hoist,morphInner)
700705
701706-------------------------------------------------------------------------------
702707-- Transformation by folding (Scans)
You can’t perform that action at this time.
0 commit comments