Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- for :: Traversable t => t a -> Loop m (t a)
- while :: Traversable t => Loop m (t a) -> (a -> Bool) -> Loop m (t a, a -> Bool)
- class With m ret param where
- with_ :: (Traversable t, Monad m) => Loop m (t a) -> (a -> ExceptT () m ()) -> m ()
- withi_ :: (Traversable t, Monad m, Integral n) => Loop m (t a) -> ((n, a) -> ExceptT () m ()) -> m ()
- withWhile_ :: (Traversable t, Monad m) => Loop m (t a, a -> Bool) -> (a -> ExceptT () m ()) -> m ()
- withWhilei_ :: (Traversable t, Monad m, Integral n) => Loop m (t a, a -> Bool) -> ((n, a) -> ExceptT () m ()) -> m ()
- quit :: Monad m => ExceptT () m a
- cease :: Monad m => ExceptT () m a
Documentation
while :: Traversable t => Loop m (t a) -> (a -> Bool) -> Loop m (t a, a -> Bool) Source #
while
clause to determine the terminal condition of a loop.
for [(0::Int)..] `while` (<10) `with` \(i::Int) -> lift do putStrLn "hi"
with_ :: (Traversable t, Monad m) => Loop m (t a) -> (a -> ExceptT () m ()) -> m () Source #
start a for-each style loop.
withi_ :: (Traversable t, Monad m, Integral n) => Loop m (t a) -> ((n, a) -> ExceptT () m ()) -> m () Source #
start a for-each style loop with access to indices.
withWhile_ :: (Traversable t, Monad m) => Loop m (t a, a -> Bool) -> (a -> ExceptT () m ()) -> m () Source #
start a for-each style loop with while clause.
withWhilei_ :: (Traversable t, Monad m, Integral n) => Loop m (t a, a -> Bool) -> ((n, a) -> ExceptT () m ()) -> m () Source #
start a for-each style loop with while clause and access to indices.