conduit-extra-1.3.5: Batteries included conduit: adapters for common libraries.
Safe HaskellTrustworthy
LanguageHaskell98

Data.Conduit.Lazy

Description

Use lazy I/O for consuming the contents of a source. Warning: All normal warnings of lazy I/O apply. In particular, if you are using this with a ResourceT transformer, you must force the list to be evaluated before exiting the ResourceT.

Synopsis

Documentation

lazyConsume :: forall m a. (MonadUnliftIO m, MonadActive m) => Source m a -> m [a] #

Use lazy I/O to consume all elements from a Source.

This function relies on monadActive to determine if the underlying monadic state has been closed.

Since 0.3.0

class Monad m => MonadActive m where #

Determine if some monad is still active. This is intended to prevent usage of a monadic state after it has been closed. This is necessary for such cases as lazy I/O, where an unevaluated thunk may still refer to a closed ResourceT.

Since 0.3.0

Methods

monadActive :: m Bool #

Instances

Instances details
MonadActive IO # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: IO Bool #

MonadActive Identity # 
Instance details

Defined in Data.Conduit.Lazy

MonadActive (ST s) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ST s Bool #

MonadActive (ST s) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ST s Bool #

MonadActive m => MonadActive (MaybeT m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: MaybeT m Bool #

(MonadIO m, MonadActive m) => MonadActive (ResourceT m) # 
Instance details

Defined in Data.Conduit.Lazy

MonadActive m => MonadActive (ListT m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ListT m Bool #

(Monoid w, MonadActive m) => MonadActive (WriterT w m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: WriterT w m Bool #

(Monoid w, MonadActive m) => MonadActive (WriterT w m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: WriterT w m Bool #

MonadActive m => MonadActive (StateT s m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: StateT s m Bool #

MonadActive m => MonadActive (StateT s m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: StateT s m Bool #

MonadActive m => MonadActive (ReaderT r m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ReaderT r m Bool #

MonadActive m => MonadActive (IdentityT m) # 
Instance details

Defined in Data.Conduit.Lazy

(Error e, MonadActive m) => MonadActive (ErrorT e m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ErrorT e m Bool #

MonadActive m => MonadActive (ConduitT i o m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: ConduitT i o m Bool #

(Monoid w, MonadActive m) => MonadActive (RWST r w s m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: RWST r w s m Bool #

(Monoid w, MonadActive m) => MonadActive (RWST r w s m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: RWST r w s m Bool #

MonadActive m => MonadActive (Pipe l i o u m) # 
Instance details

Defined in Data.Conduit.Lazy

Methods

monadActive :: Pipe l i o u m Bool #