haskell-list-builder-0.1.0.0: Fast Sequencing and Building Lists using Unsafe Primitives
Safe HaskellNone
LanguageHaskell2010

Data.Traversable.IO

Description

Traversing IO lists.

Code from this module is derived from Twan van Laarhoven.

These operations are tail recursive, while building lists by appending to its tail mutably.

Synopsis

Documentation

sequenceIO :: [IO a] -> IO [a] Source #

Sequence implemented in terms of unsafeSetField

This operation is tail recursive.

traverseIO :: (a -> IO b) -> [a] -> IO [b] Source #

Traverse implemented in terms of unsafeSetField.

This operation is tail recursive.

unfoldIO :: IO (Maybe a) -> IO [a] Source #

Unfold a list from an IO action returning a Maybe value. As long as the function returns Just, its value will be appended to the list.