sdp-0.2: Simple Data Processing
Copyright(c) Andrey Mulik 2020
LicenseBSD-style
Maintainerwork.a.mulik@gmail.com
Portabilityportable
Safe HaskellSafe
LanguageHaskell2010

Control.Concurent.SDP.TUnlist

Contents

Description

Control.Concurent.SDP.TUnlist provides lazy boxed unrolled linked list of stm TVars.

Synopsis

TUnlist

type TUnlist = AnyChunks TArray# Source #

Lazy boxed unrolled linked list.

data STM a #

A monad supporting atomic memory transactions.

Instances

Instances details
Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

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

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

return :: a -> STM a #

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

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

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

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

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

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

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

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

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

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

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

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

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

SplitM STM (TArray# e) e Source # 
Instance details

Defined in SDP.Prim.TArray

Methods

takeM :: Int -> TArray# e -> STM (TArray# e) Source #

dropM :: Int -> TArray# e -> STM (TArray# e) Source #

keepM :: Int -> TArray# e -> STM (TArray# e) Source #

sansM :: Int -> TArray# e -> STM (TArray# e) Source #

splitM :: Int -> TArray# e -> STM (TArray# e, TArray# e) Source #

divideM :: Int -> TArray# e -> STM (TArray# e, TArray# e) Source #

splitsM :: Foldable f => f Int -> TArray# e -> STM [TArray# e] Source #

dividesM :: Foldable f => f Int -> TArray# e -> STM [TArray# e] Source #

partsM :: Foldable f => f Int -> TArray# e -> STM [TArray# e] Source #

chunksM :: Int -> TArray# e -> STM [TArray# e] Source #

eachM :: Int -> TArray# e -> STM (TArray# e) Source #

prefixM :: (e -> Bool) -> TArray# e -> STM Int Source #

suffixM :: (e -> Bool) -> TArray# e -> STM Int Source #

mprefix :: (e -> STM Bool) -> TArray# e -> STM Int Source #

msuffix :: (e -> STM Bool) -> TArray# e -> STM Int Source #

LinearM STM (TArray# e) e Source # 
Instance details

Defined in SDP.Prim.TArray

Methods

newNull :: STM (TArray# e) Source #

nowNull :: TArray# e -> STM Bool Source #

singleM :: e -> STM (TArray# e) Source #

getHead :: TArray# e -> STM e Source #

getLast :: TArray# e -> STM e Source #

prepend :: e -> TArray# e -> STM (TArray# e) Source #

append :: TArray# e -> e -> STM (TArray# e) Source #

newLinear :: [e] -> STM (TArray# e) Source #

newLinearN :: Int -> [e] -> STM (TArray# e) Source #

fromFoldableM :: Foldable f => f e -> STM (TArray# e) Source #

getLeft :: TArray# e -> STM [e] Source #

getRight :: TArray# e -> STM [e] Source #

(!#>) :: TArray# e -> Int -> STM e Source #

writeM :: TArray# e -> Int -> e -> STM () Source #

copied :: TArray# e -> STM (TArray# e) Source #

copied' :: TArray# e -> Int -> Int -> STM (TArray# e) Source #

reversed :: TArray# e -> STM (TArray# e) Source #

merged :: Foldable f => f (TArray# e) -> STM (TArray# e) Source #

filled :: Int -> e -> STM (TArray# e) Source #

copyTo :: TArray# e -> Int -> TArray# e -> Int -> Int -> STM () Source #

ofoldrM :: (Int -> e -> r -> STM r) -> r -> TArray# e -> STM r Source #

ofoldlM :: (Int -> r -> e -> STM r) -> r -> TArray# e -> STM r Source #

ofoldrM' :: (Int -> e -> r -> STM r) -> r -> TArray# e -> STM r Source #

ofoldlM' :: (Int -> r -> e -> STM r) -> r -> TArray# e -> STM r Source #

foldrM :: (e -> r -> STM r) -> r -> TArray# e -> STM r Source #

foldlM :: (r -> e -> STM r) -> r -> TArray# e -> STM r Source #

foldrM' :: (e -> r -> STM r) -> r -> TArray# e -> STM r Source #

foldlM' :: (r -> e -> STM r) -> r -> TArray# e -> STM r Source #

swapM :: TArray# e -> Int -> Int -> STM () Source #

BorderedM STM (TArray# e) Int Source # 
Instance details

Defined in SDP.Prim.TArray

MapM STM (TArray# e) Int e Source # 
Instance details

Defined in SDP.Prim.TArray

Methods

newMap :: [(Int, e)] -> STM (TArray# e) Source #

newMap' :: e -> [(Int, e)] -> STM (TArray# e) Source #

getAssocs :: TArray# e -> STM [(Int, e)] Source #

(>!) :: TArray# e -> Int -> STM e Source #

(!>) :: TArray# e -> Int -> STM e Source #

(!?>) :: TArray# e -> Int -> STM (Maybe e) Source #

updateM :: TArray# e -> (Int -> e -> e) -> STM (TArray# e) Source #

overwrite :: TArray# e -> [(Int, e)] -> STM (TArray# e) Source #

memberM' :: TArray# e -> Int -> STM Bool Source #

getKeys :: TArray# e -> STM [Int] Source #

(.?) :: (e -> Bool) -> TArray# e -> STM (Maybe Int) Source #

(*?) :: (e -> Bool) -> TArray# e -> STM [Int] Source #

kfoldrM :: (Int -> e -> acc -> STM acc) -> acc -> TArray# e -> STM acc Source #

kfoldlM :: (Int -> acc -> e -> STM acc) -> acc -> TArray# e -> STM acc Source #

kfoldrM' :: (Int -> e -> acc -> STM acc) -> acc -> TArray# e -> STM acc Source #

kfoldlM' :: (Int -> acc -> e -> STM acc) -> acc -> TArray# e -> STM acc Source #

IndexedM STM (TArray# e) Int e Source # 
Instance details

Defined in SDP.Prim.TArray

Methods

fromAssocs :: (Int, Int) -> [(Int, e)] -> STM (TArray# e) Source #

fromAssocs' :: (Int, Int) -> e -> [(Int, e)] -> STM (TArray# e) Source #

writeM' :: TArray# e -> Int -> e -> STM () Source #

swapM' :: TArray# e -> Int -> Int -> STM () Source #

fromIndexed' :: Indexed v' j e => v' -> STM (TArray# e) Source #

fromIndexedM :: IndexedM STM v' j e => v' -> STM (TArray# e) Source #

reshaped :: IndexedM STM v' j e => (Int, Int) -> v' -> (Int -> j) -> STM (TArray# e) Source #

fromAccum :: (e -> e' -> e) -> TArray# e -> [(Int, e')] -> STM (TArray# e) Source #

updateM' :: TArray# e -> (e -> e) -> Int -> STM () Source #

Freeze STM (TArray# e) (SArray# e) Source # 
Instance details

Defined in SDP.Prim.TArray

Thaw STM (SArray# e) (TArray# e) Source # 
Instance details

Defined in SDP.Prim.TArray

data TVar a #

Shared memory locations that support atomic memory transactions.

Instances

Instances details
Eq (TVar a)

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(==) :: TVar a -> TVar a -> Bool #

(/=) :: TVar a -> TVar a -> Bool #