ConcurrentUtils-0.4.5.0: Concurrent utilities

Safe HaskellTrustworthy
LanguageHaskell98

Control.CUtils.AList

Description

Lists suitable for parallel execution (taken from Hackage's monad-par package). (For converting to regular lists, there is the toList function in Data.Foldable.)

Synopsis

Documentation

data AList t Source #

Constructors

Append (AList t) (AList t) 
List [t] 

Instances

Monad AList Source # 

Methods

(>>=) :: AList a -> (a -> AList b) -> AList b #

(>>) :: AList a -> AList b -> AList b #

return :: a -> AList a #

fail :: String -> AList a #

Functor AList Source # 

Methods

fmap :: (a -> b) -> AList a -> AList b #

(<$) :: a -> AList b -> AList a #

Applicative AList Source # 

Methods

pure :: a -> AList a #

(<*>) :: AList (a -> b) -> AList a -> AList b #

(*>) :: AList a -> AList b -> AList b #

(<*) :: AList a -> AList b -> AList a #

Foldable AList Source # 

Methods

fold :: Monoid m => AList m -> m #

foldMap :: Monoid m => (a -> m) -> AList a -> m #

foldr :: (a -> b -> b) -> b -> AList a -> b #

foldr' :: (a -> b -> b) -> b -> AList a -> b #

foldl :: (b -> a -> b) -> b -> AList a -> b #

foldl' :: (b -> a -> b) -> b -> AList a -> b #

foldr1 :: (a -> a -> a) -> AList a -> a #

foldl1 :: (a -> a -> a) -> AList a -> a #

toList :: AList a -> [a] #

null :: AList a -> Bool #

length :: AList a -> Int #

elem :: Eq a => a -> AList a -> Bool #

maximum :: Ord a => AList a -> a #

minimum :: Ord a => AList a -> a #

sum :: Num a => AList a -> a #

product :: Num a => AList a -> a #

Traversable AList Source # 

Methods

traverse :: Applicative f => (a -> f b) -> AList a -> f (AList b) #

sequenceA :: Applicative f => AList (f a) -> f (AList a) #

mapM :: Monad m => (a -> m b) -> AList a -> m (AList b) #

sequence :: Monad m => AList (m a) -> m (AList a) #

MonadPlus AList Source # 

Methods

mzero :: AList a #

mplus :: AList a -> AList a -> AList a #

Alternative AList Source # 

Methods

empty :: AList a #

(<|>) :: AList a -> AList a -> AList a #

some :: AList a -> AList [a] #

many :: AList a -> AList [a] #

Eq t => Eq (AList t) Source # 

Methods

(==) :: AList t -> AList t -> Bool #

(/=) :: AList t -> AList t -> Bool #

Data t => Data (AList t) Source # 

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> AList t -> c (AList t) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (AList t) #

toConstr :: AList t -> Constr #

dataTypeOf :: AList t -> DataType #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c (AList t)) #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (AList t)) #

gmapT :: (forall b. Data b => b -> b) -> AList t -> AList t #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AList t -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AList t -> r #

gmapQ :: (forall d. Data d => d -> u) -> AList t -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AList t -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AList t -> m (AList t) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AList t -> m (AList t) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AList t -> m (AList t) #

Ord t => Ord (AList t) Source # 

Methods

compare :: AList t -> AList t -> Ordering #

(<) :: AList t -> AList t -> Bool #

(<=) :: AList t -> AList t -> Bool #

(>) :: AList t -> AList t -> Bool #

(>=) :: AList t -> AList t -> Bool #

max :: AList t -> AList t -> AList t #

min :: AList t -> AList t -> AList t #

Show t => Show (AList t) Source # 

Methods

showsPrec :: Int -> AList t -> ShowS #

show :: AList t -> String #

showList :: [AList t] -> ShowS #

filterAList :: (b -> Bool) -> AList b -> AList b Source #

Filters the AList using a predicate.

assocFold :: (c -> c -> c) -> AList c -> c Source #

Folds the AList with a function, that must be associative. This allows parallelism to be introduced.

monoid :: (Monoid t, Eq t) => AList t -> t Source #

Combine monoid elements to get a result.

lenAList :: (Num t, Eq b) => AList b -> t Source #

Length of an AList.

findAList :: Eq a => (a -> Bool) -> AList a -> Maybe a Source #

Find the first element satisfying a predicate.

concatAList :: Monad m => m (m b) -> m b Source #

Concatenate an AList of ALists.