structures-0.2: "Advanced" Data Structures

Safe HaskellTrustworthy

Data.Vector.Slow

Synopsis

Documentation

type IterST s = IterT (ST s)Source

data Partial a Source

Constructors

Stop a 
Step (Partial a) 

Instances

Eq a => Eq (Partial a) 
Ord a => Ord (Partial a) 
Read a => Read (Partial a) 
Show a => Show (Partial a) 

delay :: (Monad f, MonadFree f m) => m a -> m a

Adds an extra layer to a free monad value.

In particular, for the iterative monad Iter, this makes the computation require one more step, without changing its final result.

runIter (delay ma) == Right ma

walkST :: (forall s. IterST s a) -> Partial aSource

munstream :: MVector v a => Stream (ST s) a -> IterST s (v s a)Source

unstreamM :: Vector v a => Stream (ST s) a -> IterST s (v a)Source

foldM' :: (a -> b -> ST s a) -> a -> Stream (ST s) b -> IterST s aSource

foldM :: (a -> b -> ST s a) -> a -> Stream (ST s) b -> IterST s aSource

Left fold with a monadic operator