Safe Haskell | Trustworthy |
---|---|
Language | Haskell98 |
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
.
- lazyConsume :: (MonadBaseControl IO m, MonadActive m) => Source m a -> m [a]
- class Monad m => MonadActive m where
- monadActive :: m Bool
Documentation
lazyConsume :: (MonadBaseControl IO m, MonadActive m) => Source m a -> m [a] Source
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 Source
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
monadActive :: m Bool Source
MonadActive IO Source | |
MonadActive Identity Source | |
MonadActive (ST s) Source | |
MonadActive (ST s) Source | |
MonadActive m => MonadActive (MaybeT m) Source | |
MonadActive m => MonadActive (ListT m) Source | |
(MonadIO m, MonadActive m) => MonadActive (ResourceT m) Source | |
MonadActive m => MonadActive (IdentityT m) Source | |
(Monoid w, MonadActive m) => MonadActive (WriterT w m) Source | |
(Monoid w, MonadActive m) => MonadActive (WriterT w m) Source | |
MonadActive m => MonadActive (StateT s m) Source | |
MonadActive m => MonadActive (StateT s m) Source | |
MonadActive m => MonadActive (ReaderT r m) Source | |
(Error e, MonadActive m) => MonadActive (ErrorT e m) Source | |
MonadActive m => MonadActive (ConduitM i o m) Source | |
(Monoid w, MonadActive m) => MonadActive (RWST r w s m) Source | |
(Monoid w, MonadActive m) => MonadActive (RWST r w s m) Source | |
MonadActive m => MonadActive (Pipe l i o u m) Source |